Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Jan 1998 06:48:49 +1100 (EST)
From:      John Birrell <jb@freebsd1.cimlogic.com.au>
To:        jacques@oskar.nanoteq.co.za (Jacques Fourie)
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: Pthreads question
Message-ID:  <199801151948.GAA09435@freebsd1.cimlogic.com.au>
In-Reply-To: <199801151419.QAA24608@oskar.nanoteq.co.za> from Jacques Fourie at "Jan 15, 98 04:19:55 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199801151948.GAA09435>