I am very new to RIOT and was following the tutorials. Task 7 ( talks about getting the current thread with the sched_active_pid variable from sched.h. But I am getting an error saying “error: ‘sched_active_pid’ undeclared (first use in this function)”.

A similar issue is reported in In my case I get the same error even after including #include “sched.h”.

Any help is really appreciated.

RIOT - Version: 2020.10 running on native

Thanks Jobish John

Uh that document is outdated - you should be using thread_getpid().

Thanks very much.