]>
git.proxmox.com Git - mirror_spl.git/blob - include/sys/thread.h
8424070e234e91f0d8414a2e995c671f966509c2
8 #include <linux/module.h>
10 #include <linux/spinlock.h>
11 #include <linux/kthread.h>
12 #include <sys/types.h>
13 #include <sys/sysmacros.h>
18 #define TP_MAGIC 0x53535353
20 #define TS_SLEEP TASK_INTERRUPTIBLE
21 #define TS_RUN TASK_RUNNING
22 #define TS_ZOMB EXIT_ZOMBIE
23 #define TS_STOPPED TASK_STOPPED
25 #define TS_FREE 0x00 /* No clean linux mapping */
26 #define TS_ONPROC 0x04 /* No clean linux mapping */
27 #define TS_WAIT 0x20 /* No clean linux mapping */
30 typedef void (*thread_func_t
)(void *);
32 #define thread_create(stk, stksize, func, arg, len, pp, state, pri) \
33 __thread_create(stk, stksize, (thread_func_t)func, \
34 #func, arg, len, pp, state, pri)
35 #define thread_exit() __thread_exit()
36 #define curthread get_current()
38 extern kthread_t
*__thread_create(caddr_t stk
, size_t stksize
,
39 thread_func_t func
, const char *name
,
40 void *args
, size_t len
, int *pp
,
41 int state
, pri_t pri
);
42 extern void __thread_exit(void);
48 #endif /* _SPL_THREAD_H */