/*
- * Internal Threading header
+ * Acess2 Kernel
+ * - By John Hodge (thePowersGang)
+ *
+ * include/threads_int.h
+ * - Internal Threading header
* - Only for use by stuff that needs access to the thread type.
*/
#ifndef _THREADS_INT_H_
#include <threads.h>
#include <proc.h>
+#include <timers_int.h>
typedef struct sProcess tProcess;
struct sProcess *Process; //!< Thread Group / Process
struct sThread *Parent; //!< Parent Thread
char *ThreadName; //!< Name of thread
-
+
+ struct sThread *LastDeadChild; //!< Last child to die (will have the \a DeadChildren lock)
+ tMutex DeadChildLock; //!< Lock to prevent clobbering of \a LastDeadChild, acquired by child, released by parent
+
// --- arch/proc.c's responsibility
//! Kernel Stack Base
tVAddr KernelStack;
// --- event.c
Uint32 EventState;
+ // --- timer.c
+ tTimer ThreadTimer;
};
-enum {
+enum eThreadStatus {
THREAD_STAT_NULL, // Invalid process
THREAD_STAT_ACTIVE, // Running and schedulable process
THREAD_STAT_SLEEPING, // Message Sleep