]>
Commit | Line | Data |
---|---|---|
3d4ea0ce | 1 | #ifndef _LINUX_THREAD_H |
2 | #define _LINUX_THREAD_H | |
f1ca4da6 | 3 | |
4 | #ifdef __cplusplus | |
5 | extern "C" { | |
6 | #endif | |
7 | ||
8 | #include <linux/mm.h> | |
9 | #include <linux/spinlock.h> | |
3d4ea0ce | 10 | #include <linux-types.h> |
11 | #include <linux-generic.h> | |
f1ca4da6 | 12 | |
13 | /* | |
14 | * Thread interfaces | |
15 | */ | |
16 | #define TP_MAGIC 0x53535353 | |
17 | ||
18 | #define TS_SLEEP TASK_INTERRUPTIBLE | |
19 | #define TS_RUN TASK_RUNNING | |
20 | #define TS_ZOMB EXIT_ZOMBIE | |
21 | #define TS_STOPPED TASK_STOPPED | |
22 | #if 0 | |
23 | #define TS_FREE 0x00 /* No clean linux mapping */ | |
24 | #define TS_ONPROC 0x04 /* No clean linux mapping */ | |
25 | #define TS_WAIT 0x20 /* No clean linux mapping */ | |
26 | #endif | |
27 | ||
28 | #define thread_create(stk, stksize, func, arg, len, pp, state, pri) \ | |
29 | __thread_create(stk, stksize, func, arg, len, pp, state, pri) | |
30 | #define thread_exit() __thread_exit() | |
31 | #define curthread get_current() | |
32 | ||
33 | /* We just need a valid type to pass around, it's unused */ | |
34 | typedef struct proc_s { | |
35 | int foo; | |
36 | } proc_t; | |
37 | ||
38 | kthread_t * __thread_create(caddr_t stk, size_t stksize, | |
39 | void (*proc)(void *), void *args, | |
40 | size_t len, proc_t *pp, int state, | |
41 | pri_t pri); | |
42 | ||
43 | #ifdef __cplusplus | |
44 | } | |
45 | #endif | |
46 | ||
3d4ea0ce | 47 | #endif /* _LINUX_THREAD_H */ |
f1ca4da6 | 48 |