From 902c342289c1d13a4d55b9224acb6d67578b7a60 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 14 Apr 2009 21:22:31 -0700 Subject: [PATCH] Make mutex functions reentrant --- ao.h | 4 ++-- ao_mutex.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ao.h b/ao.h index 5574f30f..39ad9587 100644 --- a/ao.h +++ b/ao.h @@ -305,10 +305,10 @@ ao_dma_isr(void) interrupt 8; */ void -ao_mutex_get(__xdata uint8_t *ao_mutex); +ao_mutex_get(__xdata uint8_t *ao_mutex) __reentrant; void -ao_mutex_put(__xdata uint8_t *ao_mutex); +ao_mutex_put(__xdata uint8_t *ao_mutex) __reentrant; /* * ao_ee.c diff --git a/ao_mutex.c b/ao_mutex.c index 12c67960..8212a515 100644 --- a/ao_mutex.c +++ b/ao_mutex.c @@ -18,7 +18,7 @@ #include "ao.h" void -ao_mutex_get(__xdata uint8_t *mutex) +ao_mutex_get(__xdata uint8_t *mutex) __reentrant { if (*mutex == ao_cur_task->task_id) ao_panic(AO_PANIC_MUTEX); @@ -30,7 +30,7 @@ ao_mutex_get(__xdata uint8_t *mutex) } void -ao_mutex_put(__xdata uint8_t *mutex) +ao_mutex_put(__xdata uint8_t *mutex) __reentrant { if (*mutex != ao_cur_task->task_id) ao_panic(AO_PANIC_MUTEX); -- 2.30.2