Skip to content

Commit c5ac626

Browse files
authored
Merge pull request #78 from benpicco/patch-1
task-07: use thread_getpid() instead of sched_active_pid
2 parents 916715e + 7b9a8d6 commit c5ac626

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

task-07/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ Note: `num` must be in powers of 2.
3434
3535
* You can register for packets of a certain type and context (port 8888 in our
3636
case) using `gnrc_netreg_register()` from [`net/gnrc/netreg.h`](https://doc.riot-os.org/group__net__gnrc__netreg.html):
37-
* The current thread can be obtained with the `sched_active_pid` variable from
38-
`sched.h`
37+
* The current thread can be obtained with the `thread_getpid()` function from
38+
`thread.h`
3939
4040
```C
41-
gnrc_netreg_entry_t server = GNRC_NETREG_ENTRY_INIT_PID(8888, sched_active_pid);
41+
gnrc_netreg_entry_t server = GNRC_NETREG_ENTRY_INIT_PID(8888, thread_getpid());
4242
gnrc_netreg_register(GNRC_NETTYPE_UDP, &server);
4343
```
4444

0 commit comments

Comments
 (0)