Home
last modified time | relevance | path

Searched refs:stack_size (Results 1 – 8 of 8) sorted by relevance

/bionic/libc/bionic/
Dpthread_attr.cpp44 attr->stack_size = PTHREAD_STACK_SIZE_DEFAULT; in pthread_attr_init()
92 int pthread_attr_setstacksize(pthread_attr_t* attr, size_t stack_size) { in pthread_attr_setstacksize() argument
93 if (stack_size < PTHREAD_STACK_MIN) { in pthread_attr_setstacksize()
96 attr->stack_size = stack_size; in pthread_attr_setstacksize()
100 int pthread_attr_getstacksize(const pthread_attr_t* attr, size_t* stack_size) { in pthread_attr_getstacksize() argument
102 return pthread_attr_getstack(attr, &unused, stack_size); in pthread_attr_getstacksize()
105 int pthread_attr_setstack(pthread_attr_t* attr, void* stack_base, size_t stack_size) { in pthread_attr_setstack() argument
106 if ((stack_size & (PAGE_SIZE - 1) || stack_size < PTHREAD_STACK_MIN)) { in pthread_attr_setstack()
113 attr->stack_size = stack_size; in pthread_attr_setstack()
117 static int __pthread_attr_getstack_main_thread(void** stack_base, size_t* stack_size) { in __pthread_attr_getstack_main_thread() argument
[all …]
Dpthread_exit.cpp92 size_t stack_size = thread->attr.stack_size; in pthread_exit() local
107 thread->attr.stack_size = 0; in pthread_exit()
134 _exit_with_stack_teardown(stack_base, stack_size); in pthread_exit()
Dpthread_create.cpp108 void* stack = mmap(NULL, thread->attr.stack_size, prot, flags, -1, 0); in __create_thread_stack()
113 thread->attr.stack_size, strerror(errno)); in __create_thread_stack()
122 munmap(stack, thread->attr.stack_size); in __create_thread_stack()
175 thread->attr.stack_size = BIONIC_ALIGN(thread->attr.stack_size, PAGE_SIZE); in pthread_create()
195 … thread->attr.stack_size - BIONIC_TLS_SLOTS * sizeof(void*)); in pthread_create()
231 munmap(thread->attr.stack_base, thread->attr.stack_size); in pthread_create()
Dlibc_init_common.cpp93 main_thread.attr.stack_size = 0; // User code should never see this; we'll compute it when asked. in __libc_init_tls()
Dndk_cruft.cpp94 *stack_addr = (char*)attr->stack_base + attr->stack_size; in pthread_attr_getstackaddr()
/bionic/tests/
Dpthread_test.cpp119 size_t stack_size = 128 * 1024; in TEST() local
120 void* stack = mmap(NULL, stack_size, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); in TEST()
122 memset(stack, 0xff, stack_size); in TEST()
126 ASSERT_EQ(0, pthread_attr_setstack(&attr, stack, stack_size)); in TEST()
135 ASSERT_EQ(0, munmap(stack, stack_size)); in TEST()
519 size_t stack_size = 64*1024; in TEST() local
520 void* stack = mmap(NULL, stack_size, PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, -1, 0); in TEST()
524 pthread_attr_setstack(&a, stack, stack_size); in TEST()
529 ASSERT_EQ(0, munmap(stack, stack_size)); in TEST()
601 size_t stack_size; in TEST() local
[all …]
/bionic/libc/kernel/uapi/linux/
Dflat.h32 unsigned long stack_size; member
/bionic/libc/include/
Dpthread.h82 size_t stack_size; member
161 int pthread_attr_setstacksize(pthread_attr_t*, size_t stack_size) __nonnull((1));