Changeset 29e7cc7 in mainline for kernel/generic/include/synch/mutex.h
- Timestamp:
- 2025-04-18T15:14:10Z (2 months ago)
- Children:
- e77c3ed
- Parents:
- 800d188 (diff), 25fdb2d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/synch/mutex.h
r800d188 r29e7cc7 44 44 MUTEX_PASSIVE, 45 45 MUTEX_RECURSIVE, 46 MUTEX_ACTIVE47 46 } mutex_type_t; 48 47 … … 51 50 typedef struct { 52 51 mutex_type_t type; 52 int nesting; 53 53 semaphore_t sem; 54 struct thread *owner; 55 unsigned nesting; 54 _Atomic(struct thread *) owner; 56 55 } mutex_t; 56 57 #define MUTEX_INITIALIZER(name, mtype) (mutex_t) { \ 58 .type = (mtype), \ 59 .nesting = 0, \ 60 .sem = SEMAPHORE_INITIALIZER((name).sem, 1), \ 61 .owner = NULL, \ 62 } 63 64 #define MUTEX_INITIALIZE(name, mtype) \ 65 mutex_t name = MUTEX_INITIALIZER(name, mtype) 57 66 58 67 extern void mutex_initialize(mutex_t *, mutex_type_t);
Note:
See TracChangeset
for help on using the changeset viewer.