avr-fw-modules/core/src/thread_kill.c

19 lines
253 B
C
Executable File

#include <sys/errno.h>
#include <sys/threads.h>
#include <stdlib.h>
int thread_kill(THREAD* t){
if (!t)
return -ENULLPTR;
unschedule_thread(t);
if (_threading_current == t){
_threading_current = NULL;
};
yield();
return ESUCCESS;
};