Implements ThreadLocalStorage.
ThreadLocalStorage impl | Implements ThreadLocalStorage. |
Copyright | This program is free software. |
Files | |
C-kern/ | Header file ThreadLocalStorage. |
C-kern/ | Implementation file ThreadLocalStorage impl. |
thread_vars_t | Variables stored in thread local storage. |
lifetime | |
thread_vars_INIT_STATIC | Static initializer. |
thread_tls_t | |
static variables | |
s_threadtls_errtimer | Simulates an error in <init_threadtls> and <free_threadtls>. |
helper | |
sizesignalstack_threadtls | Returns the minimum size of the signal stack. |
sizestack_threadtls | Returns the default size of the thread stack. |
sizevars_threadtls | Returns the size of all local thread variables on the stack. |
lifetime | |
query | |
threadstack_threadtls(const thread_tls_t * tls) | Returns the thread stack from tls. |
test |
This program is free software. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program 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 General Public License for more details.
© 2013 Jörg Seebohn
Header file ThreadLocalStorage.
Implementation file ThreadLocalStorage impl.
struct thread_vars_t
Variables stored in thread local storage.
lifetime | |
thread_vars_INIT_STATIC | Static initializer. |
static variables | |
s_threadtls_errtimer | Simulates an error in <init_threadtls> and <free_threadtls>. |
helper | |
sizesignalstack_threadtls | Returns the minimum size of the signal stack. |
sizestack_threadtls | Returns the default size of the thread stack. |
sizevars_threadtls | Returns the size of all local thread variables on the stack. |
lifetime | |
query | |
threadstack_threadtls(const thread_tls_t * tls) | Returns the thread stack from tls. |
test |
Variables stored in thread local storage.
struct thread_vars_t
Static initializer.
#define thread_vars_INIT_STATIC { threadcontext_INIT_STATIC, thread_FREE }
Simulates an error in init_threadtls and free_threadtls.
static test_errortimer_t s_threadtls_errtimer
Returns the minimum size of the signal stack.
static inline size_t sizesignalstack_threadtls( const size_t pagesize )
Returns the default size of the thread stack.
static inline size_t sizestack_threadtls( const size_t pagesize )
Returns the size of all local thread variables on the stack.
static inline size_t sizevars_threadtls( const size_t pagesize )
Returns the thread stack from tls.
void threadstack_threadtls( const thread_tls_t * tls, /*out*/struct memblock_t * stackmem )