#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;