mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-14 07:59:07 +08:00
rtems-bsd-mutex: Use thread queue name
This commit is contained in:
@@ -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);
|
||||
|
@@ -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. */
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user