Changeset c0d814a in mainline for kernel/generic/include/synch/mutex.h
- Timestamp:
- 2025-04-10T20:02:30Z (4 days ago)
- Children:
- b8b031f
- Parents:
- a92290d (diff), 90dd8aee (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. - git-author:
- Wayne Thornton <wmthornton-dev@…> (2025-04-10 20:02:30)
- git-committer:
- GitHub <noreply@…> (2025-04-10 20:02:30)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/synch/mutex.h
ra92290d rc0d814a 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.