Turnstone Operating System
|
Synchronization primitives. More...
Classes | |
struct | lock_t |
struct | semaphore_t |
Typedefs | |
typedef struct lock_t | lock_t |
typedef uint32_t(* | lock_get_local_apic_id_getter_f) (void) |
typedef task_t *(* | lock_current_task_getter_f) (void) |
typedef void(* | lock_task_yielder_f) (void) |
typedef struct semaphore_t | semaphore_t |
Functions | |
MODULE ("turnstone.kernel.cpu.sync") | |
void | video_text_print (const char *str) |
void | future_task_wait_toggler (uint64_t task_id) |
static uint32_t | lock_get_local_apic_id (void) |
static task_t * | lock_get_current_task (void) |
static void | lock_task_yield (void) |
static int8_t | sync_test_set_get (volatile uint64_t *value, uint64_t offset) |
lock_t * | lock_create_with_heap_for_future (memory_heap_t *heap, boolean_t for_future, uint64_t task_id) |
creates lock More... | |
int8_t | lock_destroy (lock_t *lock) |
destroys lock More... | |
void | lock_acquire (lock_t *lock) |
acquires lock More... | |
void | lock_release (lock_t *lock) |
relaases lock More... | |
semaphore_t * | semaphore_create_with_heap (memory_heap_t *heap, uint64_t count) |
create semaphore More... | |
int8_t | semaphore_destroy (semaphore_t *semaphore) |
destroys semaphore More... | |
int8_t | semaphore_acquire_with_count (semaphore_t *semaphore, uint64_t count) |
acquires slots at semaphore More... | |
int8_t | semaphore_release_with_count (semaphore_t *semaphore, uint64_t count) |
releases slots at semaphore More... | |
Synchronization primitives.
This work is licensed under TURNSTONE OS Public License. Please read and understand latest version of Licence.
void lock_acquire | ( | lock_t * | lock | ) |
acquires lock
[in] | lock | lock to acquire |
lock_t * lock_create_with_heap_for_future | ( | memory_heap_t * | heap, |
boolean_t | for_future, | ||
uint64_t | task_id | ||
) |
creates lock
[in] | heap | heap for lock |
[in] | for_future | is lock for future |
destroys lock
[in] | lock | lock to destroy |
void lock_release | ( | lock_t * | lock | ) |
relaases lock
[in] | lock | lock to release |
int8_t semaphore_acquire_with_count | ( | semaphore_t * | semaphore, |
uint64_t | count | ||
) |
acquires slots at semaphore
[in] | semaphore | semaphore to acquire |
[in] | count | semaphore decrease value |
semaphore_t * semaphore_create_with_heap | ( | memory_heap_t * | heap, |
uint64_t | count | ||
) |
create semaphore
[in] | heap | heap where semaphore resides |
[in] | count | semaphore count value |
int8_t semaphore_destroy | ( | semaphore_t * | semaphore | ) |
destroys semaphore
[in] | semaphore | semaphore to destroy |
int8_t semaphore_release_with_count | ( | semaphore_t * | semaphore, |
uint64_t | count | ||
) |
releases slots at semaphore
[in] | semaphore | semaphore to release |
[in] | count | semaphore increase value |