]>
sourceware.org Git - glibc.git/blob - linuxthreads/errno.c
1 /* Linuxthreads - a simple clone()-based implementation of Posix */
2 /* threads for Linux. */
3 /* Copyright (C) 1996 Xavier Leroy (Xavier.Leroy@inria.fr) */
5 /* This program is free software; you can redistribute it and/or */
6 /* modify it under the terms of the GNU Library General Public License */
7 /* as published by the Free Software Foundation; either version 2 */
8 /* of the License, or (at your option) any later version. */
10 /* This program is distributed in the hope that it will be useful, */
11 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
12 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
13 /* GNU Library General Public License for more details. */
15 /* Define the location of errno for the remainder of the C library */
21 #include "internals.h"
23 int * __errno_location()
25 pthread_descr self
= thread_self();
26 return THREAD_GETMEM (self
, p_errnop
);
29 int * __h_errno_location()
31 pthread_descr self
= thread_self();
32 return THREAD_GETMEM (self
, p_h_errnop
);
35 /* Return thread specific resolver state. */
36 struct __res_state
* __res_state()
38 pthread_descr self
= thread_self();
39 return THREAD_GETMEM (self
, p_resp
);
This page took 0.044994 seconds and 6 git commands to generate.