errno finally thread-safe
[reactos.git] / posix / lib / psxdll / errno / errno.c
1 /* $Id: errno.c,v 1.3 2002/05/17 01:52:03 hyperion Exp $
2 */
3 /*
4 * COPYRIGHT: See COPYING in the top level directory
5 * PROJECT: ReactOS POSIX+ Subsystem
6 * FILE: subsys/psx/lib/psxdll/errno/errno.c
7 * PURPOSE: Internal errno implementation
8 * PROGRAMMER: KJK::Hyperion <noog@libero.it>
9 * UPDATE HISTORY:
10 * 27/12/2001: Created
11 */
12
13 #include <ddk/ntddk.h>
14 #include <psx/pdata.h>
15 #include <psx/errno.h>
16 #include <psx/debug.h>
17
18 int * __PdxGetThreadErrNum(void)
19 {
20 return &(((__PPDX_TDATA) (NtCurrentTeb()->TlsSlots[__PdxGetProcessData()->TlsIndex]) )->ErrNum);
21 }
22
23 /* EOF */
24