OSDN Git Service

add limited pthread_setattr_default_np API to set stack size defaults
authorRich Felker <dalias@aerifal.cx>
Tue, 8 Nov 2016 17:09:05 +0000 (12:09 -0500)
committerRich Felker <dalias@aerifal.cx>
Tue, 8 Nov 2016 17:45:03 +0000 (12:45 -0500)
commit31fb174dd295e50f7c5cf18d31fcfd5fe5a063b7
treed0cc757d2280d4711d40de2fa7ca3121593f11be
parentea7891a651dc4abc1305438470f1e4cc3b64ece2
add limited pthread_setattr_default_np API to set stack size defaults

based on patch by Timo Teräs:

While generally this is a bad API, it is the only existing API to
affect c++ (std::thread) and c11 (thrd_create) thread stack size.
This patch allows applications only to increate stack and guard
page sizes.
include/pthread.h
src/thread/pthread_create.c
src/thread/pthread_setattr_default_np.c [new file with mode: 0644]