Changeset 4c78104 in mainline for kernel/generic/src/synch/semaphore.c


Ignore:
Timestamp:
2023-02-09T16:55:34Z (15 months ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e994898
Parents:
c0b54c9
Message:

Get rid of waitq_count_get/set

File:
1 edited

Legend:

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

    rc0b54c9 r4c78104  
    5252void semaphore_initialize(semaphore_t *sem, int val)
    5353{
    54         waitq_initialize(&sem->wq);
    55         if (val != 0)
    56                 waitq_count_set(&sem->wq, val);
     54        waitq_initialize_with_count(&sem->wq, val);
    5755}
    5856
     
    10098}
    10199
    102 /** Get the semaphore counter value.
    103  *
    104  * @param sem           Semaphore.
    105  * @return              The number of threads that can down the semaphore
    106  *                      without blocking.
    107  */
    108 int semaphore_count_get(semaphore_t *sem)
    109 {
    110         return waitq_count_get(&sem->wq);
    111 }
    112 
    113100/** @}
    114101 */
Note: See TracChangeset for help on using the changeset viewer.