Rev 1616 | Rev 1967 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1616 | Rev 1964 | ||
---|---|---|---|
Line 8... | Line 8... | ||
8 | * This file contains the main data structure and API definitions. |
8 | * This file contains the main data structure and API definitions. |
9 | */ |
9 | */ |
10 | #ifndef __LINUX_MUTEX_H |
10 | #ifndef __LINUX_MUTEX_H |
11 | #define __LINUX_MUTEX_H |
11 | #define __LINUX_MUTEX_H |
Line 12... | Line -... | ||
12 | - | ||
13 | #include |
12 | |
14 | #include |
13 | #include |
Line 15... | Line 14... | ||
15 | #include |
14 | #include |
16 | 15 | ||
Line 55... | Line 54... | ||
55 | struct mutex_waiter { |
54 | struct mutex_waiter { |
56 | struct list_head list; |
55 | struct list_head list; |
57 | int *task; |
56 | int *task; |
58 | }; |
57 | }; |
Line 59... | Line -... | ||
59 | - | ||
60 | - | ||
61 | #define __MUTEX_INITIALIZER(lockname) \ |
- | |
62 | { .count = ATOMIC_INIT(1) \ |
- | |
63 | , .wait_list = LIST_HEAD_INIT(lockname.wait_list) } |
- | |
64 | - | ||
65 | #define DEFINE_MUTEX(mutexname) \ |
- | |
66 | struct mutex mutexname = __MUTEX_INITIALIZER(mutexname) |
- | |
67 | 58 | ||
68 | void __attribute__ ((fastcall)) __attribute__ ((dllimport)) |
59 | void __attribute__ ((fastcall)) __attribute__ ((dllimport)) |
69 | mutex_init(struct mutex*)__asm__("MutexInit"); |
60 | mutex_init(struct mutex*)__asm__("MutexInit"); |
70 | void __attribute__ ((fastcall)) __attribute__ ((dllimport)) |
61 | void __attribute__ ((fastcall)) __attribute__ ((dllimport)) |
71 | mutex_lock(struct mutex*)__asm__("MutexLock"); |
62 | mutex_lock(struct mutex*)__asm__("MutexLock"); |