>     void* ThreadMain(void* arg)
>     {
>         ....
>         error = pthread_cond_wait(&gCond, &gMutex);
>         ^
>         error always = EINVAL (22).  This is my very first call that
> uses gCond.
>     }
>
>     I printed out gCond, it looks good.  Can someone tell me what I've
> done wrong?  Thanks!

        You forgot to lock the mutex and you forgot to check the condition before
waiting.

        DS



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-stable" in the body of the message

Reply via email to