Changeset 597fa24 in mainline for kernel/generic/src/synch
- Timestamp:
- 2025-04-09T16:19:40Z (9 months ago)
- Branches:
- master
- Children:
- 9f945464, a188131
- Parents:
- 3e7948c
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2025-04-09 16:08:09)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2025-04-09 16:19:40)
- Location:
- kernel/generic/src/synch
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/synch/condvar.c
r3e7948c r597fa24 48 48 void condvar_initialize(condvar_t *cv) 49 49 { 50 waitq_initialize(&cv->wq);50 *cv = CONDVAR_INITIALIZER(*cv); 51 51 } 52 52 -
kernel/generic/src/synch/mutex.c
r3e7948c r597fa24 53 53 void mutex_initialize(mutex_t *mtx, mutex_type_t type) 54 54 { 55 mtx->type = type; 56 mtx->owner = NULL; 57 mtx->nesting = 0; 58 semaphore_initialize(&mtx->sem, 1); 55 *mtx = MUTEX_INITIALIZER(*mtx, type); 59 56 } 60 57 -
kernel/generic/src/synch/semaphore.c
r3e7948c r597fa24 52 52 void semaphore_initialize(semaphore_t *sem, int val) 53 53 { 54 waitq_initialize_with_count(&sem->wq, val);54 *sem = SEMAPHORE_INITIALIZER(*sem, val); 55 55 } 56 56 -
kernel/generic/src/synch/waitq.c
r3e7948c r597fa24 70 70 void waitq_initialize(waitq_t *wq) 71 71 { 72 memsetb(wq, sizeof(*wq), 0); 73 irq_spinlock_initialize(&wq->lock, "wq.lock"); 74 list_initialize(&wq->sleepers); 72 *wq = WAITQ_INITIALIZER(*wq); 75 73 } 76 74 … … 81 79 void waitq_initialize_with_count(waitq_t *wq, int count) 82 80 { 83 waitq_initialize(wq); 84 wq->wakeup_balance = count; 81 *wq = WAITQ_INITIALIZER_WITH_COUNT(*wq, count); 85 82 } 86 83
Note:
See TracChangeset
for help on using the changeset viewer.
