Skip to content

Commit f916f94

Browse files
committed
minor typo fixes on locks chapter
1 parent 4138f09 commit f916f94

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

05_Scheduling/04_Locks.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Let's say we use this serial port to for log messages, with a function like the
1616

1717
```c
1818
void serial_log(const char* msg) {
19-
volatile char* resource = (char*)0xDEAD'BEEF;
19+
volatile char* resource = (char*)0xDEADBEEF;
2020
for (size_t i = 0; msg[i] != 0; i++)
2121
*resource = msg[i];
2222
}
@@ -46,7 +46,7 @@ What would we expect to see on the serial output? We don't know! It's essentiall
4646

4747
![Tasks execution sequence](/Images/taskssequence.png)
4848

49-
The image above is an example of threads being scheduled, assuming there are only three of them in the system (labeled as _A, B, C_.
49+
The image above is an example of threads being scheduled, assuming there are only three of them in the system (labeled as _A, B, C_).
5050
Imagine that A is `thread_one` and B is `thread_two`, while C does not interact with the serial. One example of what we could see then is `Iwh aI ammi lethe secfionrsd t stristngring`. This contains all the right characters but it's completely unreadable. The image below shows what could happen:
5151

5252
![Shared Resource Sequence](/Images/sharedressequence.png)
@@ -66,7 +66,7 @@ We'll need a few things to achieve that:
6666

6767
While we only need one variable per lock, we're going to create a new struct for it so it can be expanded in the future.
6868

69-
```
69+
```c
7070
typedef struct {
7171
bool lock;
7272
} spinlock_t;

0 commit comments

Comments
 (0)