blob: b1ff72f2ccf575ea4db659835011f3c41f3fe1c1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
#ifndef CSR_FRAMEWORK_EXT_TYPES_H__
#define CSR_FRAMEWORK_EXT_TYPES_H__
/*****************************************************************************
(c) Cambridge Silicon Radio Limited 2010
All rights reserved and confidential information of CSR
Refer to LICENSE.txt included with this source for details
on the license terms.
*****************************************************************************/
#include "csr_types.h"
#ifdef __KERNEL__
#include <linux/kthread.h>
#include <linux/semaphore.h>
#else
#include <pthread.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __KERNEL__
struct CsrThread
{
struct task_struct *thread_task;
char name[16];
};
struct CsrEvent
{
/* wait_queue for waking the kernel thread */
wait_queue_head_t wakeup_q;
unsigned int wakeup_flag;
};
typedef struct CsrEvent CsrEventHandle;
typedef struct semaphore CsrMutexHandle;
typedef struct CsrThread CsrThreadHandle;
#else /* __KERNEL __ */
struct CsrEvent
{
pthread_cond_t event;
pthread_mutex_t mutex;
u32 eventBits;
};
typedef struct CsrEvent CsrEventHandle;
typedef pthread_mutex_t CsrMutexHandle;
typedef pthread_t CsrThreadHandle;
#endif /* __KERNEL__ */
#ifdef __cplusplus
}
#endif
#endif
|