From owner-freebsd-hackers Thu Jan 15 11:43:25 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA03272 for hackers-outgoing; Thu, 15 Jan 1998 11:43:25 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from freebsd1.cimlogic.com.au (cimlog.lnk.telstra.net [139.130.51.31]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA03256 for ; Thu, 15 Jan 1998 11:43:10 -0800 (PST) (envelope-from jb@freebsd1.cimlogic.com.au) Received: (from jb@localhost) by freebsd1.cimlogic.com.au (8.8.7/8.8.7) id GAA09435; Fri, 16 Jan 1998 06:48:50 +1100 (EST) (envelope-from jb) From: John Birrell Message-Id: <199801151948.GAA09435@freebsd1.cimlogic.com.au> Subject: Re: Pthreads question In-Reply-To: <199801151419.QAA24608@oskar.nanoteq.co.za> from Jacques Fourie at "Jan 15, 98 04:19:55 pm" To: jacques@oskar.nanoteq.co.za (Jacques Fourie) Date: Fri, 16 Jan 1998 06:48:49 +1100 (EST) Cc: freebsd-hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL32 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk Jacques Fourie wrote: [...] > /* Compiled with gcc -o threadtest threadtest.c -lc_r */ You need to compile with -D_THREAD_SAFE to pick up the thread aware errno. Without that, your code will look at the global errno which actually belongs to the initial thread. This won't change the behaviour of the pthread_cond_timedwait() function because the library should have been compiled with -D_THREAD_SAFE, so there may still be a problem. Regards, -- John Birrell - jb@cimlogic.com.au; jb@netbsd.org; jb@freebsd.org CIMlogic Pty Ltd, GPO Box 117A, Melbourne Vic 3001, Australia +61 418 353 137