diff options
author | "Steven J. Hill" <sjhill@realitydiluted.com> | 2006-08-18 02:34:31 +0000 |
---|---|---|
committer | "Steven J. Hill" <sjhill@realitydiluted.com> | 2006-08-18 02:34:31 +0000 |
commit | 56977c02fd8c31ed4669245828f689512b21b0fc (patch) | |
tree | 0ceb81953abbea519e6c1dd98991102028b17b2d /libpthread/linuxthreads | |
parent | b97fedbd9e65f10d221ad0653392379be1a4ba3f (diff) | |
download | uClibc-alpine-56977c02fd8c31ed4669245828f689512b21b0fc.tar.bz2 uClibc-alpine-56977c02fd8c31ed4669245828f689512b21b0fc.tar.xz |
Merge from trunk.
Diffstat (limited to 'libpthread/linuxthreads')
-rw-r--r-- | libpthread/linuxthreads/ptfork.c | 7 | ||||
-rw-r--r-- | libpthread/linuxthreads/pthread.c | 27 | ||||
-rw-r--r-- | libpthread/linuxthreads/sysdeps/pthread/uClibc-glue.h | 7 |
3 files changed, 22 insertions, 19 deletions
diff --git a/libpthread/linuxthreads/ptfork.c b/libpthread/linuxthreads/ptfork.c index 9cdbb5436..853aeea92 100644 --- a/libpthread/linuxthreads/ptfork.c +++ b/libpthread/linuxthreads/ptfork.c @@ -78,16 +78,17 @@ pid_t __pthread_fork (struct fork_block *b) return pid; } -#ifdef SHARED +/* psm: have no idea why these are here, sjhill? */ +#if 0 /*def SHARED*/ pid_t __fork (void) { return __libc_fork (); } -weak_alias (__fork, fork); +weak_alias (__fork, fork) pid_t __vfork(void) { return __libc_fork (); } -weak_alias (__vfork, vfork); +weak_alias (__vfork, vfork) #endif diff --git a/libpthread/linuxthreads/pthread.c b/libpthread/linuxthreads/pthread.c index 202dbc7b8..9eb89142d 100644 --- a/libpthread/linuxthreads/pthread.c +++ b/libpthread/linuxthreads/pthread.c @@ -32,8 +32,6 @@ #include "smp.h" #include <not-cancel.h> -#define __clone clone - /* Sanity check. */ #if !defined __SIGRTMIN || (__SIGRTMAX - __SIGRTMIN) < 3 # error "This must not happen" @@ -242,7 +240,7 @@ struct pthread_functions __pthread_functions = #endif .ptr_pthread_fork = __pthread_fork, .ptr_pthread_attr_destroy = __pthread_attr_destroy, - .ptr___pthread_attr_init = __pthread_attr_init, + .ptr_pthread_attr_init = __pthread_attr_init, .ptr_pthread_attr_getdetachstate = __pthread_attr_getdetachstate, .ptr_pthread_attr_setdetachstate = __pthread_attr_setdetachstate, .ptr_pthread_attr_getinheritsched = __pthread_attr_getinheritsched, @@ -451,7 +449,9 @@ __pthread_init_max_stacksize(void) } } -#ifdef SHARED +/* psm: we do not have any ld.so support yet + * remove the USE_TLS guard if nptl is added */ +#if defined SHARED && defined USE_TLS # if USE___THREAD /* When using __thread for this, we do it in libc so as not to give libpthread its own TLS segment just for this. */ @@ -589,7 +589,9 @@ static void pthread_initialize(void) /* How many processors. */ __pthread_smp_kernel = is_smp_system (); -#ifdef SHARED +/* psm: we do not have any ld.so support yet + * remove the USE_TLS guard if nptl is added */ +#if defined SHARED && defined USE_TLS /* Transfer the old value from the dynamic linker's internal location. */ *__libc_dl_error_tsd () = *(*GL(dl_error_catch_tsd)) (); GL(dl_error_catch_tsd) = &__libc_dl_error_tsd; @@ -849,13 +851,13 @@ pthread_t __pthread_self(void) pthread_descr self = thread_self(); return THREAD_GETMEM(self, p_tid); } -strong_alias (__pthread_self, pthread_self); +strong_alias (__pthread_self, pthread_self) int __pthread_equal(pthread_t thread1, pthread_t thread2) { return thread1 == thread2; } -strong_alias (__pthread_equal, pthread_equal); +strong_alias (__pthread_equal, pthread_equal) /* Helper function for thread_self in the case of user-provided stacks */ @@ -936,7 +938,7 @@ int __pthread_setschedparam(pthread_t thread, int policy, __pthread_manager_adjust_prio(th->p_priority); return 0; } -strong_alias (__pthread_setschedparam, pthread_setschedparam); +strong_alias (__pthread_setschedparam, pthread_setschedparam) int __pthread_getschedparam(pthread_t thread, int *policy, struct sched_param *param) @@ -957,14 +959,7 @@ int __pthread_getschedparam(pthread_t thread, int *policy, *policy = pol; return 0; } -strong_alias (__pthread_getschedparam, pthread_getschedparam); - -int __pthread_yield (void) -{ - /* For now this is equivalent with the POSIX call. */ - return sched_yield (); -} -weak_alias (__pthread_yield, pthread_yield) +strong_alias (__pthread_getschedparam, pthread_getschedparam) /* Process-wide exit() request */ diff --git a/libpthread/linuxthreads/sysdeps/pthread/uClibc-glue.h b/libpthread/linuxthreads/sysdeps/pthread/uClibc-glue.h index 094c7fccf..f81c22945 100644 --- a/libpthread/linuxthreads/sysdeps/pthread/uClibc-glue.h +++ b/libpthread/linuxthreads/sysdeps/pthread/uClibc-glue.h @@ -27,12 +27,19 @@ #define __close close #define __on_exit on_exit #define __libc_current_sigrtmin_private __libc_current_sigrtmin +#define __clone clone extern void *__libc_stack_end; extern int __cxa_atexit (void (*func) (void *), void *arg, void *d); #endif /* IS_IN_libpthread */ +#ifdef __UCLIBC_HAS_XLOCALE__ +# define __uselocale(x) uselocale(x) +#else +# define __uselocale(x) ((void)0) +#endif + /* Use a funky version in a probably vein attempt at preventing gdb * from dlopen()'ing glibc's libthread_db library... */ #define STRINGIFY(s) STRINGIFY2 (s) |