Skip to content

Commit

Permalink
Merge pull request #78 from benpicco/patch-1
Browse files Browse the repository at this point in the history
task-07: use thread_getpid() instead of sched_active_pid
  • Loading branch information
miri64 authored Jan 27, 2021
2 parents 916715e + 7b9a8d6 commit c5ac626
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions task-07/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ Note: `num` must be in powers of 2.
* You can register for packets of a certain type and context (port 8888 in our
case) using `gnrc_netreg_register()` from [`net/gnrc/netreg.h`](https://doc.riot-os.org/group__net__gnrc__netreg.html):
* The current thread can be obtained with the `sched_active_pid` variable from
`sched.h`
* The current thread can be obtained with the `thread_getpid()` function from
`thread.h`
```C
gnrc_netreg_entry_t server = GNRC_NETREG_ENTRY_INIT_PID(8888, sched_active_pid);
gnrc_netreg_entry_t server = GNRC_NETREG_ENTRY_INIT_PID(8888, thread_getpid());
gnrc_netreg_register(GNRC_NETTYPE_UDP, &server);
```

Expand Down

0 comments on commit c5ac626

Please sign in to comment.