Home
last modified time | relevance | path

Searched refs:sema (Results 1 – 2 of 2) sorted by relevance

/sys/kern/
Dsemaphore.c25 Semaphore_Init(Semaphore *sema, int count, const char *name) in Semaphore_Init() argument
27 Spinlock_Init(&sema->lock, name, SPINLOCK_TYPE_NORMAL); in Semaphore_Init()
28 sema->count = count; in Semaphore_Init()
30 strncpy(&sema->name[0], name, SEMAPHORE_NAMELEN); in Semaphore_Init()
31 TAILQ_INIT(&sema->waiters); in Semaphore_Init()
34 LIST_INSERT_HEAD(&semaList, sema, semaphoreList); in Semaphore_Init()
39 Semaphore_Destroy(Semaphore *sema) in Semaphore_Destroy() argument
42 LIST_REMOVE(sema, semaphoreList); in Semaphore_Destroy()
45 Spinlock_Destroy(&sema->lock); in Semaphore_Destroy()
49 Semaphore_Acquire(Semaphore *sema) in Semaphore_Acquire() argument
[all …]
/sys/include/
Dsemaphore.h21 void Semaphore_Init(Semaphore *sema, int count, const char *name);
22 void Semaphore_Destroy(Semaphore *sema);
23 void Semaphore_Acquire(Semaphore *sema);
25 void Semaphore_Release(Semaphore *sema);
26 bool Semaphore_TryAcquire(Semaphore *sema);