diff options
Diffstat (limited to 'firmware/export/kernel.h')
-rw-r--r-- | firmware/export/kernel.h | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/firmware/export/kernel.h b/firmware/export/kernel.h index 96a7752017..be5041f6c2 100644 --- a/firmware/export/kernel.h +++ b/firmware/export/kernel.h | |||
@@ -119,18 +119,14 @@ struct mutex | |||
119 | unsigned char locked; /* locked semaphore */ | 119 | unsigned char locked; /* locked semaphore */ |
120 | }; | 120 | }; |
121 | 121 | ||
122 | #if NUM_CORES > 1 | ||
122 | struct spinlock | 123 | struct spinlock |
123 | { | 124 | { |
124 | #if NUM_CORES > 1 | ||
125 | struct corelock cl; /* inter-core sync */ | 125 | struct corelock cl; /* inter-core sync */ |
126 | #endif | ||
127 | struct thread_entry *thread; /* lock owner */ | 126 | struct thread_entry *thread; /* lock owner */ |
128 | int count; /* lock owner recursion count */ | 127 | int count; /* lock owner recursion count */ |
129 | unsigned char locked; /* is locked if nonzero */ | ||
130 | #if NUM_CORES > 1 | ||
131 | unsigned char task_switch; /* can task switch? */ | ||
132 | #endif | ||
133 | }; | 128 | }; |
129 | #endif | ||
134 | 130 | ||
135 | #ifdef HAVE_SEMAPHORE_OBJECTS | 131 | #ifdef HAVE_SEMAPHORE_OBJECTS |
136 | struct semaphore | 132 | struct semaphore |
@@ -229,12 +225,11 @@ extern int queue_broadcast(long id, intptr_t data); | |||
229 | extern void mutex_init(struct mutex *m); | 225 | extern void mutex_init(struct mutex *m); |
230 | extern void mutex_lock(struct mutex *m); | 226 | extern void mutex_lock(struct mutex *m); |
231 | extern void mutex_unlock(struct mutex *m); | 227 | extern void mutex_unlock(struct mutex *m); |
232 | #define SPINLOCK_TASK_SWITCH 0x10 | 228 | #if NUM_CORES > 1 |
233 | #define SPINLOCK_NO_TASK_SWITCH 0x00 | 229 | extern void spinlock_init(struct spinlock *l); |
234 | extern void spinlock_init(struct spinlock *l IF_COP(, unsigned int flags)); | ||
235 | extern void spinlock_lock(struct spinlock *l); | 230 | extern void spinlock_lock(struct spinlock *l); |
236 | extern void spinlock_unlock(struct spinlock *l); | 231 | extern void spinlock_unlock(struct spinlock *l); |
237 | extern int spinlock_lock_w_tmo(struct spinlock *l, int ticks); | 232 | #endif |
238 | #ifdef HAVE_SEMAPHORE_OBJECTS | 233 | #ifdef HAVE_SEMAPHORE_OBJECTS |
239 | extern void semaphore_init(struct semaphore *s, int max, int start); | 234 | extern void semaphore_init(struct semaphore *s, int max, int start); |
240 | extern void semaphore_wait(struct semaphore *s); | 235 | extern void semaphore_wait(struct semaphore *s); |