summaryrefslogtreecommitdiff
path: root/firmware/export/kernel.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/export/kernel.h')
-rw-r--r--firmware/export/kernel.h20
1 files changed, 2 insertions, 18 deletions
diff --git a/firmware/export/kernel.h b/firmware/export/kernel.h
index 20743c554b..6aaf11ddb9 100644
--- a/firmware/export/kernel.h
+++ b/firmware/export/kernel.h
@@ -160,22 +160,12 @@ struct mutex
160struct semaphore 160struct semaphore
161{ 161{
162 struct thread_entry *queue; /* Waiter list */ 162 struct thread_entry *queue; /* Waiter list */
163 int count; /* # of waits remaining before unsignaled */ 163 int volatile count; /* # of waits remaining before unsignaled */
164 int max; /* maximum # of waits to remain signaled */ 164 int max; /* maximum # of waits to remain signaled */
165 IF_COP( struct corelock cl; ) /* multiprocessor sync */ 165 IF_COP( struct corelock cl; ) /* multiprocessor sync */
166}; 166};
167#endif 167#endif
168 168
169#ifdef HAVE_WAKEUP_OBJECTS
170struct wakeup
171{
172 struct thread_entry *queue; /* waiter list */
173 bool volatile signalled; /* signalled status */
174 IF_COP( struct corelock cl; ) /* multiprocessor sync */
175};
176#endif
177
178
179/* global tick variable */ 169/* global tick variable */
180#if defined(CPU_PP) && defined(BOOTLOADER) && \ 170#if defined(CPU_PP) && defined(BOOTLOADER) && \
181 !defined(HAVE_BOOTLOADER_USB_MODE) 171 !defined(HAVE_BOOTLOADER_USB_MODE)
@@ -280,14 +270,8 @@ static inline bool mutex_test(const struct mutex *m)
280 270
281#ifdef HAVE_SEMAPHORE_OBJECTS 271#ifdef HAVE_SEMAPHORE_OBJECTS
282extern void semaphore_init(struct semaphore *s, int max, int start); 272extern void semaphore_init(struct semaphore *s, int max, int start);
283extern void semaphore_wait(struct semaphore *s); 273extern int semaphore_wait(struct semaphore *s, int timeout);
284extern void semaphore_release(struct semaphore *s); 274extern void semaphore_release(struct semaphore *s);
285#endif /* HAVE_SEMAPHORE_OBJECTS */ 275#endif /* HAVE_SEMAPHORE_OBJECTS */
286 276
287#ifdef HAVE_WAKEUP_OBJECTS
288extern void wakeup_init(struct wakeup *w);
289extern int wakeup_wait(struct wakeup *w, int timeout);
290extern int wakeup_signal(struct wakeup *w);
291#endif /* HAVE_WAKEUP_OBJECTS */
292
293#endif /* _KERNEL_H_ */ 277#endif /* _KERNEL_H_ */