errno finally thread-safe

svn path=/trunk/; revision=2960
This commit is contained in:
KJK::Hyperion 2002-05-17 01:52:03 +00:00
parent a97804075b
commit a2da78fa4e

View file

@ -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 * COPYRIGHT: See COPYING in the top level directory
@ -10,15 +10,14 @@
* 27/12/2001: Created * 27/12/2001: Created
*/ */
#include <psx/debug.h> #include <ddk/ntddk.h>
#include <psx/pdata.h>
#include <psx/errno.h> #include <psx/errno.h>
#include <psx/debug.h>
static int __errno_storage = 0;
int * __PdxGetThreadErrNum(void) int * __PdxGetThreadErrNum(void)
{ {
FIXME("errno currently not thread-safe"); return &(((__PPDX_TDATA) (NtCurrentTeb()->TlsSlots[__PdxGetProcessData()->TlsIndex]) )->ErrNum);
return (&__errno_storage);
} }
/* EOF */ /* EOF */