39 static void __semaphoreDestroy(
struct object *
obj);
40 static void __semaphoreShutdown(
struct object *
obj,
UNUSED uint32_t
mode);
41 static int32_t __semaphoreGetStatus(
struct object *
obj,
UNUSED uint32_t
mode);
42 static struct linkedList *__semaphoreWait(
struct object *obj,
UNUSED uint32_t
mode, uint32_t *result);
43 static void __semaphoreSignal(
struct object *obj,
UNUSED uint32_t result);
77 __objectInit(&s->
obj, &semaphoreFunctions);
89 static void __semaphoreDestroy(
struct object *
obj)
94 queueWakeup(&s->
waiters,
true, -1);
111 static void __semaphoreShutdown(
struct object *obj,
UNUSED uint32_t
mode)
114 queueWakeup(&s->
waiters,
true, -1);
128 static int32_t __semaphoreGetStatus(
struct object *obj,
UNUSED uint32_t
mode)
149 static struct linkedList *__semaphoreWait(
struct object *obj,
UNUSED uint32_t
mode, uint32_t *result)
154 *result = --s->
value;
168 static void __semaphoreSignal(
struct object *obj,
UNUSED uint32_t result)
176 queueWakeup(&s->
waiters,
false, 0);
const struct objectFunctions * functions
void * heapAlloc(uint32_t length)
Allocates a block of kernel memory.
struct linkedList waiters
void heapFree(void *addr)
Deallocates a block of kernel memory.
struct semaphore * semaphoreCreate(uint32_t value)
Creates a new kernel semaphore object.
#define objectContainer(p, type, functions)