-#if 0
-typedef struct sState
-{
- void *CurState;
- Uint SP, BP, IP;
-} tState;
-#endif
-
-typedef struct sProcess
-{
- int nThreads;
- int NativePID;
- char *CWD;
- char *Chroot;
- int MaxFD;
-} tProcess;
-
-struct sThread
-{
- struct sThread *GlobalNext;
- struct sThread *Next;
-
- int KernelTID;
-
- tTID TID, PID;
- tUID UID, GID;
-
- struct sThread *Parent;
-
- char *ThreadName;
-
- int State; // 0: Dead, 1: Active, 2: Paused, 3: Asleep
- int ExitStatus;
- int _errno;
-
- // Threads waiting for this thread to exit.
- // Quit logic:
- // - Wait for `WaitingThreads` to be non-null (maybe?)
- // - Wake first in the queue, wait for it to be removed
- // - Repeat
- // - Free thread and quit kernel thread
- struct sThread *WaitingThreads;
- struct sThread *WaitingThreadsEnd;
-
- tProcess *Process;
-
- Uint32 Events, WaitMask;
- SDL_sem *EventSem;
-
-};
-