- Timestamp:
- Jun 28, 2014, 3:21:46 AM (11 years ago)
- Location:
- trunk/libc/src/libc/process
- Files:
-
- 2 added
- 1 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/libc/src/libc/process/Makefile.kmk
r3881 r3882 123 123 124 124 libc_libc_process_SOURCES.os2 = \ 125 $(PATH_LIBC_SRC)/libc/process/os2/threadid .s\126 $(PATH_LIBC_SRC)/libc/process/os2/_errno .s\125 $(PATH_LIBC_SRC)/libc/process/os2/threadid$(KLIBC_SUFF_AS) \ 126 $(PATH_LIBC_SRC)/libc/process/os2/_errno-os2.c \ 127 127 $(PATH_LIBC_SRC)/libc/process/os2/beginthread-os2.c \ 128 128 $(PATH_LIBC_SRC)/libc/process/os2/smutex-os2.c \ -
trunk/libc/src/libc/process/os2/_errno-os2.c
r3881 r3882 1 1 /* $Id$ */ 2 2 /** @file 3 * kLibC - Implementation of _errno() on OS/2. 3 4 * 4 * LIBC - _errno(), NT. 5 * 6 * Copyright (c) 2006 knut st. osmundsen <bird-srcspam@anduin.net> 7 * 8 * 9 * This file is part of kLIBC. 10 * 11 * kLIBC is free software; you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License as published 13 * by the Free Software Foundation; either version 2 of the License, or 14 * (at your option) any later version. 15 * 16 * kLIBC is distributed in the hope that it will be useful, 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 * GNU Lesser General Public License for more details. 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * along with kLIBC; if not, write to the Free Software 23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 24 * 5 * @copyright Copyright (C) 2006-2014 knut st. osmundsen <bird-klibc-spam-xiv@anduin.net> 6 * @licenses MIT, BSD2, BSD3, BSD4, LGPLv2.1, LGPLv3, LGPLvFuture. 25 7 */ 26 8 27 28 #include <klibc/nt/nt.h> 29 #include <klibc/nt/fib.h> 9 #include <klibc/os2/fib.h> 30 10 #include <klibc/thread.h> 31 11 … … 33 13 int *_errno(void) 34 14 { 35 return &(__libc_threadCurrent()->iErrNo); 15 if (__predict_true(__libc_gpTLS != NULL)) 16 return &(__libc_threadCurrent()->iErrNo); 17 static int s_initErrno = 0; 18 return &s_initErrno; 36 19 } 37 20
Note:
See TracChangeset
for help on using the changeset viewer.