Re: waiting on a condition

From: Christophe Saout
Date: Wed Oct 13 2004 - 10:41:17 EST


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.

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil