Commit 38d5a6c4 authored by Keith M. Wesolowski's avatar Keith M. Wesolowski

[SPARC32]: Use correct atomic initializer for semaphore counters

Semaphores use 24-bit atomics, not 32.  Using the wrong initializer
causes immediate deadlock under SMP, and incorrect results under UP.
parent cd4aa976
......@@ -26,7 +26,7 @@ struct semaphore {
#endif
#define __SEMAPHORE_INITIALIZER(name,count) \
{ ATOMIC_INIT(count), 0, __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \
{ ATOMIC24_INIT(count), 0, __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \
__SEM_DEBUG_INIT(name) }
#define __MUTEX_INITIALIZER(name) \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment