Changeset 597fa24 in mainline for kernel/generic/src/synch/waitq.c


Ignore:
Timestamp:
2025-04-09T16:19:40Z (6 days ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
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)
Message:

Enable static initialization of kernel synchronization primitives

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/synch/waitq.c

    r3e7948c r597fa24  
    7070void waitq_initialize(waitq_t *wq)
    7171{
    72         memsetb(wq, sizeof(*wq), 0);
    73         irq_spinlock_initialize(&wq->lock, "wq.lock");
    74         list_initialize(&wq->sleepers);
     72        *wq = WAITQ_INITIALIZER(*wq);
    7573}
    7674
     
    8179void waitq_initialize_with_count(waitq_t *wq, int count)
    8280{
    83         waitq_initialize(wq);
    84         wq->wakeup_balance = count;
     81        *wq = WAITQ_INITIALIZER_WITH_COUNT(*wq, count);
    8582}
    8683
Note: See TracChangeset for help on using the changeset viewer.