summaryrefslogtreecommitdiffstats
path: root/rtemsbsd/rtems/rtems-bsd-muteximpl.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-04-23 14:55:42 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-04-23 14:55:42 +0200
commitc0b0b3ed11d71553cd741791ae9435a23627c172 (patch)
tree34d1c81bb6d523c49e6e59f62c6da8cddc77e69f /rtemsbsd/rtems/rtems-bsd-muteximpl.c
parentUse signed integer type for ticks (diff)
downloadrtems-libbsd-c0b0b3ed11d71553cd741791ae9435a23627c172.tar.bz2
rtems-bsd-mutex: Update due to API changes
Diffstat (limited to 'rtemsbsd/rtems/rtems-bsd-muteximpl.c')
-rw-r--r--rtemsbsd/rtems/rtems-bsd-muteximpl.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/rtemsbsd/rtems/rtems-bsd-muteximpl.c b/rtemsbsd/rtems/rtems-bsd-muteximpl.c
index 3b63d144..2bfa3b1e 100644
--- a/rtemsbsd/rtems/rtems-bsd-muteximpl.c
+++ b/rtemsbsd/rtems/rtems-bsd-muteximpl.c
@@ -66,8 +66,8 @@ rtems_bsd_mutex_priority_change(Thread_Control *thread,
void
rtems_bsd_mutex_lock_more(struct lock_object *lock, rtems_bsd_mutex *m,
- Per_CPU_Control *cpu_self, Thread_Control *owner,
- Thread_Control *executing, ISR_lock_Context *lock_context)
+ Thread_Control *owner, Thread_Control *executing,
+ ISR_lock_Context *lock_context)
{
if (owner == executing) {
BSD_ASSERT(lock->lo_flags & LO_RECURSABLE);
@@ -75,6 +75,7 @@ rtems_bsd_mutex_lock_more(struct lock_object *lock, rtems_bsd_mutex *m,
_ISR_lock_Release_and_ISR_enable(&m->lock, lock_context);
} else {
+ Per_CPU_Control *cpu_self;
bool success;
_Thread_Lock_set(executing, &m->lock);
@@ -84,7 +85,7 @@ rtems_bsd_mutex_lock_more(struct lock_object *lock, rtems_bsd_mutex *m,
_RBTree_Insert(&m->rivals, &executing->RBNode,
_Thread_queue_Compare_priority, false);
- _Thread_Dispatch_disable_critical(cpu_self);
+ cpu_self = _Thread_Dispatch_disable_critical();
/* Priority inheritance */
_Scheduler_Change_priority_if_higher(_Scheduler_Get(owner),
@@ -129,8 +130,7 @@ rtems_bsd_mutex_unlock_more(rtems_bsd_mutex *m, Thread_Control *owner,
} else {
Per_CPU_Control *cpu_self;
- cpu_self = _Per_CPU_Get();
- _Thread_Dispatch_disable_critical(cpu_self);
+ cpu_self = _Thread_Dispatch_disable_critical();
_ISR_lock_Release_and_ISR_enable(&m->lock,
lock_context);