diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-05-18 09:35:46 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-10-20 14:59:55 +0200 |
commit | 62c8ca0ead09ef289faf6517e177fd6f6d7a74a3 (patch) | |
tree | 8eeed454171864eb40485c13f004b39150704135 /rtemsbsd/include/machine/rtems-bsd-muteximpl.h | |
parent | Add CPUINFO command to default network init (diff) | |
download | rtems-libbsd-62c8ca0ead09ef289faf6517e177fd6f6d7a74a3.tar.bz2 |
Fix INVARIANTS support
Diffstat (limited to 'rtemsbsd/include/machine/rtems-bsd-muteximpl.h')
-rw-r--r-- | rtemsbsd/include/machine/rtems-bsd-muteximpl.h | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/rtemsbsd/include/machine/rtems-bsd-muteximpl.h b/rtemsbsd/include/machine/rtems-bsd-muteximpl.h index 98962042..4706201b 100644 --- a/rtemsbsd/include/machine/rtems-bsd-muteximpl.h +++ b/rtemsbsd/include/machine/rtems-bsd-muteximpl.h @@ -209,18 +209,32 @@ rtems_bsd_mutex_unlock(rtems_bsd_mutex *m) } } +static inline Thread_Control * +rtems_bsd_mutex_owner(const rtems_bsd_mutex *m) +{ + + return (m->queue.Queue.owner); +} + static inline int -rtems_bsd_mutex_owned(rtems_bsd_mutex *m) +rtems_bsd_mutex_owned(const rtems_bsd_mutex *m) { - return (m->queue.Queue.owner == _Thread_Get_executing()); + return (rtems_bsd_mutex_owner(m) == _Thread_Get_executing()); } static inline int -rtems_bsd_mutex_recursed(rtems_bsd_mutex *m) +rtems_bsd_mutex_recursed(const rtems_bsd_mutex *m) +{ + + return (m->nest_level != 0); +} + +static inline const char * +rtems_bsd_mutex_name(const rtems_bsd_mutex *m) { - return (m->nest_level); + return (m->queue.Queue.name); } static inline void |