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/include/synch/semaphore.h

    r3e7948c r597fa24  
    4545} semaphore_t;
    4646
     47#define SEMAPHORE_INITIALIZER(name, count) (semaphore_t) { \
     48        .wq = WAITQ_INITIALIZER_WITH_COUNT((name).wq, count), \
     49}
     50
     51#define SEMAPHORE_INITIALIZE(name, count) \
     52        semaphore_t name = SEMAPHORE_INITIALIZER(name, count)
     53
    4754extern void semaphore_initialize(semaphore_t *, int);
    4855extern errno_t semaphore_down_timeout(semaphore_t *, uint32_t);
Note: See TracChangeset for help on using the changeset viewer.