summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-01-31 09:49:49 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-01-31 09:49:49 +0100
commitee94f8a8ea6ad5e2a6ed4096ea65d494fe5d4161 (patch)
tree269242fce0d873f0d42be93386bcc6bb52890e57
parentuserspace tools: Regenerate headers. (diff)
downloadrtems-libbsd-ee94f8a8ea6ad5e2a6ed4096ea65d494fe5d4161.tar.bz2
rtems-bsd-mutex: Use thread queue name
-rw-r--r--freebsd/sys/kern/subr_lock.c2
-rw-r--r--freebsd/sys/sys/_lock.h2
-rw-r--r--rtemsbsd/include/machine/rtems-bsd-muteximpl.h2
3 files changed, 5 insertions, 1 deletions
diff --git a/freebsd/sys/kern/subr_lock.c b/freebsd/sys/kern/subr_lock.c
index 83c63010..5aba8941 100644
--- a/freebsd/sys/kern/subr_lock.c
+++ b/freebsd/sys/kern/subr_lock.c
@@ -93,7 +93,9 @@ lock_init(struct lock_object *lock, struct lock_class *class, const char *name,
KASSERT(i < LOCK_CLASS_MAX, ("unknown lock class %p", class));
/* Initialize the lock object. */
+#ifndef __rtems__
lock->lo_name = name;
+#endif /* __rtems__ */
lock->lo_flags |= flags | LO_INITIALIZED;
LOCK_LOG_INIT(lock, 0);
WITNESS_INIT(lock, (type != NULL) ? type : name);
diff --git a/freebsd/sys/sys/_lock.h b/freebsd/sys/sys/_lock.h
index 35decd76..2ab3d996 100644
--- a/freebsd/sys/sys/_lock.h
+++ b/freebsd/sys/sys/_lock.h
@@ -32,7 +32,9 @@
#define _SYS__LOCK_H_
struct lock_object {
+#ifndef __rtems__
const char *lo_name; /* Individual lock name. */
+#endif /* __rtems__ */
u_int lo_flags;
#ifndef __rtems__
u_int lo_data; /* General class specific data. */
diff --git a/rtemsbsd/include/machine/rtems-bsd-muteximpl.h b/rtemsbsd/include/machine/rtems-bsd-muteximpl.h
index fdad3f12..71a7cbdb 100644
--- a/rtemsbsd/include/machine/rtems-bsd-muteximpl.h
+++ b/rtemsbsd/include/machine/rtems-bsd-muteximpl.h
@@ -61,7 +61,7 @@ static inline void
rtems_bsd_mutex_init(struct lock_object *lock, rtems_bsd_mutex *m,
struct lock_class *class, const char *name, const char *type, int flags)
{
- _Thread_queue_Initialize(&m->queue);
+ _Thread_queue_Initialize(&m->queue, name);
m->nest_level = 0;
lock_init(lock, class, name, type, flags);