From: KJK::Hyperion Date: Fri, 17 May 2002 01:52:03 +0000 (+0000) Subject: errno finally thread-safe X-Git-Tag: backups/DBXSL@12427~103 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=a2da78fa4e3cdca03026f171f211a0e152caf3f7;hp=a97804075b5b5b58023daf2d4073cebe12c07598 errno finally thread-safe svn path=/trunk/; revision=2960 --- 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 */