From a2da78fa4e3cdca03026f171f211a0e152caf3f7 Mon Sep 17 00:00:00 2001 From: "KJK::Hyperion" Date: Fri, 17 May 2002 01:52:03 +0000 Subject: [PATCH] errno finally thread-safe svn path=/trunk/; revision=2960 --- posix/lib/psxdll/errno/errno.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/posix/lib/psxdll/errno/errno.c b/posix/lib/psxdll/errno/errno.c index 64a2f6feb4b..8e29ac9e0b1 100644 --- a/posix/lib/psxdll/errno/errno.c +++ b/posix/lib/psxdll/errno/errno.c @@ -1,4 +1,4 @@ -/* $Id: errno.c,v 1.2 2002/02/20 09:17:56 hyperion Exp $ +/* $Id: errno.c,v 1.3 2002/05/17 01:52:03 hyperion Exp $ */ /* * COPYRIGHT: See COPYING in the top level directory @@ -10,15 +10,14 @@ * 27/12/2001: Created */ -#include +#include +#include #include - -static int __errno_storage = 0; +#include int * __PdxGetThreadErrNum(void) { - FIXME("errno currently not thread-safe"); - return (&__errno_storage); + return &(((__PPDX_TDATA) (NtCurrentTeb()->TlsSlots[__PdxGetProcessData()->TlsIndex]) )->ErrNum); } /* EOF */ -- 2.17.1