[kernel] locking primitive cleanup
-Add static intializers for all of the locking primitives of the form:
foo_t bar = FOO_INITIAL_VALUE(bar);
-Remove the conditional mutex check and just test on DEBUGLEVEL > 0
This commit is contained in:
@@ -21,9 +21,7 @@
|
||||
|
||||
void sem_init(semaphore_t *sem, unsigned int value)
|
||||
{
|
||||
sem->magic = SEMAPHORE_MAGIC;
|
||||
sem->count = value;
|
||||
wait_queue_init(&sem->wait);
|
||||
*sem = (semaphore_t)SEMAPHORE_INITIAL_VALUE(*sem, value);
|
||||
}
|
||||
|
||||
void sem_destroy(semaphore_t *sem)
|
||||
|
||||
Reference in New Issue
Block a user