16#ifndef ICARUS_SEMAPHORE_H
17#define ICARUS_SEMAPHORE_H
36bool semaphore_init(uint8_t semaphore_idx, uint32_t semaphore_count);
uint32_t semaphore_get_max_count(uint8_t semaphore_idx)
Get semaphore maximum count.
bool semaphore_consume(uint8_t semaphore_idx)
Decrement semaphore count (P operation / wait)
bool sem_can_feed(uint8_t semaphore_idx)
Check if semaphore can accept a feed (SVC call gate)
uint32_t semaphore_get_count(uint8_t semaphore_idx)
Get current semaphore count.
uint32_t __semaphore_get_count(uint8_t semaphore_idx)
Privileged implementation of semaphore_get_count.
bool semaphore_consume_timeout(uint8_t semaphore_idx, uint32_t max_ticks)
Decrement semaphore count with timeout (timed P / wait).
bool __semaphore_consume_timeout(uint8_t semaphore_idx, uint32_t max_ticks)
Privileged implementation of semaphore_consume_timeout.
uint32_t __semaphore_get_max_count(uint8_t semaphore_idx)
Privileged implementation of semaphore_get_max_count.
void sem_decrement(uint8_t semaphore_idx)
Decrement semaphore count (SVC call gate)
void __sem_decrement(uint8_t semaphore_idx)
Privileged write gate: decrement semaphore count.
bool __semaphore_feed(uint8_t semaphore_idx)
Privileged implementation of semaphore_feed.
bool __sem_can_consume(uint8_t semaphore_idx)
Privileged call gate: can semaphore be consumed?
bool __semaphore_init(uint8_t semaphore_idx, uint32_t semaphore_count)
Privileged implementation of semaphore_init.
bool sem_can_consume(uint8_t semaphore_idx)
Check if semaphore can be consumed (SVC call gate)
bool semaphore_feed(uint8_t semaphore_idx)
Increment semaphore count (V operation / signal)
bool __sem_can_feed(uint8_t semaphore_idx)
Privileged call gate: can semaphore accept a feed?
bool semaphore_init(uint8_t semaphore_idx, uint32_t semaphore_count)
Initialize a counting semaphore.
void sem_increment(uint8_t semaphore_idx)
Increment semaphore count (SVC call gate)
void __sem_increment(uint8_t semaphore_idx)
Privileged write gate: increment semaphore count.
bool __semaphore_consume(uint8_t semaphore_idx)
Privileged implementation of semaphore_consume.