Skip to content

Commit 9dd3442

Browse files
committed
docs: Correct minor typos in real-time programming documentation
1 parent 23699cc commit 9dd3442

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/RealTimeProgramming.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ One can find a few developer checklists for real-time programming such as [this]
2929
struct ::sched_param param {};
3030
::pthread_getschedparam(t.native_handle(), &policy, &param);
3131
param.sched_priority = 80;
32-
::pthread_setschedparam(t.native_handle(), &policy, &param);
32+
::pthread_setschedparam(t.native_handle(), policy, &param);
3333
```
3434
35-
- Set a **scheduling policy** that fits your needs (see [here](https://man7.org/linux/man-pages/man7/sched.7.html)). **SCHED_FIFO`** is likely the one you want to go for if you do not have a particular reason to do otherwise:
35+
- Set a **scheduling policy** that fits your needs (see [here](https://man7.org/linux/man-pages/man7/sched.7.html)). **`SCHED_FIFO`** is likely the one you want to go for if you do not have a particular reason to do otherwise:
3636
```c
3737
#include <pthread.h>
3838
#include <sched.h>
@@ -41,7 +41,7 @@ One can find a few developer checklists for real-time programming such as [this]
4141
struct ::sched_param param {};
4242
::pthread_getschedparam(t.native_handle(), &policy, &param);
4343
policy = SCHED_FIFO;
44-
::pthread_setschedparam(t.native_handle(), &policy, &param);
44+
::pthread_setschedparam(t.native_handle(), policy, &param);
4545
```
4646

4747
- Dynamic memory allocation (reserving virtual and physical memory) is slow and so is copying. Both are generally not real-time safe. **Avoid any form of dynamic memory allocation inside real-time code**:

0 commit comments

Comments
 (0)