summaryrefslogtreecommitdiff
path: root/firmware/kernel/include/mutex.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/kernel/include/mutex.h')
-rw-r--r--firmware/kernel/include/mutex.h11
1 files changed, 1 insertions, 10 deletions
diff --git a/firmware/kernel/include/mutex.h b/firmware/kernel/include/mutex.h
index b74bfe23f5..4778eb7f11 100644
--- a/firmware/kernel/include/mutex.h
+++ b/firmware/kernel/include/mutex.h
@@ -31,21 +31,12 @@ struct mutex
31 struct blocker blocker; /* priority inheritance info 31 struct blocker blocker; /* priority inheritance info
32 for waiters and owner*/ 32 for waiters and owner*/
33 IF_COP( struct corelock cl; ) /* multiprocessor sync */ 33 IF_COP( struct corelock cl; ) /* multiprocessor sync */
34#ifdef HAVE_PRIORITY_SCHEDULING
35 bool no_preempt;
36#endif
37}; 34};
38 35
39extern void mutex_init(struct mutex *m); 36extern void mutex_init(struct mutex *m);
40extern void mutex_lock(struct mutex *m); 37extern void mutex_lock(struct mutex *m);
41extern void mutex_unlock(struct mutex *m); 38extern void mutex_unlock(struct mutex *m);
42#ifdef HAVE_PRIORITY_SCHEDULING 39#ifndef HAVE_PRIORITY_SCHEDULING
43/* Deprecated temporary function to disable mutex preempting a thread on
44 * unlock - firmware/drivers/fat.c and a couple places in apps/buffering.c -
45 * reliance on it is a bug! */
46static inline void mutex_set_preempt(struct mutex *m, bool preempt)
47 { m->no_preempt = !preempt; }
48#else
49/* Deprecated but needed for now - firmware/drivers/ata_mmc.c */ 40/* Deprecated but needed for now - firmware/drivers/ata_mmc.c */
50static inline bool mutex_test(const struct mutex *m) 41static inline bool mutex_test(const struct mutex *m)
51 { return m->blocker.thread != NULL; } 42 { return m->blocker.thread != NULL; }