Changeset 9f2f5ee in mainline for kernel/generic/include/synch/mutex.h
- Timestamp:
- 2025-04-10T17:48:56Z (5 days ago)
- Branches:
- master
- Children:
- c55ab66
- Parents:
- c626117
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2025-04-10 10:55:54)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2025-04-10 17:48:56)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/synch/mutex.h
rc626117 r9f2f5ee 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; 57 56 58 57 #define MUTEX_INITIALIZER(name, mtype) (mutex_t) { \ 59 58 .type = (mtype), \ 59 .nesting = 0, \ 60 60 .sem = SEMAPHORE_INITIALIZER((name).sem, 1), \ 61 61 .owner = NULL, \ 62 .nesting = 0, \63 62 } 64 63
Note:
See TracChangeset
for help on using the changeset viewer.