diff options
author | han_mao@c-sky.com <han_mao@c-sky.com> | 2018-12-13 09:37:12 +0800 |
---|---|---|
committer | Waldemar Brodkorb <wbrodkorb@conet.de> | 2018-12-14 10:50:50 +0100 |
commit | 7b1c4fa9bd8df64c8002ea4e613c8952bdfefbdd (patch) | |
tree | f3d1dd498d6555feb89b970c9b0f5940505416e3 /libpthread/nptl/init.c | |
parent | 358b7807d7278eaf9cd0cc6e7168d533fbd0b707 (diff) |
several patches for uclibc ng
I've got several patches to fix ltp/openmp/uclibc-ng-test testcase fail on
c-sky.
- fix a ltp testcase.
- fix the problem that pthread creat will fail when libomp is linked before
libc, the variable pagesize is not init.
- fix tst-cancel4 and tst-cancel16. tst-cancelx4 and tst-cancelx16 still fail
with this patch applied, cleanup handler is not called for open/creat/fcntl,
seems some thing wrong with unwind, I haven't check the rootcause yet.
Diffstat (limited to 'libpthread/nptl/init.c')
-rw-r--r-- | libpthread/nptl/init.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libpthread/nptl/init.c b/libpthread/nptl/init.c index 74d30c739..4959d5ed8 100644 --- a/libpthread/nptl/init.c +++ b/libpthread/nptl/init.c @@ -292,7 +292,12 @@ __pthread_initialize_minimal_internal (void) /* Make sure it meets the minimum size that allocate_stack (allocatestack.c) will demand, which depends on the page size. */ + #ifdef SHARED + extern size_t GLRO(dl_pagesize); + const uintptr_t pagesz = GLRO(dl_pagesize); + #else const uintptr_t pagesz = sysconf (_SC_PAGESIZE); + #endif const size_t minstack = pagesz + __static_tls_size + MINIMAL_REST_STACK; if (limit.rlim_cur < minstack) limit.rlim_cur = minstack; |