On 2009-09-25 at 12:35:30 [+0800], Ryan Leavengood <leavengood@xxxxxxxxx> wrote: > On Thu, Sep 24, 2009 at 6:23 AM, Colin Günther <coling@xxxxxx> wrote: > > > > As it seems Haikus conditional variable support cannot be used in this > > case. > > At some point in the code a conversion of Haiku's "struct mutex" in a > > "struct _pthread_mutex" is needed. And as far as I can tell this is > > impossible. Maybe someone else knows better. > > From this it sounds like you were trying to use the pthread condition > variables, but Stephan was talking about the kernel condition > variables, in other words: src/system/kernel/condition_variable.cpp. > > Since AFAIK you are in kernel-land this is probably what you would > want to use. Of course I don't know if that is considered a "public > kernel API" or what the general policy is on using parts of the kernel > code like that in drivers. The header is headers/private/kernel/condition_variable.h, so it's a kernel private API ATM. Drivers in the Haiku repository are free to use it (and are encouraged to do so, if they need a condition variable API); they will be adjusted accordingly, when (if) the API changes. Hoping that the atheros driver will make it into the Haiku repository eventually, I'd say using kernel private API is fine for it, too. CU, Ingo