2 * OSKA Linux implementation -- threading
4 * Copyright (C) 2007 Cambridge Silicon Radio Ltd.
6 * Refer to LICENSE.txt included with this source code for details on
9 #ifndef __OSKA_LINUX_THREAD_H
10 #define __OSKA_LINUX_THREAD_H
12 #include <linux/version.h>
13 #include <linux/kernel.h>
14 #include <linux/kthread.h>
15 #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,19)
16 #include <linux/freezer.h>
23 struct task_struct *task;
27 typedef struct os_thread_lx os_thread_t;
29 int os_thread_create(os_thread_t *thread, const char *name,
30 void (*func)(void *), void *arg);
31 void os_thread_stop(os_thread_t *thread, os_event_t *evt);
32 int os_thread_should_stop(os_thread_t *thread);
34 static inline void os_try_suspend_thread(os_thread_t *thread)
39 #endif /* __OSKA_LINUX_THREAD_H */