From: ppisa Date: Wed, 16 Aug 2006 20:49:37 +0000 (+0000) Subject: Corrected incorrect use of mutex initializer for semaphore used in support code for... X-Git-Url: http://rtime.felk.cvut.cz/gitweb/lincan.git/commitdiff_plain/13eddf636097e954524da50eff3acd9f9ac24e35 Corrected incorrect use of mutex initializer for semaphore used in support code for IPCI165 card. The mismatch prevented build of IPCI165 card support for fully preemptive kernel. --- diff --git a/lincan/src/kthread.c b/lincan/src/kthread.c index d2531b9..cce9ff5 100644 --- a/lincan/src/kthread.c +++ b/lincan/src/kthread.c @@ -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.