This patch adds a working implementation of pthread_create for architectures where STACK_GROWS_UP.
Signed-off-by: Matt Fleming <[email protected]> --- libpthread/nptl/pthread_create.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/libpthread/nptl/pthread_create.c b/libpthread/nptl/pthread_create.c index 63e5588..42ffbaf 100644 --- a/libpthread/nptl/pthread_create.c +++ b/libpthread/nptl/pthread_create.c @@ -383,7 +383,8 @@ start_thread (void *arg) char *sp = CURRENT_STACK_FRAME; size_t freesize = (sp - (char *) pd->stackblock) & ~pagesize_m1; #else -# error "to do" + char *sp = CURRENT_STACK_FRAME; + size_t freesize = ((char *) pd->stackblock - sp) & ~pagesize_m1; #endif assert (freesize < pd->stackblock_size); if (freesize > PTHREAD_STACK_MIN) -- 1.7.2.2 _______________________________________________ uClibc mailing list [email protected] http://lists.busybox.net/mailman/listinfo/uclibc
