summaryrefslogtreecommitdiffstats
path: root/rtemsbsd/include/machine/rtems-bsd-muteximpl.h
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/include/machine/rtems-bsd-muteximpl.h
parentUse signed integer type for ticks (diff)
downloadrtems-libbsd-c0b0b3ed11d71553cd741791ae9435a23627c172.tar.bz2
rtems-bsd-mutex: Update due to API changes
Diffstat (limited to 'rtemsbsd/include/machine/rtems-bsd-muteximpl.h')
-rw-r--r--rtemsbsd/include/machine/rtems-bsd-muteximpl.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/rtemsbsd/include/machine/rtems-bsd-muteximpl.h b/rtemsbsd/include/machine/rtems-bsd-muteximpl.h
index 79e6ee57..644f6f5d 100644
--- a/rtemsbsd/include/machine/rtems-bsd-muteximpl.h
+++ b/rtemsbsd/include/machine/rtems-bsd-muteximpl.h
@@ -66,22 +66,20 @@ rtems_bsd_mutex_init(struct lock_object *lock, rtems_bsd_mutex *m,
}
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);
static inline void
rtems_bsd_mutex_lock(struct lock_object *lock, rtems_bsd_mutex *m)
{
ISR_lock_Context lock_context;
- Per_CPU_Control *cpu_self;
Thread_Control *executing;
Thread_Control *owner;
_ISR_lock_ISR_disable_and_acquire(&m->lock, &lock_context);
owner = m->owner;
- cpu_self = _Per_CPU_Get();
- executing = cpu_self->executing;
+ executing = _Thread_Executing;
if (__predict_true(owner == NULL)) {
m->owner = executing;
@@ -89,7 +87,7 @@ rtems_bsd_mutex_lock(struct lock_object *lock, rtems_bsd_mutex *m)
_ISR_lock_Release_and_ISR_enable(&m->lock, &lock_context);
} else {
- rtems_bsd_mutex_lock_more(lock, m, cpu_self, owner, executing,
+ rtems_bsd_mutex_lock_more(lock, m, owner, executing,
&lock_context);
}
}