/* Definitions for thread-local data handling. linuxthreads/mips version. Copyright (C) 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #ifndef _TLS_H #define _TLS_H #undef USE_TLS #ifndef __ASSEMBLER__ # include # include /* Get the thread descriptor definition. */ # include /* ??? Generic bits of LinuxThreads may call these macros with DESCR set to NULL. We are expected to be able to reference the "current" value. In our case, we'd really prefer to use DESCR, since lots of PAL_code calls would be expensive. We can only trust that the compiler does its job and unifies the multiple __builtin_thread_pointer instances. */ #define LIBC_THREAD_GETMEM(descr, member) \ ((void) sizeof (descr), thread_self()->member) #define LIBC_THREAD_GETMEM_NC(descr, member) \ ((void) sizeof (descr), thread_self()->member) #define LIBC_THREAD_SETMEM(descr, member, value) \ ((void) sizeof (descr), thread_self()->member = (value)) #define LIBC_THREAD_SETMEM_NC(descr, member, value) \ ((void) sizeof (descr), thread_self()->member = (value)) #endif /* __ASSEMBLER__ */ #endif /* _TLS_H */