Maybe systhread.h should have a functionextern sys_thread_t sys_thread_self ();
extern sys_thread_t sys_thread_self ();