riscv64: implement NPTL/TLS
[uclibc-ng.git] / libpthread / nptl / sysdeps / riscv64 / pthreaddef.h
blobfbd40a74f689dfb0066673f0900c8d714f5c3d76
1 /* Copyright (C) 2002-2012 Free Software Foundation, Inc.
3 The GNU C Library is free software; you can redistribute it and/or
4 modify it under the terms of the GNU Lesser General Public License as
5 published by the Free Software Foundation; either version 2.1 of the
6 License, or (at your option) any later version.
8 The GNU C Library is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Lesser General Public License for more details.
13 You should have received a copy of the GNU Lesser General Public
14 License along with the GNU C Library; if not, see
15 <http://www.gnu.org/licenses/>. */
17 /* Default stack size. */
18 #define ARCH_STACK_DEFAULT_SIZE (2 * 1024 * 1024)
20 /* Required stack pointer alignment at beginning. */
21 #define STACK_ALIGN 16
23 /* Minimal stack size after allocating thread descriptor and guard size. */
24 #define MINIMAL_REST_STACK 2048
26 /* Alignment requirement for TCB. */
27 #define TCB_ALIGNMENT 16
29 /* Location of current stack frame. */
30 #define CURRENT_STACK_FRAME __builtin_frame_address (0)
33 /* XXX Until we have a better place keep the definitions here. */
34 #define __exit_thread_inline(val) \
35 INLINE_SYSCALL (exit, 1, (val))