[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:
Travis Geiselbrecht
2013-05-18 16:34:04 -07:00
parent f63e635ca2
commit dc37d8b764
11 changed files with 86 additions and 146 deletions

View File

@@ -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)