pthread_cond_wait always return EINVAL

[ Available lists | Index of freebsd-stable | Month of Mar 2000 | Week of 18 Mar 2000 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Siew Sim <siewsim@prismedia.com>
Date
18 Mar 2000 18:56:42
Subject
pthread_cond_wait always return EINVAL
Message-ID
38D44293.924C973E@prismedia.com


[ Hide this part ]
Hi,

I'm running 3.2. and I'm having problem to get pthread to work.

Here's part of my code:

{
....
assert(pthread_mutex_init(&gMutex, NULL) == 0);
assert(pthread_cond_init(&gCond, NULL) == 0);
assert(pthread_create(&myThread, NULL, ThreadMain, NULL) == 0);
...
}

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!

Siew




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message



Elapsed time: 0.067 seconds