staging: csr: oska: remove timer.c and timer.h
[deliverable/linux.git] / drivers / staging / csr / oska / thread.h
CommitLineData
15a4bc17
GKH
1/*
2 * OSKA Linux implementation -- threading
3 *
4 * Copyright (C) 2007 Cambridge Silicon Radio Ltd.
5 *
6 * Refer to LICENSE.txt included with this source code for details on
7 * the license terms.
8 */
9#ifndef __OSKA_LINUX_THREAD_H
10#define __OSKA_LINUX_THREAD_H
11
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>
17#endif
18#include "event.h"
19
20struct os_thread_lx {
21 void (*func)(void *);
22 void *arg;
23 struct task_struct *task;
24 int stop;
25};
26
27typedef struct os_thread_lx os_thread_t;
28
29int os_thread_create(os_thread_t *thread, const char *name,
30 void (*func)(void *), void *arg);
31void os_thread_stop(os_thread_t *thread, os_event_t *evt);
32int os_thread_should_stop(os_thread_t *thread);
33
34static inline void os_try_suspend_thread(os_thread_t *thread)
35{
36 try_to_freeze();
37}
38
39#endif /* __OSKA_LINUX_THREAD_H */
This page took 0.080398 seconds and 5 git commands to generate.