- Implemented ShutdownA() function
[AROS.git] / compiler / include / aros / hostthread.h
blob9cbd612266647bc09ce13dc75715d2ab8922fc95
1 #ifndef _AROS_HOSTTHREAD_H
2 #define _AROS_HOSTTHREAD_H
4 #ifdef __AROS__
5 #include <exec/nodes.h>
6 #else
8 /* Just to let the compiler know what is it */
9 struct MinNode
11 struct MinNode * mln_Succ,
12 * mln_Pred;
15 #define HT_GetMsg() THandle->HTIFace->GetMsg(THandle)
16 #define HT_CauseInterrupt(data) THandle->HTIFace->CauseInterrupt(THandle, data)
18 #endif
20 struct ThreadHandle;
22 struct HostThreadInterface
24 void *(*GetMsg)(struct ThreadHandle *th);
25 void *(*CauseInterrupt)(struct ThreadHandle *th, void *data);
28 struct ThreadHandle
30 struct MinNode node; /* A node to add the handle to internal list */
31 void *handle; /* Host OS raw thread handle, can be used to manipulate the thread */
32 unsigned long id; /* Thread ID, another thing used in some OSes */
33 struct HostThreadInterface *HTIFace; /* A pointer to host-side API */
34 unsigned long (*entry)(struct ThreadHandle *th); /* Thread entry point */
35 void *data; /* User-defined data passed to the thread */
36 /* Private data follows, do not rely on the size! */
39 #endif