*/
#define _SIGNAL_H_
#undef CLONE_VM // Such a hack
-#include <acess.h>
+#include <arch.h>
#include <unistd.h>
+#include <sys/types.h>
#include <stdint.h>
#include "/usr/include/signal.h"
} tThread;
// === GLOBALS ===
-tThread *gpThreads;
-__thread tThread *gpCurrentThread;
+tThread gThread_Zero = {
+ State: 1,
+ ThreadName: "ThreadZero"
+};
+tThread *gpThreads = &gThread_Zero;
+__thread tThread *gpCurrentThread = &gThread_Zero;
// === CODE ===
tThread *Threads_GetThread(int TID)
tUID Threads_GetUID() { return gpCurrentThread->UID; }
tGID Threads_GetGID() { return gpCurrentThread->GID; }
tTID Threads_GetTID() { return gpCurrentThread->TID; }
-tPID Threads_GetPID() { return gpCurrentThread->PID; }
+tPID Threads_GetPID() {
+ return SDL_ThreadID();
+ //return gpCurrentThread->PID;
+}
Uint *Threads_GetCfgPtr(int Index)
{
+ if( Index < 0 || Index >= NUM_CFG_ENTRIES )
+ return NULL;
+ if( !gpCurrentThread )
+ return NULL;
return &gpCurrentThread->Config[Index];
}