diff options
Diffstat (limited to 'firmware/kernel.c')
-rw-r--r-- | firmware/kernel.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/firmware/kernel.c b/firmware/kernel.c index 288ebbbede..b8556ce214 100644 --- a/firmware/kernel.c +++ b/firmware/kernel.c | |||
@@ -1181,7 +1181,9 @@ int semaphore_wait(struct semaphore *s, int timeout) | |||
1181 | * in 'semaphore_init'. */ | 1181 | * in 'semaphore_init'. */ |
1182 | void semaphore_release(struct semaphore *s) | 1182 | void semaphore_release(struct semaphore *s) |
1183 | { | 1183 | { |
1184 | IF_PRIO( unsigned int result = THREAD_NONE; ) | 1184 | #if defined(HAVE_PRIORITY_SCHEDULING) && defined(irq_enabled_checkval) |
1185 | unsigned int result = THREAD_NONE; | ||
1186 | #endif | ||
1185 | int oldlevel; | 1187 | int oldlevel; |
1186 | 1188 | ||
1187 | oldlevel = disable_irq_save(); | 1189 | oldlevel = disable_irq_save(); |
@@ -1193,7 +1195,11 @@ void semaphore_release(struct semaphore *s) | |||
1193 | KERNEL_ASSERT(s->count == 0, | 1195 | KERNEL_ASSERT(s->count == 0, |
1194 | "semaphore_release->threads queued but count=%d!\n", s->count); | 1196 | "semaphore_release->threads queued but count=%d!\n", s->count); |
1195 | s->queue->retval = OBJ_WAIT_SUCCEEDED; /* indicate explicit wake */ | 1197 | s->queue->retval = OBJ_WAIT_SUCCEEDED; /* indicate explicit wake */ |
1196 | IF_PRIO( result = ) wakeup_thread(&s->queue); | 1198 | #if defined(HAVE_PRIORITY_SCHEDULING) && defined(irq_enabled_checkval) |
1199 | result = wakeup_thread(&s->queue); | ||
1200 | #else | ||
1201 | wakeup_thread(&s->queue); | ||
1202 | #endif | ||
1197 | } | 1203 | } |
1198 | else | 1204 | else |
1199 | { | 1205 | { |