summaryrefslogtreecommitdiff
path: root/src/core/ao_mutex.c
diff options
context:
space:
mode:
authorBdale Garbee <bdale@gag.com>2013-05-16 00:36:23 -0600
committerBdale Garbee <bdale@gag.com>2013-05-16 00:36:23 -0600
commit02d111b1b53ef01fc6e9ab6c4bc60b8af1be0067 (patch)
tree8356f4a019969ee99a45e264c87d38555cf316cc /src/core/ao_mutex.c
parent7a2e1f05adad990a6b161865267abf07ffec7a7e (diff)
parent7699a55aed3a9a7daeb4c6a5a9a280f43edf455f (diff)
Merge branch 'branch-1.2' into debian
Diffstat (limited to 'src/core/ao_mutex.c')
-rw-r--r--src/core/ao_mutex.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/ao_mutex.c b/src/core/ao_mutex.c
index c82a7d57..952ff462 100644
--- a/src/core/ao_mutex.c
+++ b/src/core/ao_mutex.c
@@ -22,11 +22,11 @@ ao_mutex_get(__xdata uint8_t *mutex) __reentrant
{
if (*mutex == ao_cur_task->task_id)
ao_panic(AO_PANIC_MUTEX);
- __critical {
+ ao_arch_critical(
while (*mutex)
ao_sleep(mutex);
*mutex = ao_cur_task->task_id;
- }
+ );
}
void
@@ -34,8 +34,8 @@ ao_mutex_put(__xdata uint8_t *mutex) __reentrant
{
if (*mutex != ao_cur_task->task_id)
ao_panic(AO_PANIC_MUTEX);
- __critical {
+ ao_arch_critical(
*mutex = 0;
ao_wakeup(mutex);
- }
+ );
}