From owner-freebsd-hackers Tue Nov 25 15:56:18 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id PAA18582 for hackers-outgoing; Tue, 25 Nov 1997 15:56:18 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from alpo.whistle.com (alpo.whistle.com [207.76.204.38]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id PAA18566 for ; Tue, 25 Nov 1997 15:56:11 -0800 (PST) (envelope-from julian@whistle.com) Received: (from daemon@localhost) by alpo.whistle.com (8.8.5/8.8.5) id PAA23874; Tue, 25 Nov 1997 15:47:15 -0800 (PST) Received: from UNKNOWN(), claiming to be "current1.whistle.com" via SMTP by alpo.whistle.com, id smtpd023868; Tue Nov 25 15:47:13 1997 Message-ID: <347B62FD.167EB0E7@whistle.com> Date: Tue, 25 Nov 1997 15:45:01 -0800 From: Julian Elischer Organization: Whistle Communications X-Mailer: Mozilla 3.0Gold (X11; I; FreeBSD 2.2-CURRENT i386) MIME-Version: 1.0 To: Charles Mott CC: Terry Lambert , freebsd-hackers@freebsd.org Subject: Re: pthread_cond_timedwait returning wrong error? References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Charles Mott wrote: > > On Tue, 25 Nov 1997, Terry Lambert wrote: > > > > While we are talking about threads, any comments on PR-4376? > > > > > > You are 100% right about the return value being incorrect. > > > Unfortunately, this problem is present in many more functions than just > > > pthread_join(). > > > > > > From what I can tell by looking at an old DEC OSF/1 reference on > > > pthreads, returning -1 an setting errno is the way things used to work. > > > Apparently POSIX has changed that. > > > > Given that "errno" is a global variable, this is actually a good thing. > > > > I was wondering whether maybe errno could be a thread-specific variable > rather than global -- mabye via use of a macro. I was looking through > libc_r sources, but I couldn't discern what was being done in this regard. > > To me, having all the *_r reentrant functions is a big nuisance. > > Charles Mott errno is defined in threads systems as: errno[thread_number] or similar tricks..