]> rtime.felk.cvut.cz Git - lincan.git/commitdiff
Corrected incorrect use of mutex initializer for semaphore used in support code for...
authorppisa <ppisa>
Wed, 16 Aug 2006 20:49:37 +0000 (20:49 +0000)
committerppisa <ppisa>
Wed, 16 Aug 2006 20:49:37 +0000 (20:49 +0000)
The mismatch prevented build of IPCI165 card support for fully preemptive kernel.

lincan/src/kthread.c

index d2531b961e6325785297f7fa26f0c6f373255518..cce9ff53bf993d1632e2f60112294f37485f094e 100644 (file)
@@ -47,7 +47,7 @@ void start_kthread(void (*func)(kthread_t *), kthread_t *kthread)
        in the down operation below until the thread has reached
        the up() operation.
     */
-    init_MUTEX_LOCKED(&kthread->startstop_sem);
+    sema_init(&kthread->startstop_sem, 0);
 
     /* store the function to be executed in the data passed to
        the launcher */
@@ -96,7 +96,7 @@ void stop_kthread(kthread_t *kthread)
        will unlock it. As soon as we see the semaphore
        unlocked, we know that the thread has exited.
     */
-    init_MUTEX_LOCKED(&kthread->startstop_sem);
+    sema_init(&kthread->startstop_sem,0);
 
     /* We need to do a memory barrier here to be sure that
        the flags are visible on all CPUs.