Tools/nativelib - Working on threading
[tpg/acess2.git] / Tools / nativelib / include / threads_int.h
diff --git a/Tools/nativelib/include/threads_int.h b/Tools/nativelib/include/threads_int.h
new file mode 100644 (file)
index 0000000..eb5f9df
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * Acess2 libnative (Kernel Simulation Library)
+ * - By John Hodge (thePowersGang)
+ *
+ * threads_int.h
+ * - Threads handling definitions
+ */
+#ifndef _THREADS_INT_H_
+#define _THREADS_INT_H_
+
+struct sProcess
+{
+       struct sProcess *Next;
+
+        int    PID;
+        int    UID, GID;
+       
+       char    *CWD;
+       char    *Chroot;
+        int    MaxFDs;
+};
+
+struct sThread
+{
+       struct sThread  *Next;
+        int    TID;
+       
+       uint32_t        PendingEvents;
+       uint32_t        WaitingEvents;
+       void    *WaitSemaphore; // pthreads
+       
+       // Init Only
+       void    (*SpawnFcn)(void*);
+       void    *SpawnData;
+};
+
+extern int     Threads_int_CreateThread(struct sThread *Thread);
+
+#endif
+

UCC git Repository :: git.ucc.asn.au