Messages in this thread |  | | Subject | Re: waiting on a condition | From | Christophe Saout <> | Date | Wed, 13 Oct 2004 17:34:39 +0200 |
| |
Am Mittwoch, den 13.10.2004, 16:23 +0100 schrieb Martijn Sipkema:
> I'd like to do something similar as can be done using a POSIX condition > variable in the kernel, i.e. wait for some condition to become true. The > pthread_cond_wait() function allows atomically unlocking a mutex and > waiting on a condition. I think I should do something like: > (the condition is updated from an interrupt handler)
You can take a look at reiser4, it has such an implementation. It's called kcond (fs/reiser4/kcond.c). It's using semaphores, waitqueues and a spinlock to emulate POSIX conditions.
[unhandled content-type:application/pgp-signature] |  |