From owner-freebsd-stable Sat Mar 18 18:56:42 2000 Delivered-To: freebsd-stable@freebsd.org Received: from shell.tsoft.com (shell.tsoft.com [198.144.192.5]) by hub.freebsd.org (Postfix) with ESMTP id B377437B619 for ; Sat, 18 Mar 2000 18:56:39 -0800 (PST) (envelope-from siewsim@prismedia.com) Received: from prismedia.com (m205-186.dsl.tsoft.com [198.144.205.186]) by shell.tsoft.com (8.8.7/8.8.7) with ESMTP id SAA11021 for ; Sat, 18 Mar 2000 18:56:39 -0800 (PST) Message-ID: <38D44293.924C973E@prismedia.com> Date: Sat, 18 Mar 2000 18:59:31 -0800 From: Siew Sim Reply-To: siewsim@prismedia.com Organization: PRISMedia X-Mailer: Mozilla 4.6 [en] (X11; I; FreeBSD 3.2-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-stable@FreeBSD.ORG Subject: pthread_cond_wait always return EINVAL Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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