Threads in RIOT are functions with signature
void *thread_handler(void *arg);
Use thread_create()
from
thread.h
to start it
pid = thread_create(stack, sizeof(stack),
THREAD_PRIORITY_MAIN - 1,
THREAD_CREATE_STACKTEST,
thread_handler,
NULL, "thread");
- Start the thread
"thread"
from withinmain()
- Run the application on
native
:make all term
- Check your output, it should read:
I'm in "thread" now