diff options
| -rw-r--r-- | docs/pthreads_hacking.txt | 748 | ||||
| -rw-r--r-- | docs/threads.txt | 56 | ||||
| -rw-r--r-- | libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch | 7 | ||||
| -rw-r--r-- | libpthread/nptl/sysdeps/unix/sysv/linux/close.S | 21 | ||||
| -rw-r--r-- | libpthread/nptl/sysdeps/unix/sysv/linux/open.S | 21 | ||||
| -rw-r--r-- | libpthread/nptl/sysdeps/unix/sysv/linux/pt-fork.c | 28 | ||||
| -rw-r--r-- | libpthread/nptl/sysdeps/unix/sysv/linux/pt-sleep.c | 2 | ||||
| -rw-r--r-- | libpthread/nptl/sysdeps/unix/sysv/linux/read.S | 19 | ||||
| -rw-r--r-- | libpthread/nptl/sysdeps/unix/sysv/linux/sigtimedwait.c | 87 | ||||
| -rw-r--r-- | libpthread/nptl/sysdeps/unix/sysv/linux/sigwait.c | 2 | ||||
| -rw-r--r-- | libpthread/nptl/sysdeps/unix/sysv/linux/sigwaitinfo.c | 87 | ||||
| -rw-r--r-- | libpthread/nptl/sysdeps/unix/sysv/linux/sleep.c | 2 | ||||
| -rw-r--r-- | libpthread/nptl/sysdeps/unix/sysv/linux/waitpid.S | 23 | ||||
| -rw-r--r-- | libpthread/nptl/sysdeps/unix/sysv/linux/write.S | 19 | 
14 files changed, 1 insertions, 1121 deletions
diff --git a/docs/pthreads_hacking.txt b/docs/pthreads_hacking.txt deleted file mode 100644 index 6c23257d4..000000000 --- a/docs/pthreads_hacking.txt +++ /dev/null @@ -1,748 +0,0 @@ -# Run me as a shell script in uclibc lib/* - - -# Dump the list of dynamic symbols from libpthread -# and compare libpthread's exported symbols of uclibc with glibc -# (adjust /lib64/libpthread-*.*.so as needed). -# The resulting diff is suspiciously large. -# We export a lot of stuff which glibc does not. - -readelf -sDW libpthread-*.*.so \ -| grep '^ *[0-9]' \ -| sed 's/^[0-9a-f: ]*[^ ]\(  *[A-Z]\)/\1/' \ -| sed 's/ [0-9] / N /' | sed 's/ [0-9][0-9] /  N /' | sed 's/ [0-9][0-9][0-9] /   N /' \ -| sort -k5 | uniq \ ->uclibc.lst - -readelf -sDW /lib64/libpthread-*.*.so \ -| grep '^ *[0-9]' \ -| sed 's/^[0-9a-f: ]*[^ ]\(  *[A-Z]\)/\1/' \ -| sed 's/ [0-9] / N /' | sed 's/ [0-9][0-9] /  N /' | sed 's/ [0-9][0-9][0-9] /   N /' \ -| sort -k5 | uniq \ ->glibc.lst -diff -u uclibc.lst glibc.lst >ug.diff - - -# Check which exported symbols from libpthread are never referenced -# from other libraries. Generally, I'd expect a very few __functions -# with two underscores to be exported and not used by e.g. libc-X.X.X.so, -# as these names are supposed to be internal, i.e. external programs -# usually don't call them. On my system, I got 141 such __functions. -# Examples: -# __flockfilelist - NOP function (why do we need it at all?) -# __pthread_perform_cleanup - called only from within libpthread - -echo *-*.*.*.so | xargs -n1 | grep -v libpthread | xargs readelf -aW >full_dump.lst ->uclibc_unrefd.lst ->uclibc_refd.lst -sed 's/^.* //g' uclibc.lst \ -| while read symbol; do -	if grep -F -- "$symbol" full_dump.lst >/dev/null 2>&1; then -		echo "$symbol" >>uclibc_refd.lst -	else -		echo "$symbol" >>uclibc_unrefd.lst -	fi -done - -exit - - -In case you don't have a glibc system to try it, -ug.diff from vda's system is below. - ---- uclibc.lst	2009-03-16 03:07:58.000000000 +0100 -+++ glibc.lst	2009-03-16 03:07:58.000000000 +0100 -@@ -1,188 +1,173 @@ --  NOTYPE GLOBAL DEFAULT ABS __bss_start --    FUNC GLOBAL DEFAULT   N __compare_and_swap -+  OBJECT GLOBAL DEFAULT ABS GLIBC_2.2.5 -+  OBJECT GLOBAL DEFAULT ABS GLIBC_2.2.6 -+  OBJECT GLOBAL DEFAULT ABS GLIBC_2.3.2 -+  OBJECT GLOBAL DEFAULT ABS GLIBC_2.3.3 -+  OBJECT GLOBAL DEFAULT ABS GLIBC_2.3.4 -+  OBJECT GLOBAL DEFAULT ABS GLIBC_2.4 -+  OBJECT GLOBAL DEFAULT ABS GLIBC_PRIVATE -+    FUNC GLOBAL DEFAULT   N _IO_flockfile -+    FUNC GLOBAL DEFAULT   N _IO_ftrylockfile -+    FUNC GLOBAL DEFAULT   N _IO_funlockfile -+  NOTYPE   WEAK DEFAULT UND _Jv_RegisterClasses -+    FUNC GLOBAL DEFAULT UND __clone -+    FUNC   WEAK DEFAULT   N __close -+    FUNC   WEAK DEFAULT   N __connect -+    FUNC   WEAK DEFAULT UND __cxa_finalize -+    FUNC GLOBAL DEFAULT UND __endmntent -     FUNC GLOBAL DEFAULT   N __errno_location --    FUNC GLOBAL DEFAULT   N __flockfilelist --    FUNC GLOBAL DEFAULT   N __fresetlockfiles --    FUNC GLOBAL DEFAULT   N __funlockfilelist -+    FUNC   WEAK DEFAULT   N __fcntl -+    FUNC GLOBAL DEFAULT   N __fork -+    FUNC GLOBAL DEFAULT UND __fxstat64 -+    FUNC GLOBAL DEFAULT UND __getdelim -+    FUNC GLOBAL DEFAULT UND __getmntent_r -+    FUNC GLOBAL DEFAULT UND __getpagesize -+    FUNC GLOBAL DEFAULT UND __gettimeofday -     FUNC GLOBAL DEFAULT   N __h_errno_location --    FUNC GLOBAL DEFAULT   N __linuxthreads_create_event --    FUNC GLOBAL DEFAULT   N __linuxthreads_death_event --  OBJECT GLOBAL DEFAULT   N __linuxthreads_initial_report_events --  OBJECT GLOBAL DEFAULT   N __linuxthreads_pthread_key_2ndlevel_size --  OBJECT GLOBAL DEFAULT   N __linuxthreads_pthread_keys_max --  OBJECT GLOBAL DEFAULT   N __linuxthreads_pthread_sizeof_descr --  OBJECT GLOBAL DEFAULT   N __linuxthreads_pthread_threads_max --    FUNC GLOBAL DEFAULT   N __linuxthreads_reap_event --  OBJECT GLOBAL DEFAULT   N __linuxthreads_version --    FUNC GLOBAL DEFAULT   N __pthread_alt_lock --    FUNC GLOBAL DEFAULT   N __pthread_alt_timedlock --    FUNC GLOBAL DEFAULT   N __pthread_alt_unlock --    FUNC GLOBAL DEFAULT   N __pthread_attr_destroy --    FUNC GLOBAL DEFAULT   N __pthread_attr_getdetachstate --    FUNC GLOBAL DEFAULT   N __pthread_attr_getguardsize --    FUNC GLOBAL DEFAULT   N __pthread_attr_getinheritsched --    FUNC GLOBAL DEFAULT   N __pthread_attr_getschedparam --    FUNC GLOBAL DEFAULT   N __pthread_attr_getschedpolicy --    FUNC GLOBAL DEFAULT   N __pthread_attr_getscope --    FUNC GLOBAL DEFAULT   N __pthread_attr_getstack --    FUNC GLOBAL DEFAULT   N __pthread_attr_getstacksize --    FUNC GLOBAL DEFAULT   N __pthread_attr_init --    FUNC GLOBAL DEFAULT   N __pthread_attr_setdetachstate --    FUNC GLOBAL DEFAULT   N __pthread_attr_setguardsize --    FUNC GLOBAL DEFAULT   N __pthread_attr_setinheritsched --    FUNC GLOBAL DEFAULT   N __pthread_attr_setschedparam --    FUNC GLOBAL DEFAULT   N __pthread_attr_setschedpolicy --    FUNC GLOBAL DEFAULT   N __pthread_attr_setscope --    FUNC GLOBAL DEFAULT   N __pthread_attr_setstack --    FUNC GLOBAL DEFAULT   N __pthread_attr_setstacksize --    FUNC GLOBAL DEFAULT   N __pthread_barrierattr_getpshared --    FUNC GLOBAL DEFAULT   N __pthread_compare_and_swap --    FUNC GLOBAL DEFAULT   N __pthread_cond_broadcast --    FUNC GLOBAL DEFAULT   N __pthread_cond_destroy --    FUNC GLOBAL DEFAULT   N __pthread_cond_init --    FUNC GLOBAL DEFAULT   N __pthread_cond_signal --    FUNC GLOBAL DEFAULT   N __pthread_cond_timedwait --    FUNC GLOBAL DEFAULT   N __pthread_cond_wait --    FUNC GLOBAL DEFAULT   N __pthread_condattr_destroy --    FUNC GLOBAL DEFAULT   N __pthread_condattr_init --    FUNC GLOBAL DEFAULT   N __pthread_create --    FUNC GLOBAL DEFAULT   N __pthread_destroy_specifics --    FUNC GLOBAL DEFAULT   N __pthread_do_exit --    FUNC GLOBAL DEFAULT   N __pthread_equal --    FUNC GLOBAL DEFAULT   N __pthread_exit --  OBJECT GLOBAL DEFAULT   N __pthread_exit_code --  OBJECT GLOBAL DEFAULT   N __pthread_exit_requested --    FUNC GLOBAL DEFAULT   N __pthread_find_self --  OBJECT GLOBAL DEFAULT   N __pthread_functions --    FUNC GLOBAL DEFAULT   N __pthread_getconcurrency --    FUNC GLOBAL DEFAULT   N __pthread_getschedparam --    FUNC   WEAK DEFAULT   N __pthread_getspecific --  OBJECT GLOBAL DEFAULT   N __pthread_handles --  OBJECT GLOBAL DEFAULT   N __pthread_handles_num --  OBJECT GLOBAL DEFAULT   N __pthread_has_cas --    FUNC GLOBAL DEFAULT   N __pthread_init_max_stacksize --  OBJECT GLOBAL DEFAULT   N __pthread_initial_thread --  OBJECT GLOBAL DEFAULT   N __pthread_initial_thread_bos --    FUNC GLOBAL DEFAULT   N __pthread_initialize --    FUNC GLOBAL DEFAULT   N __pthread_initialize_manager -+    FUNC GLOBAL DEFAULT   N __libc_allocate_rtsig -+    FUNC GLOBAL DEFAULT UND __libc_allocate_rtsig_private -+    FUNC GLOBAL DEFAULT   N __libc_current_sigrtmax -+    FUNC GLOBAL DEFAULT UND __libc_current_sigrtmax_private -+    FUNC GLOBAL DEFAULT   N __libc_current_sigrtmin -+    FUNC GLOBAL DEFAULT UND __libc_current_sigrtmin_private -+    FUNC GLOBAL DEFAULT UND __libc_dl_error_tsd -+    FUNC GLOBAL DEFAULT UND __libc_dlopen_mode -+    FUNC GLOBAL DEFAULT UND __libc_dlsym -+    FUNC GLOBAL DEFAULT UND __libc_fatal -+    FUNC GLOBAL DEFAULT UND __libc_fork -+    FUNC GLOBAL DEFAULT UND __libc_longjmp -+    FUNC GLOBAL DEFAULT UND __libc_pthread_init -+  OBJECT GLOBAL DEFAULT UND __libc_stack_end -+    FUNC GLOBAL DEFAULT UND __libc_system -+    FUNC GLOBAL DEFAULT UND __libc_thread_freeres -+    FUNC   WEAK DEFAULT   N __lseek -+    FUNC   WEAK DEFAULT   N __nanosleep -+    FUNC   WEAK DEFAULT   N __open -+    FUNC   WEAK DEFAULT   N __open64 -+    FUNC   WEAK DEFAULT   N __pread64 -+    FUNC GLOBAL DEFAULT   N __pthread_cleanup_routine -+    FUNC GLOBAL DEFAULT   N __pthread_clock_gettime -+    FUNC GLOBAL DEFAULT   N __pthread_clock_settime -+    FUNC GLOBAL DEFAULT   N __pthread_getspecific -     FUNC GLOBAL DEFAULT   N __pthread_initialize_minimal --    FUNC GLOBAL DEFAULT   N __pthread_internal_tsd_address --    FUNC GLOBAL DEFAULT   N __pthread_internal_tsd_get --    FUNC GLOBAL DEFAULT   N __pthread_internal_tsd_set --    FUNC   WEAK DEFAULT   N __pthread_key_create --    FUNC GLOBAL DEFAULT   N __pthread_kill_other_threads_np --  OBJECT GLOBAL DEFAULT   N __pthread_last_event --    FUNC GLOBAL DEFAULT   N __pthread_lock --  OBJECT GLOBAL DEFAULT   N __pthread_main_thread --    FUNC GLOBAL DEFAULT   N __pthread_manager --    FUNC GLOBAL DEFAULT   N __pthread_manager_adjust_prio --    FUNC GLOBAL DEFAULT   N __pthread_manager_event --  OBJECT GLOBAL DEFAULT   N __pthread_manager_reader --  OBJECT GLOBAL DEFAULT   N __pthread_manager_request --    FUNC GLOBAL DEFAULT   N __pthread_manager_sighandler --  OBJECT GLOBAL DEFAULT   N __pthread_manager_thread --  OBJECT GLOBAL DEFAULT   N __pthread_manager_thread_bos --  OBJECT GLOBAL DEFAULT   N __pthread_manager_thread_tos --  OBJECT GLOBAL DEFAULT   N __pthread_max_stacksize --    FUNC   WEAK DEFAULT   N __pthread_mutex_destroy --    FUNC   WEAK DEFAULT   N __pthread_mutex_init --    FUNC   WEAK DEFAULT   N __pthread_mutex_lock --    FUNC GLOBAL DEFAULT   N __pthread_mutex_timedlock --    FUNC   WEAK DEFAULT   N __pthread_mutex_trylock --    FUNC   WEAK DEFAULT   N __pthread_mutex_unlock --    FUNC   WEAK DEFAULT   N __pthread_mutexattr_destroy --    FUNC GLOBAL DEFAULT   N __pthread_mutexattr_getkind_np --    FUNC GLOBAL DEFAULT   N __pthread_mutexattr_getpshared --    FUNC GLOBAL DEFAULT   N __pthread_mutexattr_gettype --    FUNC   WEAK DEFAULT   N __pthread_mutexattr_init --    FUNC GLOBAL DEFAULT   N __pthread_mutexattr_setkind_np --    FUNC GLOBAL DEFAULT   N __pthread_mutexattr_setpshared --    FUNC   WEAK DEFAULT   N __pthread_mutexattr_settype --  OBJECT GLOBAL DEFAULT   N __pthread_nonstandard_stacks --    FUNC GLOBAL DEFAULT   N __pthread_null_sighandler --  OBJECT GLOBAL DEFAULT   N __pthread_offsetof_descr --  OBJECT GLOBAL DEFAULT   N __pthread_offsetof_pid --    FUNC   WEAK DEFAULT   N __pthread_once --    FUNC GLOBAL DEFAULT   N __pthread_once_fork_child --    FUNC GLOBAL DEFAULT   N __pthread_once_fork_parent --    FUNC GLOBAL DEFAULT   N __pthread_once_fork_prepare --    FUNC GLOBAL DEFAULT   N __pthread_perform_cleanup --    FUNC GLOBAL DEFAULT   N __pthread_raise --    FUNC GLOBAL DEFAULT   N __pthread_reset_main_thread --    FUNC GLOBAL DEFAULT   N __pthread_restart_new --    FUNC   WEAK DEFAULT   N __pthread_rwlock_destroy --    FUNC   WEAK DEFAULT   N __pthread_rwlock_init --    FUNC   WEAK DEFAULT   N __pthread_rwlock_rdlock --    FUNC GLOBAL DEFAULT   N __pthread_rwlock_timedrdlock --    FUNC GLOBAL DEFAULT   N __pthread_rwlock_timedwrlock --    FUNC   WEAK DEFAULT   N __pthread_rwlock_tryrdlock --    FUNC   WEAK DEFAULT   N __pthread_rwlock_trywrlock --    FUNC   WEAK DEFAULT   N __pthread_rwlock_unlock --    FUNC   WEAK DEFAULT   N __pthread_rwlock_wrlock --    FUNC GLOBAL DEFAULT   N __pthread_rwlockattr_destroy --    FUNC GLOBAL DEFAULT   N __pthread_self --    FUNC GLOBAL DEFAULT   N __pthread_setcancelstate --    FUNC GLOBAL DEFAULT   N __pthread_setcanceltype --    FUNC GLOBAL DEFAULT   N __pthread_setconcurrency --    FUNC GLOBAL DEFAULT   N __pthread_setschedparam --    FUNC   WEAK DEFAULT   N __pthread_setspecific --  OBJECT GLOBAL DEFAULT   N __pthread_sig_cancel --  OBJECT GLOBAL DEFAULT   N __pthread_sig_debug --  OBJECT GLOBAL DEFAULT   N __pthread_sig_restart --    FUNC GLOBAL DEFAULT   N __pthread_sigaction --    FUNC GLOBAL DEFAULT   N __pthread_sighandler --    FUNC GLOBAL DEFAULT   N __pthread_sighandler_rt --    FUNC GLOBAL DEFAULT   N __pthread_sigwait --  OBJECT GLOBAL DEFAULT   N __pthread_sizeof_handle --  OBJECT GLOBAL DEFAULT   N __pthread_smp_kernel --    FUNC GLOBAL DEFAULT   N __pthread_spin_destroy --    FUNC GLOBAL DEFAULT   N __pthread_spin_init --    FUNC GLOBAL DEFAULT   N __pthread_spin_lock --    FUNC GLOBAL DEFAULT   N __pthread_spin_trylock --    FUNC GLOBAL DEFAULT   N __pthread_spin_unlock --    FUNC GLOBAL DEFAULT   N __pthread_thread_self --  OBJECT GLOBAL DEFAULT   N __pthread_threads_debug --  OBJECT GLOBAL DEFAULT   N __pthread_threads_events --  OBJECT GLOBAL DEFAULT   N __pthread_threads_max --    FUNC GLOBAL DEFAULT   N __pthread_timedsuspend_new --    FUNC GLOBAL DEFAULT   N __pthread_unlock --    FUNC GLOBAL DEFAULT   N __pthread_wait_for_restart_signal --    FUNC GLOBAL DEFAULT   N __register_atfork -+    FUNC GLOBAL DEFAULT   N __pthread_key_create -+    FUNC GLOBAL DEFAULT   N __pthread_mutex_destroy -+    FUNC GLOBAL DEFAULT   N __pthread_mutex_init -+    FUNC GLOBAL DEFAULT   N __pthread_mutex_lock -+    FUNC GLOBAL DEFAULT   N __pthread_mutex_trylock -+    FUNC GLOBAL DEFAULT   N __pthread_mutex_unlock -+    FUNC GLOBAL DEFAULT   N __pthread_mutexattr_destroy -+    FUNC GLOBAL DEFAULT   N __pthread_mutexattr_init -+    FUNC GLOBAL DEFAULT   N __pthread_mutexattr_settype -+    FUNC GLOBAL DEFAULT   N __pthread_once -+    FUNC GLOBAL DEFAULT   N __pthread_register_cancel -+    FUNC GLOBAL DEFAULT   N __pthread_register_cancel_defer -+    FUNC GLOBAL DEFAULT   N __pthread_rwlock_destroy -+    FUNC GLOBAL DEFAULT   N __pthread_rwlock_init -+    FUNC GLOBAL DEFAULT   N __pthread_rwlock_rdlock -+    FUNC GLOBAL DEFAULT   N __pthread_rwlock_tryrdlock -+    FUNC GLOBAL DEFAULT   N __pthread_rwlock_trywrlock -+    FUNC GLOBAL DEFAULT   N __pthread_rwlock_unlock -+    FUNC GLOBAL DEFAULT   N __pthread_rwlock_wrlock -+    FUNC GLOBAL DEFAULT   N __pthread_setspecific -+    FUNC GLOBAL DEFAULT   N __pthread_unregister_cancel -+    FUNC GLOBAL DEFAULT   N __pthread_unregister_cancel_restore -+    FUNC GLOBAL DEFAULT   N __pthread_unwind -+    FUNC GLOBAL DEFAULT   N __pthread_unwind_next -+    FUNC   WEAK DEFAULT   N __pwrite64 -+    FUNC   WEAK DEFAULT   N __read -+    FUNC GLOBAL DEFAULT UND __register_atfork -+    FUNC GLOBAL DEFAULT   N __res_state -+     TLS GLOBAL DEFAULT UND __resp -+    FUNC GLOBAL DEFAULT UND __sched_getparam -+    FUNC GLOBAL DEFAULT UND __sched_getscheduler -+    FUNC GLOBAL DEFAULT UND __sched_setscheduler -+    FUNC   WEAK DEFAULT   N __send -+    FUNC GLOBAL DEFAULT UND __setmntent -     FUNC GLOBAL DEFAULT   N __sigaction --  OBJECT GLOBAL DEFAULT   N __sighandler --  NOTYPE GLOBAL DEFAULT ABS _edata --  NOTYPE GLOBAL DEFAULT ABS _end --    FUNC GLOBAL DEFAULT   N _fini --    FUNC GLOBAL DEFAULT   N _init -+    FUNC GLOBAL DEFAULT UND __statfs -+    FUNC GLOBAL DEFAULT UND __sysconf -+    FUNC GLOBAL DEFAULT UND __tls_get_addr -+  OBJECT GLOBAL DEFAULT UND __vdso_clock_gettime -+    FUNC GLOBAL DEFAULT   N __vfork -+    FUNC   WEAK DEFAULT   N __wait -+    FUNC   WEAK DEFAULT   N __write -+    FUNC GLOBAL DEFAULT UND _dl_allocate_tls -+    FUNC GLOBAL DEFAULT UND _dl_allocate_tls_init -+    FUNC GLOBAL DEFAULT UND _dl_deallocate_tls -+    FUNC GLOBAL DEFAULT UND _dl_get_tls_static_info -+    FUNC GLOBAL DEFAULT UND _dl_make_stack_executable -+    FUNC GLOBAL DEFAULT UND _exit -     FUNC GLOBAL DEFAULT   N _pthread_cleanup_pop -     FUNC GLOBAL DEFAULT   N _pthread_cleanup_pop_restore -     FUNC GLOBAL DEFAULT   N _pthread_cleanup_push -     FUNC GLOBAL DEFAULT   N _pthread_cleanup_push_defer --    FUNC GLOBAL DEFAULT   N compare_and_swap_is_available --    FUNC GLOBAL DEFAULT   N get_eflags -+  OBJECT GLOBAL DEFAULT UND _rtld_global -+    FUNC GLOBAL DEFAULT UND _setjmp -+    FUNC GLOBAL DEFAULT UND abort -+    FUNC   WEAK DEFAULT   N accept -+    FUNC GLOBAL DEFAULT UND calloc -+    FUNC   WEAK DEFAULT   N close -+    FUNC   WEAK DEFAULT   N connect -+     TLS GLOBAL DEFAULT UND errno -+    FUNC GLOBAL DEFAULT UND exit -+    FUNC GLOBAL DEFAULT UND fclose -+    FUNC   WEAK DEFAULT   N fcntl -+    FUNC   WEAK DEFAULT   N flockfile -+    FUNC GLOBAL DEFAULT UND fopen -+    FUNC GLOBAL DEFAULT   N fork -+    FUNC GLOBAL DEFAULT UND free -+    FUNC   WEAK DEFAULT   N fsync -+    FUNC   WEAK DEFAULT   N ftrylockfile -+    FUNC   WEAK DEFAULT   N funlockfile -+    FUNC GLOBAL DEFAULT UND getrlimit -+     TLS GLOBAL DEFAULT UND h_errno -+    FUNC GLOBAL DEFAULT UND link -     FUNC GLOBAL DEFAULT   N longjmp -+    FUNC   WEAK DEFAULT   N lseek -+    FUNC   WEAK DEFAULT   N lseek64 -+    FUNC GLOBAL DEFAULT UND malloc -+    FUNC GLOBAL DEFAULT UND memcpy -+    FUNC GLOBAL DEFAULT UND mempcpy -+    FUNC GLOBAL DEFAULT UND memset -+    FUNC GLOBAL DEFAULT UND mktemp -+    FUNC GLOBAL DEFAULT UND mmap -+    FUNC GLOBAL DEFAULT UND mprotect -+    FUNC   WEAK DEFAULT   N msync -+    FUNC GLOBAL DEFAULT UND munmap -+    FUNC   WEAK DEFAULT   N nanosleep -+    FUNC   WEAK DEFAULT   N open -+    FUNC   WEAK DEFAULT   N open64 -+    FUNC   WEAK DEFAULT   N pause -+    FUNC   WEAK DEFAULT   N pread -+    FUNC   WEAK DEFAULT   N pread64 -+    FUNC GLOBAL DEFAULT   N pthread_atfork -     FUNC GLOBAL DEFAULT   N pthread_attr_destroy -+    FUNC GLOBAL DEFAULT   N pthread_attr_getaffinity_np -     FUNC GLOBAL DEFAULT   N pthread_attr_getdetachstate --    FUNC   WEAK DEFAULT   N pthread_attr_getguardsize -+    FUNC GLOBAL DEFAULT   N pthread_attr_getguardsize -     FUNC GLOBAL DEFAULT   N pthread_attr_getinheritsched -     FUNC GLOBAL DEFAULT   N pthread_attr_getschedparam -     FUNC GLOBAL DEFAULT   N pthread_attr_getschedpolicy -     FUNC GLOBAL DEFAULT   N pthread_attr_getscope --    FUNC   WEAK DEFAULT   N pthread_attr_getstack --    FUNC   WEAK DEFAULT   N pthread_attr_getstacksize -+    FUNC GLOBAL DEFAULT   N pthread_attr_getstack -+    FUNC GLOBAL DEFAULT   N pthread_attr_getstackaddr -+    FUNC GLOBAL DEFAULT   N pthread_attr_getstacksize -     FUNC GLOBAL DEFAULT   N pthread_attr_init -+    FUNC GLOBAL DEFAULT   N pthread_attr_setaffinity_np -     FUNC GLOBAL DEFAULT   N pthread_attr_setdetachstate --    FUNC   WEAK DEFAULT   N pthread_attr_setguardsize -+    FUNC GLOBAL DEFAULT   N pthread_attr_setguardsize -     FUNC GLOBAL DEFAULT   N pthread_attr_setinheritsched -     FUNC GLOBAL DEFAULT   N pthread_attr_setschedparam -     FUNC GLOBAL DEFAULT   N pthread_attr_setschedpolicy -     FUNC GLOBAL DEFAULT   N pthread_attr_setscope --    FUNC   WEAK DEFAULT   N pthread_attr_setstack --    FUNC   WEAK DEFAULT   N pthread_attr_setstacksize -+    FUNC GLOBAL DEFAULT   N pthread_attr_setstack -+    FUNC GLOBAL DEFAULT   N pthread_attr_setstackaddr -+    FUNC GLOBAL DEFAULT   N pthread_attr_setstacksize -     FUNC GLOBAL DEFAULT   N pthread_barrier_destroy -     FUNC GLOBAL DEFAULT   N pthread_barrier_init -     FUNC GLOBAL DEFAULT   N pthread_barrier_wait -     FUNC GLOBAL DEFAULT   N pthread_barrierattr_destroy -+    FUNC GLOBAL DEFAULT   N pthread_barrierattr_getpshared -     FUNC GLOBAL DEFAULT   N pthread_barrierattr_init -     FUNC GLOBAL DEFAULT   N pthread_barrierattr_setpshared -     FUNC GLOBAL DEFAULT   N pthread_cancel -@@ -193,36 +178,49 @@ -     FUNC GLOBAL DEFAULT   N pthread_cond_timedwait -     FUNC GLOBAL DEFAULT   N pthread_cond_wait -     FUNC GLOBAL DEFAULT   N pthread_condattr_destroy -+    FUNC GLOBAL DEFAULT   N pthread_condattr_getclock -     FUNC GLOBAL DEFAULT   N pthread_condattr_getpshared -     FUNC GLOBAL DEFAULT   N pthread_condattr_init -+    FUNC GLOBAL DEFAULT   N pthread_condattr_setclock -     FUNC GLOBAL DEFAULT   N pthread_condattr_setpshared -     FUNC GLOBAL DEFAULT   N pthread_create -     FUNC GLOBAL DEFAULT   N pthread_detach -     FUNC GLOBAL DEFAULT   N pthread_equal -     FUNC GLOBAL DEFAULT   N pthread_exit -+    FUNC GLOBAL DEFAULT   N pthread_getaffinity_np -     FUNC GLOBAL DEFAULT   N pthread_getattr_np --    FUNC   WEAK DEFAULT   N pthread_getconcurrency -+    FUNC GLOBAL DEFAULT   N pthread_getconcurrency -+    FUNC GLOBAL DEFAULT   N pthread_getcpuclockid -     FUNC GLOBAL DEFAULT   N pthread_getschedparam -     FUNC GLOBAL DEFAULT   N pthread_getspecific -     FUNC GLOBAL DEFAULT   N pthread_join -     FUNC GLOBAL DEFAULT   N pthread_key_create -     FUNC GLOBAL DEFAULT   N pthread_key_delete -     FUNC GLOBAL DEFAULT   N pthread_kill --    FUNC   WEAK DEFAULT   N pthread_kill_other_threads_np -+    FUNC GLOBAL DEFAULT   N pthread_kill_other_threads_np -+    FUNC GLOBAL DEFAULT   N pthread_mutex_consistent_np -     FUNC GLOBAL DEFAULT   N pthread_mutex_destroy -+    FUNC GLOBAL DEFAULT   N pthread_mutex_getprioceiling -     FUNC GLOBAL DEFAULT   N pthread_mutex_init -     FUNC GLOBAL DEFAULT   N pthread_mutex_lock -+    FUNC GLOBAL DEFAULT   N pthread_mutex_setprioceiling -     FUNC GLOBAL DEFAULT   N pthread_mutex_timedlock -     FUNC GLOBAL DEFAULT   N pthread_mutex_trylock -     FUNC GLOBAL DEFAULT   N pthread_mutex_unlock -     FUNC GLOBAL DEFAULT   N pthread_mutexattr_destroy -     FUNC   WEAK DEFAULT   N pthread_mutexattr_getkind_np --    FUNC   WEAK DEFAULT   N pthread_mutexattr_getpshared --    FUNC   WEAK DEFAULT   N pthread_mutexattr_gettype -+    FUNC GLOBAL DEFAULT   N pthread_mutexattr_getprioceiling -+    FUNC GLOBAL DEFAULT   N pthread_mutexattr_getprotocol -+    FUNC GLOBAL DEFAULT   N pthread_mutexattr_getpshared -+    FUNC GLOBAL DEFAULT   N pthread_mutexattr_getrobust_np -+    FUNC GLOBAL DEFAULT   N pthread_mutexattr_gettype -     FUNC GLOBAL DEFAULT   N pthread_mutexattr_init -     FUNC   WEAK DEFAULT   N pthread_mutexattr_setkind_np --    FUNC   WEAK DEFAULT   N pthread_mutexattr_setpshared --    FUNC   WEAK DEFAULT   N pthread_mutexattr_settype -+    FUNC GLOBAL DEFAULT   N pthread_mutexattr_setprioceiling -+    FUNC GLOBAL DEFAULT   N pthread_mutexattr_setprotocol -+    FUNC GLOBAL DEFAULT   N pthread_mutexattr_setpshared -+    FUNC GLOBAL DEFAULT   N pthread_mutexattr_setrobust_np -+    FUNC GLOBAL DEFAULT   N pthread_mutexattr_settype -     FUNC GLOBAL DEFAULT   N pthread_once -     FUNC GLOBAL DEFAULT   N pthread_rwlock_destroy -     FUNC GLOBAL DEFAULT   N pthread_rwlock_init -@@ -240,27 +238,35 @@ -     FUNC GLOBAL DEFAULT   N pthread_rwlockattr_setkind_np -     FUNC GLOBAL DEFAULT   N pthread_rwlockattr_setpshared -     FUNC GLOBAL DEFAULT   N pthread_self -+    FUNC GLOBAL DEFAULT   N pthread_setaffinity_np -     FUNC GLOBAL DEFAULT   N pthread_setcancelstate -     FUNC GLOBAL DEFAULT   N pthread_setcanceltype --    FUNC   WEAK DEFAULT   N pthread_setconcurrency --    FUNC GLOBAL DEFAULT   N pthread_setegid_np --    FUNC GLOBAL DEFAULT   N pthread_seteuid_np --    FUNC GLOBAL DEFAULT   N pthread_setgid_np --    FUNC GLOBAL DEFAULT   N pthread_setregid_np --    FUNC GLOBAL DEFAULT   N pthread_setresgid_np --    FUNC GLOBAL DEFAULT   N pthread_setresuid_np --    FUNC GLOBAL DEFAULT   N pthread_setreuid_np -+    FUNC GLOBAL DEFAULT   N pthread_setconcurrency -     FUNC GLOBAL DEFAULT   N pthread_setschedparam -+    FUNC GLOBAL DEFAULT   N pthread_setschedprio -     FUNC GLOBAL DEFAULT   N pthread_setspecific --    FUNC GLOBAL DEFAULT   N pthread_setuid_np -     FUNC GLOBAL DEFAULT   N pthread_sigmask --    FUNC   WEAK DEFAULT   N pthread_spin_destroy --    FUNC   WEAK DEFAULT   N pthread_spin_init --    FUNC   WEAK DEFAULT   N pthread_spin_lock --    FUNC   WEAK DEFAULT   N pthread_spin_trylock --    FUNC   WEAK DEFAULT   N pthread_spin_unlock -+    FUNC GLOBAL DEFAULT   N pthread_spin_destroy -+    FUNC GLOBAL DEFAULT   N pthread_spin_init -+    FUNC GLOBAL DEFAULT   N pthread_spin_lock -+    FUNC GLOBAL DEFAULT   N pthread_spin_trylock -+    FUNC GLOBAL DEFAULT   N pthread_spin_unlock -     FUNC GLOBAL DEFAULT   N pthread_testcancel -+    FUNC GLOBAL DEFAULT   N pthread_timedjoin_np -+    FUNC GLOBAL DEFAULT   N pthread_tryjoin_np -+    FUNC GLOBAL DEFAULT   N pthread_yield -+    FUNC   WEAK DEFAULT   N pwrite -+    FUNC   WEAK DEFAULT   N pwrite64 -     FUNC GLOBAL DEFAULT   N raise -+    FUNC   WEAK DEFAULT   N read -+    FUNC GLOBAL DEFAULT UND realloc -+    FUNC   WEAK DEFAULT   N recv -+    FUNC   WEAK DEFAULT   N recvfrom -+    FUNC   WEAK DEFAULT   N recvmsg -+    FUNC GLOBAL DEFAULT UND sched_get_priority_max -+    FUNC GLOBAL DEFAULT UND sched_get_priority_min -+    FUNC GLOBAL DEFAULT UND sched_setparam -+    FUNC GLOBAL DEFAULT UND sched_yield -     FUNC GLOBAL DEFAULT   N sem_close -     FUNC GLOBAL DEFAULT   N sem_destroy -     FUNC GLOBAL DEFAULT   N sem_getvalue -@@ -271,8 +277,23 @@ -     FUNC GLOBAL DEFAULT   N sem_trywait -     FUNC GLOBAL DEFAULT   N sem_unlink -     FUNC GLOBAL DEFAULT   N sem_wait --    FUNC GLOBAL DEFAULT   N set_eflags --    FUNC GLOBAL DEFAULT   N sigaction --    FUNC GLOBAL DEFAULT   N siglongjmp --    FUNC GLOBAL DEFAULT   N sigwait --    FUNC GLOBAL DEFAULT   N testandset -+    FUNC   WEAK DEFAULT   N send -+    FUNC   WEAK DEFAULT   N sendmsg -+    FUNC   WEAK DEFAULT   N sendto -+    FUNC   WEAK DEFAULT   N sigaction -+    FUNC   WEAK DEFAULT   N siglongjmp -+    FUNC   WEAK DEFAULT   N sigwait -+    FUNC GLOBAL DEFAULT UND sscanf -+    FUNC GLOBAL DEFAULT UND strcmp -+    FUNC GLOBAL DEFAULT UND strlen -+    FUNC GLOBAL DEFAULT   N system -+    FUNC   WEAK DEFAULT   N tcdrain -+    FUNC GLOBAL DEFAULT UND tdelete -+    FUNC GLOBAL DEFAULT UND tfind -+    FUNC GLOBAL DEFAULT UND tsearch -+    FUNC GLOBAL DEFAULT UND twalk -+    FUNC GLOBAL DEFAULT UND unlink -+    FUNC   WEAK DEFAULT   N vfork -+    FUNC   WEAK DEFAULT   N wait -+    FUNC   WEAK DEFAULT   N waitpid -+    FUNC   WEAK DEFAULT   N write - - -And uclibc_unrefd.lst is: - -__compare_and_swap -__flockfilelist -__fresetlockfiles -__funlockfilelist -__linuxthreads_create_event -__linuxthreads_death_event -__linuxthreads_initial_report_events -__linuxthreads_pthread_key_2ndlevel_size -__linuxthreads_pthread_keys_max -__linuxthreads_pthread_sizeof_descr -__linuxthreads_pthread_threads_max -__linuxthreads_reap_event -__linuxthreads_version -__pthread_alt_lock -__pthread_alt_timedlock -__pthread_alt_unlock -__pthread_attr_destroy -__pthread_attr_getdetachstate -__pthread_attr_getguardsize -__pthread_attr_getinheritsched -__pthread_attr_getschedparam -__pthread_attr_getschedpolicy -__pthread_attr_getscope -__pthread_attr_getstack -__pthread_attr_getstacksize -__pthread_attr_init -__pthread_attr_setdetachstate -__pthread_attr_setguardsize -__pthread_attr_setinheritsched -__pthread_attr_setschedparam -__pthread_attr_setschedpolicy -__pthread_attr_setscope -__pthread_attr_setstack -__pthread_attr_setstacksize -__pthread_barrierattr_getpshared -__pthread_compare_and_swap -__pthread_cond_broadcast -__pthread_cond_destroy -__pthread_cond_init -__pthread_cond_signal -__pthread_cond_timedwait -__pthread_cond_wait -__pthread_condattr_destroy -__pthread_condattr_init -__pthread_create -__pthread_destroy_specifics -__pthread_do_exit -__pthread_equal -__pthread_exit_code -__pthread_exit_requested -__pthread_find_self -__pthread_functions -__pthread_getconcurrency -__pthread_getschedparam -__pthread_getspecific -__pthread_handles -__pthread_handles_num -__pthread_has_cas -__pthread_init_max_stacksize -__pthread_initial_thread -__pthread_initial_thread_bos -__pthread_initialize_manager -__pthread_internal_tsd_address -__pthread_internal_tsd_get -__pthread_internal_tsd_set -__pthread_key_create -__pthread_kill_other_threads_np -__pthread_last_event -__pthread_lock -__pthread_main_thread -__pthread_manager -__pthread_manager_adjust_prio -__pthread_manager_event -__pthread_manager_reader -__pthread_manager_request -__pthread_manager_sighandler -__pthread_manager_thread -__pthread_manager_thread_bos -__pthread_manager_thread_tos -__pthread_max_stacksize -__pthread_mutex_destroy -__pthread_mutex_timedlock -__pthread_mutexattr_destroy -__pthread_mutexattr_getkind_np -__pthread_mutexattr_getpshared -__pthread_mutexattr_gettype -__pthread_mutexattr_init -__pthread_mutexattr_setkind_np -__pthread_mutexattr_setpshared -__pthread_mutexattr_settype -__pthread_nonstandard_stacks -__pthread_null_sighandler -__pthread_offsetof_descr -__pthread_offsetof_pid -__pthread_once_fork_child -__pthread_once_fork_parent -__pthread_once_fork_prepare -__pthread_perform_cleanup -__pthread_raise -__pthread_reset_main_thread -__pthread_restart_new -__pthread_rwlock_destroy -__pthread_rwlock_init -__pthread_rwlock_rdlock -__pthread_rwlock_timedrdlock -__pthread_rwlock_timedwrlock -__pthread_rwlock_tryrdlock -__pthread_rwlock_trywrlock -__pthread_rwlock_unlock -__pthread_rwlock_wrlock -__pthread_rwlockattr_destroy -__pthread_self -__pthread_setcancelstate -__pthread_setcanceltype -__pthread_setconcurrency -__pthread_setschedparam -__pthread_setspecific -__pthread_sig_cancel -__pthread_sig_debug -__pthread_sig_restart -__pthread_sigaction -__pthread_sighandler -__pthread_sighandler_rt -__pthread_sigwait -__pthread_sizeof_handle -__pthread_smp_kernel -__pthread_spin_destroy -__pthread_spin_init -__pthread_spin_lock -__pthread_spin_trylock -__pthread_spin_unlock -__pthread_thread_self -__pthread_threads_debug -__pthread_threads_events -__pthread_threads_max -__pthread_timedsuspend_new -__pthread_unlock -__pthread_wait_for_restart_signal -__register_atfork -__sigaction -__sighandler -compare_and_swap_is_available -get_eflags -pthread_attr_getguardsize -pthread_attr_getstack -pthread_attr_getstacksize -pthread_attr_setguardsize -pthread_attr_setstack -pthread_attr_setstacksize -pthread_barrier_destroy -pthread_barrier_init -pthread_barrier_wait -pthread_barrierattr_destroy -pthread_barrierattr_init -pthread_barrierattr_setpshared -pthread_cancel -pthread_condattr_getpshared -pthread_condattr_setpshared -pthread_create -pthread_detach -pthread_getattr_np -pthread_getconcurrency -pthread_getspecific -pthread_join -pthread_key_create -pthread_key_delete -pthread_kill -pthread_kill_other_threads_np -pthread_mutex_timedlock -pthread_mutexattr_destroy -pthread_mutexattr_getkind_np -pthread_mutexattr_getpshared -pthread_mutexattr_gettype -pthread_mutexattr_init -pthread_mutexattr_setkind_np -pthread_mutexattr_setpshared -pthread_mutexattr_settype -pthread_rwlock_destroy -pthread_rwlock_init -pthread_rwlock_rdlock -pthread_rwlock_timedrdlock -pthread_rwlock_timedwrlock -pthread_rwlock_tryrdlock -pthread_rwlock_trywrlock -pthread_rwlock_unlock -pthread_rwlock_wrlock -pthread_rwlockattr_destroy -pthread_rwlockattr_getkind_np -pthread_rwlockattr_getpshared -pthread_rwlockattr_init -pthread_rwlockattr_setkind_np -pthread_rwlockattr_setpshared -pthread_setconcurrency -pthread_setegid_np -pthread_seteuid_np -pthread_setgid_np -pthread_setregid_np -pthread_setresgid_np -pthread_setresuid_np -pthread_setreuid_np -pthread_setspecific -pthread_setuid_np -pthread_sigmask -pthread_spin_destroy -pthread_spin_init -pthread_spin_lock -pthread_spin_trylock -pthread_spin_unlock -pthread_testcancel -sem_close -sem_destroy -sem_getvalue -sem_init -sem_open -sem_post -sem_timedwait -sem_trywait -sem_unlink -sem_wait -set_eflags -testandset diff --git a/docs/threads.txt b/docs/threads.txt deleted file mode 100644 index 182f1be7e..000000000 --- a/docs/threads.txt +++ /dev/null @@ -1,56 +0,0 @@ -uClibc thread-safety analysis - -Things that are still known to be needed for thread safety: - -        none - - - - -Things that might be nice, but are not required: - -        getnetent_r             <desired, but not required for SuSv3> -        gethostent_r            <desired, but not required for SuSv3> -        getprotoent_r           <desired, but not required for SuSv3> -        getnetbyname_r          <desired, but not required for SuSv3> -        getnetbyaddr_r          <desired, but not required for SuSv3> - - - - - -Functions that use static data and may still need locking: - - -        -------------------------------------------------------------------- - -        libc/inet/rpc/rpc_thread.c: - -        __rpc_thread_variables is currently disabled, since thread -        local storage seems to not be correctly specified as  -        weak functions. - -        -------------------------------------------------------------------- - -        unistd/getpass.c: - -        static char buf[PWD_BUFFER_SIZE]; - -        getpass                 <fix required>                          <--- - -        NOTE: This function returns a pointer to a static data structure. -        This seems like it requires an _r version of this function.  Glibc -        does the same thing.  Oops!  So much for thread-safe glibc! - -        -------------------------------------------------------------------- - -        unistd/sysconf.c: - -        static long int ret_vals[_UCLIBC_SYSCONF_NUM_VALID_ARGS]; - -        find_or_add_in_table    <fix required?>                         <--- -        main                    <fix required?>                         <--- - -        NOTE: I'm not sure if this needs to be made reentrant... - -        -------------------------------------------------------------------- diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch b/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch index 4e147734c..81ce813a9 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch @@ -65,21 +65,18 @@ libpthread_linux_CSRC += pthread_attr_getaffinity.c pthread_attr_setaffinity.c \  	pt-tempname.c \  	pthread_sigqueue.c \  	lowlevellock.c lowlevelrobustlock.c -#	pt-sleep.c pt-fork.c sigtimedwait.c sigwaitinfo.c sigwait.c  libpthread_linux_SSRC := #ptw-close.S ptw-open.S ptw-waitid.S ptw-waidpid.S ptw-write.S  libc_linux_CSRC += libc_pthread_init.c libc_multiple_threads.c		\  	register-atfork.c unregister-atfork.c getpid.c		\  	raise.c jmp-unwind.c libc-lowlevellock.c -	#sleep.c  librt_linux_CSRC += mq_notify.c timer_create.c timer_delete.c		\  	timer_getoverr.c timer_gettime.c timer_routines.c		\  	timer_settime.c -# These provide both a cancellable and a not cancellable implementation -libc_linux_SSRC = #close.S open.S write.S read.S waitpid.S +libc_linux_SSRC =  libc_linux_SSRC := $(filter-out $(libc_linux_arch_SSRC-OMIT),$(libc_linux_SSRC))  libpthread_linux_CSRC := $(filter-out $(notdir $(libpthread_linux_arch_OBJS:.o=.c)),$(libpthread_linux_CSRC)) @@ -99,7 +96,6 @@ endif  libpthread-a-y += $(if $(DOPIC),$(libpthread_linux_OBJS:.o=.os),$(libpthread_linux_OBJS))  libpthread-so-y += $(libpthread_linux_OBJS:.o=.oS)  libpthread-so-y += $(libpthread_linux_OUT)/pt-raise.oS -#libpthread-nomulti-y += $(libpthread_linux_OBJS)  libc_linux_OBJS := $(libc_linux_arch_OBJS)  libc_linux_OBJS += $(patsubst %.c,$(libpthread_linux_OUT)/%.o,$(libc_linux_CSRC)) @@ -110,7 +106,6 @@ endif  libc-static-y += $(libc_linux_OBJS)  libc-shared-y += $(libc_linux_OBJS:.o=.oS) -#libc-nomulti-y += $(libc_linux_OBJS)  librt_linux_OBJS := $(librt_linux_arch_OBJS)  librt_linux_OBJS += $(patsubst %.c,$(libpthread_linux_OUT)/%.o,$(librt_linux_CSRC)) diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/close.S b/libpthread/nptl/sysdeps/unix/sysv/linux/close.S deleted file mode 100644 index cf50a1eae..000000000 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/close.S +++ /dev/null @@ -1,21 +0,0 @@ -#include <sysdep-cancel.h> - -/* -extern int __close_nocancel (int) attribute_hidden; -*/ -#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt - - -PSEUDO (__libc_close, close, 1) -ret -PSEUDO_END(__libc_close) - -libc_hidden_def (__close_nocancel) -libc_hidden_def (__libc_close) -weak_alias (__libc_close, __close) -libc_hidden_weak (__close) -weak_alias (__libc_close, close) -libc_hidden_weak (close) - - -#endif diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/open.S b/libpthread/nptl/sysdeps/unix/sysv/linux/open.S deleted file mode 100644 index 486686a22..000000000 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/open.S +++ /dev/null @@ -1,21 +0,0 @@ -#include <sysdep-cancel.h> - -/* -extern int __open_nocancel (const char *, int, ...) attribute_hidden; -*/ -#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt - -PSEUDO (__libc_open, open, 3) -ret -PSEUDO_END(__libc_open) - -libc_hidden_def (__open_nocancel) -libc_hidden_def (__libc_open) -weak_alias (__libc_open, __open) -libc_hidden_weak (__open) -weak_alias (__libc_open, open) -libc_hidden_weak (open) - - - -#endif diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/pt-fork.c b/libpthread/nptl/sysdeps/unix/sysv/linux/pt-fork.c deleted file mode 100644 index 69839cb5f..000000000 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/pt-fork.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. -   This file is part of the GNU C Library. -   Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. - -   The GNU C Library is free software; you can redistribute it and/or -   modify it under the terms of the GNU Lesser General Public -   License as published by the Free Software Foundation; either -   version 2.1 of the License, or (at your option) any later version. - -   The GNU C Library is distributed in the hope that it will be useful, -   but WITHOUT ANY WARRANTY; without even the implied warranty of -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU -   Lesser General Public License for more details. - -   You should have received a copy of the GNU Lesser General Public -   License along with the GNU C Library; if not, see -   <http://www.gnu.org/licenses/>.  */ - -#include <unistd.h> - -#if 0 -static pid_t -__fork (void) -{ -  return __libc_fork (); -} -strong_alias (__fork, fork) -#endif diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/pt-sleep.c b/libpthread/nptl/sysdeps/unix/sysv/linux/pt-sleep.c deleted file mode 100644 index 9e948adce..000000000 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/pt-sleep.c +++ /dev/null @@ -1,2 +0,0 @@ -#include <pthreadP.h> -#include <../../../../../../libc/unistd/sleep.c> diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/read.S b/libpthread/nptl/sysdeps/unix/sysv/linux/read.S deleted file mode 100644 index d3adfa84c..000000000 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/read.S +++ /dev/null @@ -1,19 +0,0 @@ -#include <sysdep-cancel.h> - -/* -extern int __read_nocancel (int, void *, size_t) attribute_hidden; -*/ -#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt - -PSEUDO (__libc_read, read, 3) -ret -PSEUDO_END(__libc_read) - -libc_hidden_def (__read_nocancel) -libc_hidden_def (__libc_read) -weak_alias (__libc_read, __read) -libc_hidden_weak (__read) -weak_alias (__libc_read, read) -libc_hidden_weak (read) - -#endif diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sigtimedwait.c b/libpthread/nptl/sysdeps/unix/sysv/linux/sigtimedwait.c deleted file mode 100644 index 4cd5f5498..000000000 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/sigtimedwait.c +++ /dev/null @@ -1,87 +0,0 @@ -/* Copyright (C) 1997,1998,2000,2002,2003,2004 Free Software Foundation, Inc. -   This file is part of the GNU C Library. - -   The GNU C Library is free software; you can redistribute it and/or -   modify it under the terms of the GNU Lesser General Public -   License as published by the Free Software Foundation; either -   version 2.1 of the License, or (at your option) any later version. - -   The GNU C Library is distributed in the hope that it will be useful, -   but WITHOUT ANY WARRANTY; without even the implied warranty of -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU -   Lesser General Public License for more details. - -   You should have received a copy of the GNU Lesser General Public -   License along with the GNU C Library; if not, see -   <http://www.gnu.org/licenses/>.  */ - -#include <pthreadP.h> -#include <errno.h> -#include <signal.h> -#include <string.h> - -#include <sysdep-cancel.h> -#include <sys/syscall.h> - -#ifdef __NR_rt_sigtimedwait - -static int -do_sigtimedwait (const sigset_t *set, siginfo_t *info, -		 const struct timespec *timeout) -{ -#ifdef SIGCANCEL -  sigset_t tmpset; -  if (set != NULL -      && (__builtin_expect (__sigismember (set, SIGCANCEL), 0) -# ifdef SIGSETXID -	  || __builtin_expect (__sigismember (set, SIGSETXID), 0) -# endif -	  )) -    { -      /* Create a temporary mask without the bit for SIGCANCEL set.  */ -      // We are not copying more than we have to. -      memcpy (&tmpset, set, _NSIG / 8); -      __sigdelset (&tmpset, SIGCANCEL); -# ifdef SIGSETXID -      __sigdelset (&tmpset, SIGSETXID); -# endif -      set = &tmpset; -    } -#endif - -    /* XXX The size argument hopefully will have to be changed to the -       real size of the user-level sigset_t.  */ -  int result = INLINE_SYSCALL (rt_sigtimedwait, 4, set, -			       info, timeout, _NSIG / 8); - -  /* The kernel generates a SI_TKILL code in si_code in case tkill is -     used.  tkill is transparently used in raise().  Since having -     SI_TKILL as a code is useful in general we fold the results -     here.  */ -  if (result != -1 && info != NULL && info->si_code == SI_TKILL) -    info->si_code = SI_USER; - -  return result; -} - - -/* Return any pending signal or wait for one for the given time.  */ -int -__sigtimedwait (const sigset_t *set, siginfo_t *info, -		const struct timespec *timeout) -{ -  if (SINGLE_THREAD_P) -    return do_sigtimedwait (set, info, timeout); - -  int oldtype = LIBC_CANCEL_ASYNC (); - -  /* XXX The size argument hopefully will have to be changed to the -     real size of the user-level sigset_t.  */ -  int result = do_sigtimedwait (set, info, timeout); - -  LIBC_CANCEL_RESET (oldtype); - -  return result; -} -weak_alias (__sigtimedwait, sigtimedwait) -#endif diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sigwait.c b/libpthread/nptl/sysdeps/unix/sysv/linux/sigwait.c deleted file mode 100644 index bde0a9292..000000000 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/sigwait.c +++ /dev/null @@ -1,2 +0,0 @@ -#include <pthreadP.h> -#include "../../../../../../libc/signal/sigwait.c" diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sigwaitinfo.c b/libpthread/nptl/sysdeps/unix/sysv/linux/sigwaitinfo.c deleted file mode 100644 index 3ad330d21..000000000 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/sigwaitinfo.c +++ /dev/null @@ -1,87 +0,0 @@ -/* Copyright (C) 1997,1998,2000,2002,2003,2004 Free Software Foundation, Inc. -   This file is part of the GNU C Library. - -   The GNU C Library is free software; you can redistribute it and/or -   modify it under the terms of the GNU Lesser General Public -   License as published by the Free Software Foundation; either -   version 2.1 of the License, or (at your option) any later version. - -   The GNU C Library is distributed in the hope that it will be useful, -   but WITHOUT ANY WARRANTY; without even the implied warranty of -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU -   Lesser General Public License for more details. - -   You should have received a copy of the GNU Lesser General Public -   License along with the GNU C Library; if not, see -   <http://www.gnu.org/licenses/>.  */ - -#include <pthreadP.h> -#include <errno.h> -#include <signal.h> -#define __need_NULL -#include <stddef.h> -#include <string.h> - -#include <sysdep-cancel.h> -#include <sys/syscall.h> - -#ifdef __NR_rt_sigtimedwait - -static int -do_sigwaitinfo (const sigset_t *set, siginfo_t *info) -{ -#ifdef SIGCANCEL -  sigset_t tmpset; -  if (set != NULL -      && (__builtin_expect (__sigismember (set, SIGCANCEL), 0) -# ifdef SIGSETXID -	  || __builtin_expect (__sigismember (set, SIGSETXID), 0) -# endif -	  )) -    { -      /* Create a temporary mask without the bit for SIGCANCEL set.  */ -      // We are not copying more than we have to. -      memcpy (&tmpset, set, _NSIG / 8); -      __sigdelset (&tmpset, SIGCANCEL); -# ifdef SIGSETXID -      __sigdelset (&tmpset, SIGSETXID); -# endif -      set = &tmpset; -    } -#endif - -  /* XXX The size argument hopefully will have to be changed to the -     real size of the user-level sigset_t.  */ -  int result = INLINE_SYSCALL (rt_sigtimedwait, 4, set, -			       info, NULL, _NSIG / 8); - -  /* The kernel generates a SI_TKILL code in si_code in case tkill is -     used.  tkill is transparently used in raise().  Since having -     SI_TKILL as a code is useful in general we fold the results -     here.  */ -  if (result != -1 && info != NULL && info->si_code == SI_TKILL) -    info->si_code = SI_USER; - -  return result; -} - - -/* Return any pending signal or wait for one for the given time.  */ -int -__sigwaitinfo (const sigset_t *set, siginfo_t *info) -{ -  if (SINGLE_THREAD_P) -    return do_sigwaitinfo (set, info); - -  int oldtype = LIBC_CANCEL_ASYNC (); - -  /* XXX The size argument hopefully will have to be changed to the -     real size of the user-level sigset_t.  */ -  int result = do_sigwaitinfo (set, info); - -  LIBC_CANCEL_RESET (oldtype); - -  return result; -} -weak_alias (__sigwaitinfo, sigwaitinfo) -#endif diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sleep.c b/libpthread/nptl/sysdeps/unix/sysv/linux/sleep.c deleted file mode 100644 index 9e948adce..000000000 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/sleep.c +++ /dev/null @@ -1,2 +0,0 @@ -#include <pthreadP.h> -#include <../../../../../../libc/unistd/sleep.c> diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/waitpid.S b/libpthread/nptl/sysdeps/unix/sysv/linux/waitpid.S deleted file mode 100644 index 52abb27f0..000000000 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/waitpid.S +++ /dev/null @@ -1,23 +0,0 @@ -#include <sysdep-cancel.h> - -#ifndef __NR_waitpid -#error Makefile error: No NR_waitpid on this arch -#endif - -/* -extern pid_t __waitpid_nocancel (pid_t, int *, int) attribute_hidden; -*/ -#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt - - -PSEUDO (__waitpid, waitpid, 3) -ret -PSEUDO_END(__waitpid) - -libc_hidden_def (__waitpid) -weak_alias (__waitpid, waitpid) -libc_hidden_weak (waitpid) -weak_alias (__waitpid, __libc_waitpid) -libc_hidden_weak (__libc_waitpid) - -#endif diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/write.S b/libpthread/nptl/sysdeps/unix/sysv/linux/write.S deleted file mode 100644 index 43de3320d..000000000 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/write.S +++ /dev/null @@ -1,19 +0,0 @@ -#include <sysdep-cancel.h> - -/* -extern int __write_nocancel (int, const void *, size_t) attribute_hidden; -*/ -#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt - -PSEUDO (__libc_write, write, 3) -ret -PSEUDO_END(__libc_write) - -libc_hidden_def (__write_nocancel) -libc_hidden_def (__libc_write) -weak_alias (__libc_write, __write) -libc_hidden_weak (__write) -weak_alias (__libc_write, write) -libc_hidden_weak (write) - -#endif  | 
