Up front, I'd like to make a few apologies: 1) I am sorry for the length of this email. 2) Although some very valid opinions have been expressed, I respectfully have to disagree. This email will hopefully strengthen my position. The problem: (If you just want kse threads to work for you properly, just apply the patch at the end of this email and try it out). kse threads on amd64 doesn't work with gnome. It crashes applications here and there. gnome-terminal is essentially unusable. I strongly believe this to be a binding issue. I've examined rtld and I'm satisfied that it is behaving appropriately, so I took a long hard look at how FreeBSD has implemented the pthread interface, how it is being used, and how people expect it to behave. FreeBSD pthread interface: I have no idea why, but on FreeBSD all the pthread functions are weak symbols. I have not beed given a very satisfactory answer though I have tried to understand and continue to look for enlightenment. To me, this means that there is no authorative answer to "who is the primary provider" of the weak symbols in libc. It is instead the first occurrence of the weak symbol that takes precedence. This means that if the program itself doesn't link with the pthread library yet some other library uses it then you are pretty much hosed. I've seen just this happen with plenty of gnome applications. It also means that there is an ordering dependency that I'm not sure is reasonable to enforce. Other pthread interfaces: I don't know what Linux does now, but when we first built pthreads for Linux we made the pthread library symbols definitive. They always were the overriding authority. It was modelled after what I saw in Solaris. So, taking select as an example, libc.so - internal select called something else with a weak reference to used symbol. libpthread.so - select essentially provided directly in the library or is a strong reference to an internal version. i.e. libc weak, libpthread strong. This allows for any ordering of libraries during linking. Very good (IMHO) and has other benifits as well - like security. Application issues: As mentioned above, gnome is not very usable as things stand. I had to move to libc_r to get any stability at all. Besides gnome, I have found issues with apache2/php4, wine, and bash with nss_ldap to name a few. Security: Actually, having an authorative provider of core libc functions would be very helpful to eliminating a potential security risk. An application that is linked with libpthread wouldn't be able to dlopen some other library that could potentially take over libc weak functionality. Additionally, some sort of non-threaded library could be created that blocked a program from overriding libc routines with thread versions whenever it was linked directly to the main application. Proof is in the pudding: What can I say? Some people will insist that the gnome applications are broken somehow or that what I'm saying doesn't conform to their view as how the thread libraries should work. I admit I do not fully understand the dogma behind making them all weak symbols, but so far nothing I've heard trumps the fact that doing this makes everything work. Since applying the patch below, my amd64 system has worked flawlessly with gnome and libpthread.so.1. It has not shown any of the problems that have been haunting me since I switched over from running in i386 mode. The patch: A patch to apply in /usr/src/lib/libpthread is included at the end of this email. I haven't bothered doing it for libc_r even though it should be done. Apache2/php4 would have issues, for instance, with libc_r without making the symbols strong references. Anyone else that wants to use gnome right now under amd64 might want to try out this patch. Cheers, Sean diff -c3pr thread.orig/thr_accept.c thread/thr_accept.c *** thread.orig/thr_accept.c Tue Dec 9 15:40:27 2003 --- thread/thr_accept.c Mon Jun 7 17:48:59 2004 *************** __FBSDID("$FreeBSD: src/lib/libpthread/t *** 32,39 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(__accept, accept); - int __accept(int s, struct sockaddr *addr, socklen_t *addrlen) { --- 32,37 ---- *************** __accept(int s, struct sockaddr *addr, s *** 47,49 **** --- 45,49 ---- return (ret); } + + __strong_reference(__accept, accept); diff -c3pr thread.orig/thr_aio_suspend.c thread/thr_aio_suspend.c *** thread.orig/thr_aio_suspend.c Mon Dec 8 18:20:56 2003 --- thread/thr_aio_suspend.c Mon Jun 7 17:49:10 2004 *************** *** 33,40 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(_aio_suspend, aio_suspend); - int _aio_suspend(const struct aiocb * const iocbs[], int niocb, const struct timespec *timeout) --- 33,38 ---- *************** _aio_suspend(const struct aiocb * const *** 49,51 **** --- 47,50 ---- return (ret); } + __strong_reference(_aio_suspend, aio_suspend); diff -c3pr thread.orig/thr_atfork.c thread/thr_atfork.c *** thread.orig/thr_atfork.c Tue Nov 4 19:42:10 2003 --- thread/thr_atfork.c Mon Jun 7 17:49:21 2004 *************** *** 31,38 **** #include <sys/queue.h> #include "thr_private.h" - __weak_reference(_pthread_atfork, pthread_atfork); - int _pthread_atfork(void (*prepare)(void), void (*parent)(void), void (*child)(void)) --- 31,36 ---- *************** _pthread_atfork(void (*prepare)(void), v *** 54,56 **** --- 52,55 ---- return (0); } + __strong_reference(_pthread_atfork, pthread_atfork); diff -c3pr thread.orig/thr_attr_destroy.c thread/thr_attr_destroy.c *** thread.orig/thr_attr_destroy.c Mon Sep 16 01:45:33 2002 --- thread/thr_attr_destroy.c Mon Jun 7 17:49:31 2004 *************** *** 36,43 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(_pthread_attr_destroy, pthread_attr_destroy); - int _pthread_attr_destroy(pthread_attr_t *attr) { --- 36,41 ---- *************** _pthread_attr_destroy(pthread_attr_t *at *** 60,62 **** --- 58,62 ---- } return(ret); } + + __strong_reference(_pthread_attr_destroy, pthread_attr_destroy); diff -c3pr thread.orig/thr_attr_get_np.c thread/thr_attr_get_np.c *** thread.orig/thr_attr_get_np.c Sun Jul 6 21:28:23 2003 --- thread/thr_attr_get_np.c Mon Jun 7 17:49:41 2004 *************** *** 31,38 **** #include <pthread_np.h> #include "thr_private.h" - __weak_reference(_pthread_attr_get_np, pthread_attr_get_np); - int _pthread_attr_get_np(pthread_t pid, pthread_attr_t *dst) { --- 31,36 ---- *************** _pthread_attr_get_np(pthread_t pid, pthr *** 52,54 **** --- 50,54 ---- return (0); } + + __strong_reference(_pthread_attr_get_np, pthread_attr_get_np); diff -c3pr thread.orig/thr_attr_getdetachstate.c thread/thr_attr_getdetachstate.c *** thread.orig/thr_attr_getdetachstate.c Mon Sep 16 01:45:33 2002 --- thread/thr_attr_getdetachstate.c Mon Jun 7 17:49:50 2004 *************** *** 35,42 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(_pthread_attr_getdetachstate, pthread_attr_getdetachstate); - int _pthread_attr_getdetachstate(const pthread_attr_t *attr, int *detachstate) { --- 35,40 ---- *************** _pthread_attr_getdetachstate(const pthre *** 57,59 **** --- 55,59 ---- } return(ret); } + + __strong_reference(_pthread_attr_getdetachstate, pthread_attr_getdetachstate); diff -c3pr thread.orig/thr_attr_getguardsize.c thread/thr_attr_getguardsize.c *** thread.orig/thr_attr_getguardsize.c Mon Sep 16 01:45:33 2002 --- thread/thr_attr_getguardsize.c Mon Jun 7 17:50:04 2004 *************** *** 33,40 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(_pthread_attr_getguardsize, pthread_attr_getguardsize); - int _pthread_attr_getguardsize(const pthread_attr_t *attr, size_t *guardsize) { --- 33,38 ---- *************** _pthread_attr_getguardsize(const pthread *** 50,52 **** --- 48,52 ---- } return(ret); } + + __strong_reference(_pthread_attr_getguardsize, pthread_attr_getguardsize); diff -c3pr thread.orig/thr_attr_getinheritsched.c thread/thr_attr_getinheritsched.c *** thread.orig/thr_attr_getinheritsched.c Mon Sep 16 01:45:33 2002 --- thread/thr_attr_getinheritsched.c Mon Jun 7 17:50:13 2004 *************** *** 35,42 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(_pthread_attr_getinheritsched, pthread_attr_getinheritsched); - int _pthread_attr_getinheritsched(const pthread_attr_t *attr, int *sched_inherit) { --- 35,40 ---- *************** _pthread_attr_getinheritsched(const pthr *** 49,51 **** --- 47,51 ---- return(ret); } + + __strong_reference(_pthread_attr_getinheritsched, pthread_attr_getinheritsched); diff -c3pr thread.orig/thr_attr_getschedparam.c thread/thr_attr_getschedparam.c *** thread.orig/thr_attr_getschedparam.c Mon Sep 16 01:45:33 2002 --- thread/thr_attr_getschedparam.c Mon Jun 7 17:50:21 2004 *************** *** 35,42 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(_pthread_attr_getschedparam, pthread_attr_getschedparam); - int _pthread_attr_getschedparam(const pthread_attr_t *attr, struct sched_param *param) { --- 35,40 ---- *************** _pthread_attr_getschedparam(const pthrea *** 49,51 **** --- 47,51 ---- return(ret); } + + __strong_reference(_pthread_attr_getschedparam, pthread_attr_getschedparam); diff -c3pr thread.orig/thr_attr_getschedpolicy.c thread/thr_attr_getschedpolicy.c *** thread.orig/thr_attr_getschedpolicy.c Mon Sep 16 01:45:33 2002 --- thread/thr_attr_getschedpolicy.c Mon Jun 7 17:50:29 2004 *************** *** 35,42 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(_pthread_attr_getschedpolicy, pthread_attr_getschedpolicy); - int _pthread_attr_getschedpolicy(const pthread_attr_t *attr, int *policy) { --- 35,40 ---- *************** _pthread_attr_getschedpolicy(const pthre *** 49,51 **** --- 47,51 ---- return(ret); } + + __strong_reference(_pthread_attr_getschedpolicy, pthread_attr_getschedpolicy); diff -c3pr thread.orig/thr_attr_getscope.c thread/thr_attr_getscope.c *** thread.orig/thr_attr_getscope.c Mon Sep 16 01:45:33 2002 --- thread/thr_attr_getscope.c Mon Jun 7 17:50:38 2004 *************** *** 35,42 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(_pthread_attr_getscope, pthread_attr_getscope); - int _pthread_attr_getscope(const pthread_attr_t *attr, int *contentionscope) { --- 35,40 ---- *************** _pthread_attr_getscope(const pthread_att *** 52,54 **** --- 50,54 ---- return(ret); } + + __strong_reference(_pthread_attr_getscope, pthread_attr_getscope); diff -c3pr thread.orig/thr_attr_getstack.c thread/thr_attr_getstack.c *** thread.orig/thr_attr_getstack.c Mon Feb 10 00:48:03 2003 --- thread/thr_attr_getstack.c Mon Jun 7 17:50:46 2004 *************** *** 35,42 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(_pthread_attr_getstack, pthread_attr_getstack); - int _pthread_attr_getstack(const pthread_attr_t * __restrict attr, void ** __restrict stackaddr, --- 35,40 ---- *************** _pthread_attr_getstack(const pthread_att *** 57,59 **** --- 55,58 ---- return(ret); } + __strong_reference(_pthread_attr_getstack, pthread_attr_getstack); diff -c3pr thread.orig/thr_attr_getstackaddr.c thread/thr_attr_getstackaddr.c *** thread.orig/thr_attr_getstackaddr.c Mon Sep 16 01:45:34 2002 --- thread/thr_attr_getstackaddr.c Mon Jun 7 17:50:54 2004 *************** *** 35,42 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(_pthread_attr_getstackaddr, pthread_attr_getstackaddr); - int _pthread_attr_getstackaddr(const pthread_attr_t *attr, void **stackaddr) { --- 35,40 ---- *************** _pthread_attr_getstackaddr(const pthread *** 52,54 **** --- 50,54 ---- } return(ret); } + + __strong_reference(_pthread_attr_getstackaddr, pthread_attr_getstackaddr); diff -c3pr thread.orig/thr_attr_getstacksize.c thread/thr_attr_getstacksize.c *** thread.orig/thr_attr_getstacksize.c Mon Sep 16 01:45:34 2002 --- thread/thr_attr_getstacksize.c Mon Jun 7 17:51:02 2004 *************** *** 35,42 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(_pthread_attr_getstacksize, pthread_attr_getstacksize); - int _pthread_attr_getstacksize(const pthread_attr_t *attr, size_t *stacksize) { --- 35,40 ---- *************** _pthread_attr_getstacksize(const pthread *** 52,54 **** --- 50,54 ---- } return(ret); } + + __strong_reference(_pthread_attr_getstacksize, pthread_attr_getstacksize); diff -c3pr thread.orig/thr_attr_init.c thread/thr_attr_init.c *** thread.orig/thr_attr_init.c Thu Jul 17 19:46:55 2003 --- thread/thr_attr_init.c Mon Jun 7 17:51:11 2004 *************** *** 37,44 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(_pthread_attr_init, pthread_attr_init); - int _pthread_attr_init(pthread_attr_t *attr) { --- 37,42 ---- *************** _pthread_attr_init(pthread_attr_t *attr) *** 61,63 **** --- 59,63 ---- } return(ret); } + + __strong_reference(_pthread_attr_init, pthread_attr_init); diff -c3pr thread.orig/thr_attr_setcreatesuspend_np.c thread/thr_attr_setcreatesuspend_np.c *** thread.orig/thr_attr_setcreatesuspend_np.c Thu Sep 25 06:53:49 2003 --- thread/thr_attr_setcreatesuspend_np.c Mon Jun 7 17:51:20 2004 *************** *** 35,42 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(_pthread_attr_setcreatesuspend_np, pthread_attr_setcreatesuspend_np); - int _pthread_attr_setcreatesuspend_np(pthread_attr_t *attr) { --- 35,40 ---- *************** _pthread_attr_setcreatesuspend_np(pthrea *** 50,52 **** --- 48,52 ---- } return(ret); } + + __strong_reference(_pthread_attr_setcreatesuspend_np, pthread_attr_setcreatesuspend_np); diff -c3pr thread.orig/thr_attr_setdetachstate.c thread/thr_attr_setdetachstate.c *** thread.orig/thr_attr_setdetachstate.c Mon Sep 16 01:45:34 2002 --- thread/thr_attr_setdetachstate.c Mon Jun 7 17:51:28 2004 *************** *** 35,42 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(_pthread_attr_setdetachstate, pthread_attr_setdetachstate); - int _pthread_attr_setdetachstate(pthread_attr_t *attr, int detachstate) { --- 35,40 ---- *************** _pthread_attr_setdetachstate(pthread_att *** 59,61 **** --- 57,61 ---- } return(ret); } + + __strong_reference(_pthread_attr_setdetachstate, pthread_attr_setdetachstate); diff -c3pr thread.orig/thr_attr_setguardsize.c thread/thr_attr_setguardsize.c *** thread.orig/thr_attr_setguardsize.c Sun Sep 14 15:39:44 2003 --- thread/thr_attr_setguardsize.c Mon Jun 7 17:51:39 2004 *************** *** 34,41 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(_pthread_attr_setguardsize, pthread_attr_setguardsize); - int _pthread_attr_setguardsize(pthread_attr_t *attr, size_t guardsize) { --- 34,39 ---- *************** _pthread_attr_setguardsize(pthread_attr_ *** 51,53 **** --- 49,53 ---- } return(ret); } + + __strong_reference(_pthread_attr_setguardsize, pthread_attr_setguardsize); diff -c3pr thread.orig/thr_attr_setinheritsched.c thread/thr_attr_setinheritsched.c *** thread.orig/thr_attr_setinheritsched.c Sun Sep 14 15:28:13 2003 --- thread/thr_attr_setinheritsched.c Mon Jun 7 17:51:48 2004 *************** *** 35,42 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(_pthread_attr_setinheritsched, pthread_attr_setinheritsched); - int _pthread_attr_setinheritsched(pthread_attr_t *attr, int sched_inherit) { --- 35,40 ---- *************** _pthread_attr_setinheritsched(pthread_at *** 52,54 **** --- 50,54 ---- return(ret); } + + __strong_reference(_pthread_attr_setinheritsched, pthread_attr_setinheritsched); diff -c3pr thread.orig/thr_attr_setschedparam.c thread/thr_attr_setschedparam.c *** thread.orig/thr_attr_setschedparam.c Thu Apr 17 22:04:15 2003 --- thread/thr_attr_setschedparam.c Mon Jun 7 17:51:58 2004 *************** *** 35,42 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(_pthread_attr_setschedparam, pthread_attr_setschedparam); - int _pthread_attr_setschedparam(pthread_attr_t *attr, const struct sched_param *param) { --- 35,40 ---- *************** _pthread_attr_setschedparam(pthread_attr *** 55,57 **** --- 53,57 ---- return(ret); } + + __strong_reference(_pthread_attr_setschedparam, pthread_attr_setschedparam); diff -c3pr thread.orig/thr_attr_setschedpolicy.c thread/thr_attr_setschedpolicy.c *** thread.orig/thr_attr_setschedpolicy.c Mon Sep 16 01:45:34 2002 --- thread/thr_attr_setschedpolicy.c Mon Jun 7 17:52:13 2004 *************** *** 35,42 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(_pthread_attr_setschedpolicy, pthread_attr_setschedpolicy); - int _pthread_attr_setschedpolicy(pthread_attr_t *attr, int policy) { --- 35,40 ---- *************** _pthread_attr_setschedpolicy(pthread_att *** 51,53 **** --- 49,53 ---- return(ret); } + + __strong_reference(_pthread_attr_setschedpolicy, pthread_attr_setschedpolicy); diff -c3pr thread.orig/thr_attr_setscope.c thread/thr_attr_setscope.c *** thread.orig/thr_attr_setscope.c Sun Sep 14 15:32:28 2003 --- thread/thr_attr_setscope.c Mon Jun 7 17:52:24 2004 *************** *** 35,42 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(_pthread_attr_setscope, pthread_attr_setscope); - int _pthread_attr_setscope(pthread_attr_t *attr, int contentionscope) { --- 35,40 ---- *************** _pthread_attr_setscope(pthread_attr_t *a *** 55,57 **** --- 53,57 ---- } return (ret); } + + __strong_reference(_pthread_attr_setscope, pthread_attr_setscope); diff -c3pr thread.orig/thr_attr_setstack.c thread/thr_attr_setstack.c *** thread.orig/thr_attr_setstack.c Mon Feb 10 00:48:03 2003 --- thread/thr_attr_setstack.c Mon Jun 7 17:52:33 2004 *************** *** 35,42 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(_pthread_attr_setstack, pthread_attr_setstack); - int _pthread_attr_setstack(pthread_attr_t *attr, void *stackaddr, size_t stacksize) --- 35,40 ---- *************** _pthread_attr_setstack(pthread_attr_t *a *** 56,58 **** --- 54,57 ---- return(ret); } + __strong_reference(_pthread_attr_setstack, pthread_attr_setstack); diff -c3pr thread.orig/thr_attr_setstackaddr.c thread/thr_attr_setstackaddr.c *** thread.orig/thr_attr_setstackaddr.c Mon Sep 16 01:45:34 2002 --- thread/thr_attr_setstackaddr.c Mon Jun 7 17:52:47 2004 *************** *** 35,42 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(_pthread_attr_setstackaddr, pthread_attr_setstackaddr); - int _pthread_attr_setstackaddr(pthread_attr_t *attr, void *stackaddr) { --- 35,40 ---- *************** _pthread_attr_setstackaddr(pthread_attr_ *** 52,54 **** --- 50,54 ---- } return(ret); } + + __strong_reference(_pthread_attr_setstackaddr, pthread_attr_setstackaddr); diff -c3pr thread.orig/thr_attr_setstacksize.c thread/thr_attr_setstacksize.c *** thread.orig/thr_attr_setstacksize.c Mon Sep 16 01:45:34 2002 --- thread/thr_attr_setstacksize.c Mon Jun 7 17:52:55 2004 *************** *** 35,42 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(_pthread_attr_setstacksize, pthread_attr_setstacksize); - int _pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize) { --- 35,40 ---- *************** _pthread_attr_setstacksize(pthread_attr_ *** 52,54 **** --- 50,54 ---- } return(ret); } + + __strong_reference(_pthread_attr_setstacksize, pthread_attr_setstacksize); diff -c3pr thread.orig/thr_barrier.c thread/thr_barrier.c *** thread.orig/thr_barrier.c Thu Sep 4 07:06:43 2003 --- thread/thr_barrier.c Mon Jun 7 18:08:22 2004 *************** *** 33,42 **** #include "un-namespace.h" #include "thr_private.h" - __weak_reference(_pthread_barrier_init, pthread_barrier_init); - __weak_reference(_pthread_barrier_wait, pthread_barrier_wait); - __weak_reference(_pthread_barrier_destroy, pthread_barrier_destroy); - int _pthread_barrier_destroy(pthread_barrier_t *barrier) { --- 33,38 ---- *************** _pthread_barrier_destroy(pthread_barrier *** 58,64 **** int _pthread_barrier_init(pthread_barrier_t *barrier, ! const pthread_barrierattr_t *attr, int count) { pthread_barrier_t bar; int ret; --- 54,60 ---- int _pthread_barrier_init(pthread_barrier_t *barrier, ! const pthread_barrierattr_t *attr, unsigned count) { pthread_barrier_t bar; int ret; *************** _pthread_barrier_wait(pthread_barrier_t *** 120,122 **** --- 116,122 ---- _pthread_mutex_unlock(&bar->b_lock); return (ret); } + + __strong_reference(_pthread_barrier_init, pthread_barrier_init); + __strong_reference(_pthread_barrier_wait, pthread_barrier_wait); + __strong_reference(_pthread_barrier_destroy, pthread_barrier_destroy); diff -c3pr thread.orig/thr_barrierattr.c thread/thr_barrierattr.c *** thread.orig/thr_barrierattr.c Thu Sep 4 07:06:43 2003 --- thread/thr_barrierattr.c Mon Jun 7 17:53:46 2004 *************** *** 33,45 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(_pthread_barrierattr_destroy, pthread_barrierattr_destroy); - __weak_reference(_pthread_barrierattr_init, pthread_barrierattr_init); - __weak_reference(_pthread_barrierattr_setpshared, - pthread_barrierattr_setpshared); - __weak_reference(_pthread_barrierattr_getpshared, - pthread_barrierattr_getpshared); - int _pthread_barrierattr_destroy(pthread_barrierattr_t *attr) { --- 33,38 ---- *************** _pthread_barrierattr_setpshared(pthread_ *** 91,93 **** --- 84,93 ---- (*attr)->pshared = pshared; return (0); } + + __strong_reference(_pthread_barrierattr_destroy, pthread_barrierattr_destroy); + __strong_reference(_pthread_barrierattr_init, pthread_barrierattr_init); + __strong_reference(_pthread_barrierattr_setpshared, + pthread_barrierattr_setpshared); + __strong_reference(_pthread_barrierattr_getpshared, + pthread_barrierattr_getpshared); diff -c3pr thread.orig/thr_cancel.c thread/thr_cancel.c *** thread.orig/thr_cancel.c Mon Dec 8 18:20:56 2003 --- thread/thr_cancel.c Mon Jun 7 17:54:07 2004 *************** *** 6,16 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(_pthread_cancel, pthread_cancel); - __weak_reference(_pthread_setcancelstate, pthread_setcancelstate); - __weak_reference(_pthread_setcanceltype, pthread_setcanceltype); - __weak_reference(_pthread_testcancel, pthread_testcancel); - static inline int checkcancel(struct pthread *curthread) { --- 6,11 ---- *************** _thr_finish_cancellation(void *arg) *** 292,294 **** --- 287,294 ---- } THR_THREAD_UNLOCK(curthread, curthread); } + + __strong_reference(_pthread_cancel, pthread_cancel); + __strong_reference(_pthread_setcancelstate, pthread_setcancelstate); + __strong_reference(_pthread_setcanceltype, pthread_setcanceltype); + __strong_reference(_pthread_testcancel, pthread_testcancel); diff -c3pr thread.orig/thr_clean.c thread/thr_clean.c *** thread.orig/thr_clean.c Thu Apr 17 22:04:15 2003 --- thread/thr_clean.c Mon Jun 7 17:54:19 2004 *************** *** 37,45 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(_pthread_cleanup_push, pthread_cleanup_push); - __weak_reference(_pthread_cleanup_pop, pthread_cleanup_pop); - void _pthread_cleanup_push(void (*routine) (void *), void *routine_arg) { --- 37,42 ---- *************** _pthread_cleanup_pop(int execute) *** 70,72 **** --- 67,72 ---- free(old); } } + + __strong_reference(_pthread_cleanup_push, pthread_cleanup_push); + __strong_reference(_pthread_cleanup_pop, pthread_cleanup_pop); diff -c3pr thread.orig/thr_close.c thread/thr_close.c *** thread.orig/thr_close.c Mon Dec 8 18:20:56 2003 --- thread/thr_close.c Mon Jun 7 17:54:27 2004 *************** *** 39,46 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(__close, close); - int __close(int fd) { --- 39,44 ---- *************** __close(int fd) *** 53,55 **** --- 51,55 ---- return (ret); } + + __strong_reference(__close, close); diff -c3pr thread.orig/thr_concurrency.c thread/thr_concurrency.c *** thread.orig/thr_concurrency.c Sat Mar 13 21:24:27 2004 --- thread/thr_concurrency.c Mon Jun 7 17:54:39 2004 *************** *** 42,50 **** static int level = 0; - __weak_reference(_pthread_getconcurrency, pthread_getconcurrency); - __weak_reference(_pthread_setconcurrency, pthread_setconcurrency); - int _pthread_getconcurrency(void) { --- 42,47 ---- *************** _thr_setmaxconcurrency(void) *** 163,165 **** --- 160,164 ---- return (ret); } + __strong_reference(_pthread_getconcurrency, pthread_getconcurrency); + __strong_reference(_pthread_setconcurrency, pthread_setconcurrency); diff -c3pr thread.orig/thr_cond.c thread/thr_cond.c *** thread.orig/thr_cond.c Mon Dec 8 18:20:56 2003 --- thread/thr_cond.c Mon Jun 7 17:55:06 2004 *************** static inline void cond_queue_enq(pthre *** 53,66 **** * versions are not and are provided for libc internal usage (which * shouldn't introduce cancellation points). */ - __weak_reference(__pthread_cond_wait, pthread_cond_wait); - __weak_reference(__pthread_cond_timedwait, pthread_cond_timedwait); - - __weak_reference(_pthread_cond_init, pthread_cond_init); - __weak_reference(_pthread_cond_destroy, pthread_cond_destroy); - __weak_reference(_pthread_cond_signal, pthread_cond_signal); - __weak_reference(_pthread_cond_broadcast, pthread_cond_broadcast); - int _pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *cond_attr) --- 53,58 ---- *************** cond_queue_enq(pthread_cond_t cond, stru *** 814,816 **** --- 806,816 ---- THR_CONDQ_SET(pthread); pthread->data.cond = cond; } + + __strong_reference(__pthread_cond_wait, pthread_cond_wait); + __strong_reference(__pthread_cond_timedwait, pthread_cond_timedwait); + + __strong_reference(_pthread_cond_init, pthread_cond_init); + __strong_reference(_pthread_cond_destroy, pthread_cond_destroy); + __strong_reference(_pthread_cond_signal, pthread_cond_signal); + __strong_reference(_pthread_cond_broadcast, pthread_cond_broadcast); diff -c3pr thread.orig/thr_condattr_destroy.c thread/thr_condattr_destroy.c *** thread.orig/thr_condattr_destroy.c Mon Sep 16 01:45:34 2002 --- thread/thr_condattr_destroy.c Mon Jun 7 17:55:17 2004 *************** *** 36,43 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(_pthread_condattr_destroy, pthread_condattr_destroy); - int _pthread_condattr_destroy(pthread_condattr_t *attr) { --- 36,41 ---- *************** _pthread_condattr_destroy(pthread_condat *** 51,53 **** --- 49,53 ---- } return(ret); } + + __strong_reference(_pthread_condattr_destroy, pthread_condattr_destroy); diff -c3pr thread.orig/thr_condattr_init.c thread/thr_condattr_init.c *** thread.orig/thr_condattr_init.c Thu Apr 17 22:04:15 2003 --- thread/thr_condattr_init.c Mon Jun 7 17:55:25 2004 *************** *** 37,44 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(_pthread_condattr_init, pthread_condattr_init); - int _pthread_condattr_init(pthread_condattr_t *attr) { --- 37,42 ---- *************** _pthread_condattr_init(pthread_condattr_ *** 56,58 **** --- 54,58 ---- } return (ret); } + + __strong_reference(_pthread_condattr_init, pthread_condattr_init); diff -c3pr thread.orig/thr_connect.c thread/thr_connect.c *** thread.orig/thr_connect.c Tue Dec 9 15:40:27 2003 --- thread/thr_connect.c Mon Jun 7 17:55:33 2004 *************** __FBSDID("$FreeBSD: src/lib/libpthread/t *** 32,39 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(__connect, connect); - int __connect(int fd, const struct sockaddr *name, socklen_t namelen) { --- 32,37 ---- *************** __connect(int fd, const struct sockaddr *** 47,49 **** --- 45,49 ---- return (ret); } + + __strong_reference(__connect, connect); diff -c3pr thread.orig/thr_creat.c thread/thr_creat.c *** thread.orig/thr_creat.c Mon Dec 8 18:20:56 2003 --- thread/thr_creat.c Mon Jun 7 17:55:46 2004 *************** *** 35,42 **** extern int __creat(const char *, mode_t); - __weak_reference(___creat, creat); - int ___creat(const char *path, mode_t mode) { --- 35,40 ---- *************** ___creat(const char *path, mode_t mode) *** 53,55 **** --- 51,55 ---- return ret; } + + __strong_reference(___creat, creat); diff -c3pr thread.orig/thr_create.c thread/thr_create.c *** thread.orig/thr_create.c Thu Jan 8 07:37:09 2004 --- thread/thr_create.c Mon Jun 7 17:55:55 2004 *************** static void free_stack(struct pthread_at *** 64,71 **** static void thread_start(struct pthread *curthread, void *(*start_routine) (void *), void *arg); - __weak_reference(_pthread_create, pthread_create); - /* * Some notes on new thread creation and first time initializion * to enable multi-threading. --- 64,69 ---- *************** thread_start(struct pthread *curthread, *** 355,357 **** --- 353,357 ---- /* This point should never be reached. */ PANIC("Thread has resumed after exit"); } + + __strong_reference(_pthread_create, pthread_create); diff -c3pr thread.orig/thr_detach.c thread/thr_detach.c *** thread.orig/thr_detach.c Tue Jul 22 19:11:07 2003 --- thread/thr_detach.c Mon Jun 7 17:56:04 2004 *************** *** 37,44 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(_pthread_detach, pthread_detach); - int _pthread_detach(pthread_t pthread) { --- 37,42 ---- *************** _pthread_detach(pthread_t pthread) *** 115,117 **** --- 113,117 ---- /* Return the completion status: */ return (rval); } + + __strong_reference(_pthread_detach, pthread_detach); diff -c3pr thread.orig/thr_equal.c thread/thr_equal.c *** thread.orig/thr_equal.c Mon Sep 16 01:45:34 2002 --- thread/thr_equal.c Mon Jun 7 17:56:11 2004 *************** *** 34,44 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(_pthread_equal, pthread_equal); - int _pthread_equal(pthread_t t1, pthread_t t2) { /* Compare the two thread pointers: */ return (t1 == t2); } --- 34,44 ---- #include <pthread.h> #include "thr_private.h" int _pthread_equal(pthread_t t1, pthread_t t2) { /* Compare the two thread pointers: */ return (t1 == t2); } + + __strong_reference(_pthread_equal, pthread_equal); diff -c3pr thread.orig/thr_exit.c thread/thr_exit.c *** thread.orig/thr_exit.c Sun Sep 14 15:52:16 2003 --- thread/thr_exit.c Mon Jun 7 17:56:20 2004 *************** *** 42,49 **** void _pthread_exit(void *status); - __weak_reference(_pthread_exit, pthread_exit); - void _thr_exit(char *fname, int lineno, char *msg) { --- 42,47 ---- *************** _pthread_exit(void *status) *** 147,149 **** --- 145,149 ---- /* This point should not be reached. */ PANIC("Dead thread has resumed"); } + + __strong_reference(_pthread_exit, pthread_exit); diff -c3pr thread.orig/thr_fcntl.c thread/thr_fcntl.c *** thread.orig/thr_fcntl.c Mon Dec 8 18:20:56 2003 --- thread/thr_fcntl.c Mon Jun 7 17:56:29 2004 *************** *** 38,45 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(__fcntl, fcntl); - int __fcntl(int fd, int cmd,...) { --- 38,43 ---- *************** __fcntl(int fd, int cmd,...) *** 76,78 **** --- 74,78 ---- return (ret); } + + __strong_reference(__fcntl, fcntl); diff -c3pr thread.orig/thr_fork.c thread/thr_fork.c *** thread.orig/thr_fork.c Wed Nov 5 10:18:45 2003 --- thread/thr_fork.c Mon Jun 7 17:56:39 2004 *************** *** 49,56 **** */ #pragma weak __malloc_lock - __weak_reference(_fork, fork); - pid_t _fork(void) { --- 49,54 ---- *************** _fork(void) *** 122,124 **** --- 120,124 ---- /* Return the process ID: */ return (ret); } + + __strong_reference(_fork, fork); diff -c3pr thread.orig/thr_fsync.c thread/thr_fsync.c *** thread.orig/thr_fsync.c Mon Dec 8 18:20:56 2003 --- thread/thr_fsync.c Mon Jun 7 17:56:47 2004 *************** *** 35,42 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(__fsync, fsync); - int __fsync(int fd) { --- 35,40 ---- *************** __fsync(int fd) *** 49,51 **** --- 47,51 ---- return (ret); } + + __strong_reference(__fsync, fsync); diff -c3pr thread.orig/thr_getprio.c thread/thr_getprio.c *** thread.orig/thr_getprio.c Mon Sep 16 01:45:34 2002 --- thread/thr_getprio.c Mon Jun 7 17:56:56 2004 *************** *** 35,42 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(_pthread_getprio, pthread_getprio); - int _pthread_getprio(pthread_t pthread) { --- 35,40 ---- *************** _pthread_getprio(pthread_t pthread) *** 54,56 **** --- 52,56 ---- /* Return the thread priority or an error status: */ return (ret); } + + __strong_reference(_pthread_getprio, pthread_getprio); diff -c3pr thread.orig/thr_getschedparam.c thread/thr_getschedparam.c *** thread.orig/thr_getschedparam.c Sun Jul 6 21:28:23 2003 --- thread/thr_getschedparam.c Mon Jun 7 17:57:03 2004 *************** *** 35,42 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(_pthread_getschedparam, pthread_getschedparam); - int _pthread_getschedparam(pthread_t pthread, int *policy, struct sched_param *param) --- 35,40 ---- *************** _pthread_getschedparam(pthread_t pthread *** 73,75 **** --- 71,75 ---- } return (ret); } + + __strong_reference(_pthread_getschedparam, pthread_getschedparam); diff -c3pr thread.orig/thr_info.c thread/thr_info.c *** thread.orig/thr_info.c Sun Sep 21 17:40:23 2003 --- thread/thr_info.c Mon Jun 7 18:08:53 2004 *************** *** 46,53 **** static void dump_thread(int fd, pthread_t pthread, int long_version); - __weak_reference(_pthread_set_name_np, pthread_set_name_np); - struct s_thread_info { enum pthread_state state; char *name; --- 46,51 ---- *************** dump_thread(int fd, pthread_t pthread, i *** 212,218 **** /* Set the thread name for debug: */ void ! _pthread_set_name_np(pthread_t thread, char *name) { /* Check if the caller has specified a valid thread: */ if (thread != NULL && thread->magic == THR_MAGIC) { --- 210,216 ---- /* Set the thread name for debug: */ void ! _pthread_set_name_np(pthread_t thread, const char *name) { /* Check if the caller has specified a valid thread: */ if (thread != NULL && thread->magic == THR_MAGIC) { *************** _pthread_set_name_np(pthread_t thread, c *** 223,225 **** --- 221,225 ---- thread->name = strdup(name); } } + + __strong_reference(_pthread_set_name_np, pthread_set_name_np); diff -c3pr thread.orig/thr_join.c thread/thr_join.c *** thread.orig/thr_join.c Mon Dec 8 18:20:56 2003 --- thread/thr_join.c Mon Jun 7 17:57:21 2004 *************** *** 35,42 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(_pthread_join, pthread_join); - int _pthread_join(pthread_t pthread, void **thread_return) { --- 35,40 ---- *************** _pthread_join(pthread_t pthread, void ** *** 160,162 **** --- 158,162 ---- /* Return the completion status: */ return (ret); } + + __strong_reference(_pthread_join, pthread_join); diff -c3pr thread.orig/thr_kill.c thread/thr_kill.c *** thread.orig/thr_kill.c Sat Jun 28 02:55:02 2003 --- thread/thr_kill.c Mon Jun 7 17:57:29 2004 *************** *** 36,43 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(_pthread_kill, pthread_kill); - int _pthread_kill(pthread_t pthread, int sig) { --- 36,41 ---- *************** _pthread_kill(pthread_t pthread, int sig *** 64,66 **** --- 62,66 ---- /* Return the completion status: */ return (ret); } + + __strong_reference(_pthread_kill, pthread_kill); diff -c3pr thread.orig/thr_main_np.c thread/thr_main_np.c *** thread.orig/thr_main_np.c Thu Apr 17 22:04:16 2003 --- thread/thr_main_np.c Mon Jun 7 17:57:41 2004 *************** *** 31,38 **** #include <pthread_np.h> #include "thr_private.h" - __weak_reference(_pthread_main_np, pthread_main_np); - /* * Provide the equivelant to Solaris thr_main() function */ --- 31,36 ---- *************** _pthread_main_np() *** 45,47 **** --- 43,47 ---- else return (pthread_equal(pthread_self(), _thr_initial) ? 1 : 0); } + + __strong_reference(_pthread_main_np, pthread_main_np); diff -c3pr thread.orig/thr_mattr_init.c thread/thr_mattr_init.c *** thread.orig/thr_mattr_init.c Thu Apr 17 22:04:16 2003 --- thread/thr_mattr_init.c Mon Jun 7 17:57:51 2004 *************** *** 37,44 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(_pthread_mutexattr_init, pthread_mutexattr_init); - int _pthread_mutexattr_init(pthread_mutexattr_t *attr) { --- 37,42 ---- *************** _pthread_mutexattr_init(pthread_mutexatt *** 56,58 **** --- 54,58 ---- } return (ret); } + + __strong_reference(_pthread_mutexattr_init, pthread_mutexattr_init); diff -c3pr thread.orig/thr_mattr_kind_np.c thread/thr_mattr_kind_np.c *** thread.orig/thr_mattr_kind_np.c Mon Sep 16 01:45:35 2002 --- thread/thr_mattr_kind_np.c Mon Jun 7 17:58:11 2004 *************** *** 35,45 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(_pthread_mutexattr_setkind_np, pthread_mutexattr_setkind_np); - __weak_reference(_pthread_mutexattr_getkind_np, pthread_mutexattr_getkind_np); - __weak_reference(_pthread_mutexattr_gettype, pthread_mutexattr_gettype); - __weak_reference(_pthread_mutexattr_settype, pthread_mutexattr_settype); - int _pthread_mutexattr_setkind_np(pthread_mutexattr_t *attr, int kind) { --- 35,40 ---- *************** _pthread_mutexattr_gettype(pthread_mutex *** 95,97 **** --- 90,97 ---- } return ret; } + + __strong_reference(_pthread_mutexattr_setkind_np, pthread_mutexattr_setkind_np); + __strong_reference(_pthread_mutexattr_getkind_np, pthread_mutexattr_getkind_np); + __strong_reference(_pthread_mutexattr_gettype, pthread_mutexattr_gettype); + __strong_reference(_pthread_mutexattr_settype, pthread_mutexattr_settype); diff -c3pr thread.orig/thr_msync.c thread/thr_msync.c *** thread.orig/thr_msync.c Mon Dec 8 18:20:56 2003 --- thread/thr_msync.c Mon Jun 7 17:58:24 2004 *************** *** 11,18 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(__msync, msync); - int __msync(void *addr, size_t len, int flags) { --- 11,16 ---- *************** __msync(void *addr, size_t len, int flag *** 31,33 **** --- 29,33 ---- return ret; } + + __strong_reference(__msync, msync); diff -c3pr thread.orig/thr_multi_np.c thread/thr_multi_np.c *** thread.orig/thr_multi_np.c Thu May 23 21:32:28 2002 --- thread/thr_multi_np.c Mon Jun 7 17:58:35 2004 *************** *** 34,41 **** #include <pthread.h> #include <pthread_np.h> - __weak_reference(_pthread_multi_np, pthread_multi_np); - int _pthread_multi_np() { --- 34,39 ---- *************** _pthread_multi_np() *** 48,50 **** --- 46,50 ---- pthread_resume_all_np(); return (0); } + + __strong_reference(_pthread_multi_np, pthread_multi_np); diff -c3pr thread.orig/thr_mutex.c thread/thr_mutex.c *** thread.orig/thr_mutex.c Fri Jan 16 19:09:57 2004 --- thread/thr_mutex.c Mon Jun 7 17:59:07 2004 *************** static struct pthread_mutex_attr static_ *** 91,108 **** PTHREAD_MUTEXATTR_STATIC_INITIALIZER; static pthread_mutexattr_t static_mattr = &static_mutex_attr; - /* Single underscore versions provided for libc internal usage: */ - __weak_reference(__pthread_mutex_lock, pthread_mutex_lock); - __weak_reference(__pthread_mutex_timedlock, pthread_mutex_timedlock); - __weak_reference(__pthread_mutex_trylock, pthread_mutex_trylock); - - /* No difference between libc and application usage of these: */ - __weak_reference(_pthread_mutex_init, pthread_mutex_init); - __weak_reference(_pthread_mutex_destroy, pthread_mutex_destroy); - __weak_reference(_pthread_mutex_unlock, pthread_mutex_unlock); - - - int _pthread_mutex_init(pthread_mutex_t *mutex, const pthread_mutexattr_t *mutex_attr) --- 91,96 ---- *************** mutex_queue_enq(pthread_mutex_t mutex, p *** 1756,1758 **** --- 1744,1756 ---- } pthread->sflags |= THR_FLAGS_IN_SYNCQ; } + + /* Single underscore versions provided for libc internal usage: */ + __strong_reference(__pthread_mutex_lock, pthread_mutex_lock); + __strong_reference(__pthread_mutex_timedlock, pthread_mutex_timedlock); + __strong_reference(__pthread_mutex_trylock, pthread_mutex_trylock); + + /* No difference between libc and application usage of these: */ + __strong_reference(_pthread_mutex_init, pthread_mutex_init); + __strong_reference(_pthread_mutex_destroy, pthread_mutex_destroy); + __strong_reference(_pthread_mutex_unlock, pthread_mutex_unlock); diff -c3pr thread.orig/thr_mutex_prioceiling.c thread/thr_mutex_prioceiling.c *** thread.orig/thr_mutex_prioceiling.c Sun Jul 6 21:28:23 2003 --- thread/thr_mutex_prioceiling.c Mon Jun 7 17:59:30 2004 *************** *** 37,47 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(_pthread_mutexattr_getprioceiling, pthread_mutexattr_getprioceiling); - __weak_reference(_pthread_mutexattr_setprioceiling, pthread_mutexattr_setprioceiling); - __weak_reference(_pthread_mutex_getprioceiling, pthread_mutex_getprioceiling); - __weak_reference(_pthread_mutex_setprioceiling, pthread_mutex_setprioceiling); - int _pthread_mutexattr_getprioceiling(pthread_mutexattr_t *mattr, int *prioceiling) { --- 37,42 ---- *************** _pthread_mutex_setprioceiling(pthread_mu *** 113,115 **** --- 108,115 ---- } return(ret); } + + __strong_reference(_pthread_mutexattr_getprioceiling, pthread_mutexattr_getprioceiling); + __strong_reference(_pthread_mutexattr_setprioceiling, pthread_mutexattr_setprioceiling); + __strong_reference(_pthread_mutex_getprioceiling, pthread_mutex_getprioceiling); + __strong_reference(_pthread_mutex_setprioceiling, pthread_mutex_setprioceiling); diff -c3pr thread.orig/thr_mutex_protocol.c thread/thr_mutex_protocol.c *** thread.orig/thr_mutex_protocol.c Thu Apr 17 22:04:16 2003 --- thread/thr_mutex_protocol.c Mon Jun 7 17:59:53 2004 *************** *** 37,45 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(_pthread_mutexattr_getprotocol, pthread_mutexattr_getprotocol); - __weak_reference(_pthread_mutexattr_setprotocol, pthread_mutexattr_setprotocol); - int _pthread_mutexattr_getprotocol(pthread_mutexattr_t *mattr, int *protocol) { --- 37,42 ---- *************** _pthread_mutexattr_setprotocol(pthread_m *** 68,70 **** --- 65,69 ---- return(ret); } + __strong_reference(_pthread_mutexattr_getprotocol, pthread_mutexattr_getprotocol); + __strong_reference(_pthread_mutexattr_setprotocol, pthread_mutexattr_setprotocol); diff -c3pr thread.orig/thr_mutexattr_destroy.c thread/thr_mutexattr_destroy.c *** thread.orig/thr_mutexattr_destroy.c Mon Sep 16 01:45:35 2002 --- thread/thr_mutexattr_destroy.c Mon Jun 7 18:00:04 2004 *************** *** 36,43 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(_pthread_mutexattr_destroy, pthread_mutexattr_destroy); - int _pthread_mutexattr_destroy(pthread_mutexattr_t *attr) { --- 36,41 ---- *************** _pthread_mutexattr_destroy(pthread_mutex *** 51,53 **** --- 49,53 ---- } return(ret); } + + __strong_reference(_pthread_mutexattr_destroy, pthread_mutexattr_destroy); diff -c3pr thread.orig/thr_nanosleep.c thread/thr_nanosleep.c *** thread.orig/thr_nanosleep.c Mon Dec 8 18:20:56 2003 --- thread/thr_nanosleep.c Mon Jun 7 18:00:12 2004 *************** *** 36,43 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(__nanosleep, nanosleep); - int _nanosleep(const struct timespec *time_to_sleep, struct timespec *time_remaining) --- 36,41 ---- *************** __nanosleep(const struct timespec *time_ *** 127,129 **** --- 125,129 ---- return (ret); } + + __strong_reference(__nanosleep, nanosleep); diff -c3pr thread.orig/thr_once.c thread/thr_once.c *** thread.orig/thr_once.c Tue Sep 9 15:38:12 2003 --- thread/thr_once.c Mon Jun 7 18:00:24 2004 *************** *** 36,43 **** #include "un-namespace.h" #include "thr_private.h" - __weak_reference(_pthread_once, pthread_once); - #define ONCE_NEVER_DONE PTHREAD_NEEDS_INIT #define ONCE_DONE PTHREAD_DONE_INIT #define ONCE_IN_PROGRESS 0x02 --- 36,41 ---- *************** _pthread_once(pthread_once_t *once_contr *** 94,96 **** --- 92,95 ---- return (0); } + __strong_reference(_pthread_once, pthread_once); diff -c3pr thread.orig/thr_open.c thread/thr_open.c *** thread.orig/thr_open.c Mon Dec 8 18:20:56 2003 --- thread/thr_open.c Mon Jun 7 18:00:32 2004 *************** *** 40,47 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(__open, open); - int __open(const char *path, int flags,...) { --- 40,45 ---- *************** __open(const char *path, int flags,...) *** 69,71 **** --- 67,71 ---- return ret; } + + __strong_reference(__open, open); diff -c3pr thread.orig/thr_pause.c thread/thr_pause.c *** thread.orig/thr_pause.c Mon Dec 8 18:20:56 2003 --- thread/thr_pause.c Mon Jun 7 18:00:43 2004 *************** *** 35,42 **** extern int __pause(void); - __weak_reference(_pause, pause); - int _pause(void) { --- 35,40 ---- *************** _pause(void) *** 49,51 **** --- 47,51 ---- return ret; } + + __strong_reference(_pause, pause); diff -c3pr thread.orig/thr_poll.c thread/thr_poll.c *** thread.orig/thr_poll.c Mon Dec 8 18:20:56 2003 --- thread/thr_poll.c Mon Jun 7 18:00:57 2004 *************** *** 41,47 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(__poll, poll); int __poll(struct pollfd *fds, unsigned int nfds, int timeout) --- 41,46 ---- *************** __poll(struct pollfd *fds, unsigned int *** 55,57 **** --- 54,58 ---- return ret; } + + __strong_reference(__poll, poll); diff -c3pr thread.orig/thr_pselect.c thread/thr_pselect.c *** thread.orig/thr_pselect.c Mon Dec 8 18:20:56 2003 --- thread/thr_pselect.c Mon Jun 7 18:01:06 2004 *************** __FBSDID("$FreeBSD: src/lib/libpthread/t *** 40,47 **** extern int __pselect(int count, fd_set *rfds, fd_set *wfds, fd_set *efds, const struct timespec *timo, const sigset_t *mask); - __weak_reference(_pselect, pselect); - int _pselect(int count, fd_set *rfds, fd_set *wfds, fd_set *efds, const struct timespec *timo, const sigset_t *mask) --- 40,45 ---- *************** _pselect(int count, fd_set *rfds, fd_set *** 55,57 **** --- 53,57 ---- return (ret); } + + __strong_reference(_pselect, pselect); diff -c3pr thread.orig/thr_pspinlock.c thread/thr_pspinlock.c *** thread.orig/thr_pspinlock.c Tue Nov 4 11:56:12 2003 --- thread/thr_pspinlock.c Mon Jun 7 18:01:16 2004 *************** *** 34,45 **** #define SPIN_COUNT 10000 - __weak_reference(_pthread_spin_init, pthread_spin_init); - __weak_reference(_pthread_spin_destroy, pthread_spin_destroy); - __weak_reference(_pthread_spin_trylock, pthread_spin_trylock); - __weak_reference(_pthread_spin_lock, pthread_spin_lock); - __weak_reference(_pthread_spin_unlock, pthread_spin_unlock); - int _pthread_spin_init(pthread_spinlock_t *lock, int pshared) { --- 34,39 ---- *************** _pthread_spin_unlock(pthread_spinlock_t *** 158,160 **** --- 152,159 ---- return (ret); } + __strong_reference(_pthread_spin_init, pthread_spin_init); + __strong_reference(_pthread_spin_destroy, pthread_spin_destroy); + __strong_reference(_pthread_spin_trylock, pthread_spin_trylock); + __strong_reference(_pthread_spin_lock, pthread_spin_lock); + __strong_reference(_pthread_spin_unlock, pthread_spin_unlock); diff -c3pr thread.orig/thr_raise.c thread/thr_raise.c *** thread.orig/thr_raise.c Fri Jul 18 22:25:49 2003 --- thread/thr_raise.c Mon Jun 7 18:01:27 2004 *************** *** 33,40 **** #include <errno.h> #include "thr_private.h" - __weak_reference(_raise, raise); - int _raise(int sig) { --- 33,38 ---- *************** _raise(int sig) *** 51,53 **** --- 49,53 ---- } return (ret); } + + __strong_reference(_raise, raise); diff -c3pr thread.orig/thr_read.c thread/thr_read.c *** thread.orig/thr_read.c Mon Dec 8 18:20:56 2003 --- thread/thr_read.c Mon Jun 7 18:01:40 2004 *************** *** 40,47 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(__read, read); - ssize_t __read(int fd, void *buf, size_t nbytes) { --- 40,45 ---- *************** __read(int fd, void *buf, size_t nbytes) *** 54,56 **** --- 52,56 ---- return ret; } + + __strong_reference(__read, read); diff -c3pr thread.orig/thr_readv.c thread/thr_readv.c *** thread.orig/thr_readv.c Mon Dec 8 18:20:56 2003 --- thread/thr_readv.c Mon Jun 7 18:01:57 2004 *************** *** 40,47 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(__readv, readv); - ssize_t __readv(int fd, const struct iovec *iov, int iovcnt) { --- 40,45 ---- *************** __readv(int fd, const struct iovec *iov, *** 54,56 **** --- 52,56 ---- return ret; } + + __strong_reference(__readv, readv); diff -c3pr thread.orig/thr_resume_np.c thread/thr_resume_np.c *** thread.orig/thr_resume_np.c Tue Jul 22 19:11:07 2003 --- thread/thr_resume_np.c Mon Jun 7 18:02:16 2004 *************** *** 37,46 **** static struct kse_mailbox *resume_common(struct pthread *); - __weak_reference(_pthread_resume_np, pthread_resume_np); - __weak_reference(_pthread_resume_all_np, pthread_resume_all_np); - - /* Resume a thread: */ int _pthread_resume_np(pthread_t thread) --- 37,42 ---- *************** resume_common(struct pthread *thread) *** 105,107 **** --- 101,106 ---- else return (NULL); } + + __strong_reference(_pthread_resume_np, pthread_resume_np); + __strong_reference(_pthread_resume_all_np, pthread_resume_all_np); diff -c3pr thread.orig/thr_rwlock.c thread/thr_rwlock.c *** thread.orig/thr_rwlock.c Thu Jan 8 07:37:09 2004 --- thread/thr_rwlock.c Mon Jun 7 18:02:29 2004 *************** *** 38,53 **** /* maximum number of times a read lock may be obtained */ #define MAX_READ_LOCKS (INT_MAX - 1) - __weak_reference(_pthread_rwlock_destroy, pthread_rwlock_destroy); - __weak_reference(_pthread_rwlock_init, pthread_rwlock_init); - __weak_reference(_pthread_rwlock_rdlock, pthread_rwlock_rdlock); - __weak_reference(_pthread_rwlock_timedrdlock, pthread_rwlock_timedrdlock); - __weak_reference(_pthread_rwlock_tryrdlock, pthread_rwlock_tryrdlock); - __weak_reference(_pthread_rwlock_trywrlock, pthread_rwlock_trywrlock); - __weak_reference(_pthread_rwlock_unlock, pthread_rwlock_unlock); - __weak_reference(_pthread_rwlock_wrlock, pthread_rwlock_wrlock); - __weak_reference(_pthread_rwlock_timedwrlock, pthread_rwlock_timedwrlock); - /* * Prototypes */ --- 38,43 ---- *************** _pthread_rwlock_timedwrlock (pthread_rwl *** 417,419 **** --- 407,419 ---- { return (rwlock_wrlock_common (rwlock, abstime)); } + + __strong_reference(_pthread_rwlock_destroy, pthread_rwlock_destroy); + __strong_reference(_pthread_rwlock_init, pthread_rwlock_init); + __strong_reference(_pthread_rwlock_rdlock, pthread_rwlock_rdlock); + __strong_reference(_pthread_rwlock_timedrdlock, pthread_rwlock_timedrdlock); + __strong_reference(_pthread_rwlock_tryrdlock, pthread_rwlock_tryrdlock); + __strong_reference(_pthread_rwlock_trywrlock, pthread_rwlock_trywrlock); + __strong_reference(_pthread_rwlock_unlock, pthread_rwlock_unlock); + __strong_reference(_pthread_rwlock_wrlock, pthread_rwlock_wrlock); + __strong_reference(_pthread_rwlock_timedwrlock, pthread_rwlock_timedwrlock); diff -c3pr thread.orig/thr_rwlockattr.c thread/thr_rwlockattr.c *** thread.orig/thr_rwlockattr.c Mon Sep 16 01:45:35 2002 --- thread/thr_rwlockattr.c Mon Jun 7 18:02:44 2004 *************** *** 32,42 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(_pthread_rwlockattr_destroy, pthread_rwlockattr_destroy); - __weak_reference(_pthread_rwlockattr_getpshared, pthread_rwlockattr_getpshared); - __weak_reference(_pthread_rwlockattr_init, pthread_rwlockattr_init); - __weak_reference(_pthread_rwlockattr_setpshared, pthread_rwlockattr_setpshared); - int _pthread_rwlockattr_destroy(pthread_rwlockattr_t *rwlockattr) { --- 32,37 ---- *************** _pthread_rwlockattr_setpshared(pthread_r *** 96,98 **** --- 91,97 ---- return(0); } + __strong_reference(_pthread_rwlockattr_destroy, pthread_rwlockattr_destroy); + __strong_reference(_pthread_rwlockattr_getpshared, pthread_rwlockattr_getpshared); + __strong_reference(_pthread_rwlockattr_init, pthread_rwlockattr_init); + __strong_reference(_pthread_rwlockattr_setpshared, pthread_rwlockattr_setpshared); diff -c3pr thread.orig/thr_select.c thread/thr_select.c *** thread.orig/thr_select.c Mon Dec 8 18:20:56 2003 --- thread/thr_select.c Mon Jun 7 18:02:56 2004 *************** *** 43,50 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(__select, select); - int __select(int numfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout) --- 43,48 ---- *************** __select(int numfds, fd_set *readfds, fd *** 63,65 **** --- 61,65 ---- } return ret; } + + __strong_reference(__select, select); diff -c3pr thread.orig/thr_self.c thread/thr_self.c *** thread.orig/thr_self.c Thu Apr 17 22:04:16 2003 --- thread/thr_self.c Mon Jun 7 18:03:06 2004 *************** *** 34,41 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(_pthread_self, pthread_self); - pthread_t _pthread_self(void) { --- 34,39 ---- *************** _pthread_self(void) *** 45,47 **** --- 43,47 ---- /* Return the running thread pointer: */ return (_get_curthread()); } + + __strong_reference(_pthread_self, pthread_self); diff -c3pr thread.orig/thr_sem.c thread/thr_sem.c *** thread.orig/thr_sem.c Fri Feb 6 07:20:56 2004 --- thread/thr_sem.c Mon Jun 7 18:09:50 2004 *************** extern int pthread_cond_wait(pthread_con *** 47,58 **** extern int pthread_cond_timedwait(pthread_cond_t *, pthread_mutex_t *, struct timespec *); - __weak_reference(_sem_init, sem_init); - __weak_reference(_sem_wait, sem_wait); - __weak_reference(_sem_timedwait, sem_timedwait); - __weak_reference(_sem_post, sem_post); - - static inline int sem_check_validity(sem_t *sem) { --- 47,52 ---- *************** _sem_wait(sem_t *sem) *** 173,179 **** int _sem_timedwait(sem_t * __restrict sem, ! struct timespec * __restrict abs_timeout) { struct pthread *curthread; int retval; --- 167,173 ---- int _sem_timedwait(sem_t * __restrict sem, ! const struct timespec * __restrict abs_timeout) { struct pthread *curthread; int retval; *************** _sem_post(sem_t *sem) *** 260,262 **** --- 254,261 ---- return (retval); } + + __strong_reference(_sem_init, sem_init); + __strong_reference(_sem_wait, sem_wait); + __strong_reference(_sem_timedwait, sem_timedwait); + __strong_reference(_sem_post, sem_post); diff -c3pr thread.orig/thr_setprio.c thread/thr_setprio.c *** thread.orig/thr_setprio.c Mon Sep 16 01:45:36 2002 --- thread/thr_setprio.c Mon Jun 7 18:03:28 2004 *************** *** 34,41 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(_pthread_setprio, pthread_setprio); - int _pthread_setprio(pthread_t pthread, int prio) { --- 34,39 ---- *************** _pthread_setprio(pthread_t pthread, int *** 50,52 **** --- 48,52 ---- /* Return the error status: */ return (ret); } + + __strong_reference(_pthread_setprio, pthread_setprio); diff -c3pr thread.orig/thr_setschedparam.c thread/thr_setschedparam.c *** thread.orig/thr_setschedparam.c Sun Apr 20 21:02:56 2003 --- thread/thr_setschedparam.c Mon Jun 7 18:03:37 2004 *************** *** 36,43 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(_pthread_setschedparam, pthread_setschedparam); - int _pthread_setschedparam(pthread_t pthread, int policy, const struct sched_param *param) --- 36,41 ---- *************** _pthread_setschedparam(pthread_t pthread *** 134,136 **** --- 132,136 ---- } return (ret); } + + __strong_reference(_pthread_setschedparam, pthread_setschedparam); diff -c3pr thread.orig/thr_sigaction.c thread/thr_sigaction.c *** thread.orig/thr_sigaction.c Wed Sep 24 23:23:40 2003 --- thread/thr_sigaction.c Mon Jun 7 18:03:50 2004 *************** *** 36,43 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(_sigaction, sigaction); - int _sigaction(int sig, const struct sigaction * act, struct sigaction * oact) { --- 36,41 ---- *************** _sigaction(int sig, const struct sigacti *** 115,117 **** --- 113,117 ---- /* Return the completion status: */ return (ret); } + + __strong_reference(_sigaction, sigaction); diff -c3pr thread.orig/thr_sigaltstack.c thread/thr_sigaltstack.c *** thread.orig/thr_sigaltstack.c Thu Jan 1 16:38:42 2004 --- thread/thr_sigaltstack.c Mon Jun 7 18:10:59 2004 *************** __FBSDID("$FreeBSD: src/lib/libpthread/t *** 31,40 **** #include <signal.h> #include "thr_private.h" - __weak_reference(_sigaltstack, sigaltstack); - int ! _sigaltstack(stack_t *_ss, stack_t *_oss) { struct pthread *curthread = _get_curthread(); stack_t ss, oss; --- 31,38 ---- #include <signal.h> #include "thr_private.h" int ! _sigaltstack(const stack_t *_ss, stack_t *_oss) { struct pthread *curthread = _get_curthread(); stack_t ss, oss; *************** _thr_sigonstack(void *sp) *** 105,107 **** --- 103,106 ---- : 0); } + __strong_reference(_sigaltstack, sigaltstack); diff -c3pr thread.orig/thr_sigmask.c thread/thr_sigmask.c *** thread.orig/thr_sigmask.c Thu Sep 18 05:19:28 2003 --- thread/thr_sigmask.c Mon Jun 7 18:04:07 2004 *************** *** 40,47 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(_pthread_sigmask, pthread_sigmask); - int _pthread_sigmask(int how, const sigset_t *set, sigset_t *oset) { --- 40,45 ---- *************** _pthread_sigmask(int how, const sigset_t *** 111,113 **** --- 109,113 ---- *oset = oldset; return (ret); } + + __strong_reference(_pthread_sigmask, pthread_sigmask); diff -c3pr thread.orig/thr_sigpending.c thread/thr_sigpending.c *** thread.orig/thr_sigpending.c Sun Aug 17 20:58:29 2003 --- thread/thr_sigpending.c Mon Jun 7 18:04:15 2004 *************** *** 39,46 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(_sigpending, sigpending); - int _sigpending(sigset_t *set) { --- 39,44 ---- *************** _sigpending(sigset_t *set) *** 71,73 **** --- 69,73 ---- /* Return the completion status: */ return (ret); } + + __strong_reference(_sigpending, sigpending); diff -c3pr thread.orig/thr_sigprocmask.c thread/thr_sigprocmask.c *** thread.orig/thr_sigprocmask.c Sun Aug 17 20:58:29 2003 --- thread/thr_sigprocmask.c Mon Jun 7 18:04:24 2004 *************** *** 39,46 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(_sigprocmask, sigprocmask); - int _sigprocmask(int how, const sigset_t *set, sigset_t *oset) { --- 39,44 ---- *************** _sigprocmask(int how, const sigset_t *se *** 53,55 **** --- 51,55 ---- } return (ret); } + + __strong_reference(_sigprocmask, sigprocmask); diff -c3pr thread.orig/thr_sigsuspend.c thread/thr_sigsuspend.c *** thread.orig/thr_sigsuspend.c Mon Dec 8 18:20:56 2003 --- thread/thr_sigsuspend.c Mon Jun 7 18:04:32 2004 *************** *** 38,45 **** #include <sys/signalvar.h> #include "thr_private.h" - __weak_reference(__sigsuspend, sigsuspend); - int _sigsuspend(const sigset_t *set) { --- 38,43 ---- *************** __sigsuspend(const sigset_t * set) *** 101,103 **** --- 99,103 ---- return (ret); } + + __strong_reference(__sigsuspend, sigsuspend); diff -c3pr thread.orig/thr_sigwait.c thread/thr_sigwait.c *** thread.orig/thr_sigwait.c Tue Mar 16 18:12:19 2004 --- thread/thr_sigwait.c Mon Jun 7 18:04:44 2004 *************** *** 39,48 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(__sigwait, sigwait); - __weak_reference(__sigtimedwait, sigtimedwait); - __weak_reference(__sigwaitinfo, sigwaitinfo); - static int lib_sigtimedwait(const sigset_t *set, siginfo_t *info, const struct timespec * timeout) --- 39,44 ---- *************** _sigwait(const sigset_t *set, int *sig) *** 200,202 **** --- 196,201 ---- return (ret); } + __strong_reference(__sigwait, sigwait); + __strong_reference(__sigtimedwait, sigtimedwait); + __strong_reference(__sigwaitinfo, sigwaitinfo); diff -c3pr thread.orig/thr_single_np.c thread/thr_single_np.c *** thread.orig/thr_single_np.c Thu May 23 21:32:28 2002 --- thread/thr_single_np.c Mon Jun 7 18:04:56 2004 *************** *** 34,41 **** #include <pthread.h> #include <pthread_np.h> - __weak_reference(_pthread_single_np, pthread_single_np); - int _pthread_single_np() { --- 34,39 ---- *************** int _pthread_single_np() *** 47,49 **** --- 45,49 ---- */ return (0); } + + __strong_reference(_pthread_single_np, pthread_single_np); diff -c3pr thread.orig/thr_sleep.c thread/thr_sleep.c *** thread.orig/thr_sleep.c Mon Dec 8 18:20:56 2003 --- thread/thr_sleep.c Mon Jun 7 18:05:04 2004 *************** *** 35,42 **** extern unsigned int __sleep(unsigned int); - __weak_reference(_sleep, sleep); - unsigned int _sleep(unsigned int seconds) { --- 35,40 ---- *************** _sleep(unsigned int seconds) *** 49,51 **** --- 47,51 ---- return (ret); } + + __strong_reference(_sleep, sleep); diff -c3pr thread.orig/thr_spec.c thread/thr_spec.c *** thread.orig/thr_spec.c Tue Aug 19 19:34:14 2003 --- thread/thr_spec.c Mon Jun 7 18:05:14 2004 *************** struct pthread_key { *** 48,59 **** /* Static variables: */ static struct pthread_key key_table[PTHREAD_KEYS_MAX]; - __weak_reference(_pthread_key_create, pthread_key_create); - __weak_reference(_pthread_key_delete, pthread_key_delete); - __weak_reference(_pthread_getspecific, pthread_getspecific); - __weak_reference(_pthread_setspecific, pthread_setspecific); - - int _pthread_key_create(pthread_key_t *key, void (*destructor) (void *)) { --- 48,53 ---- *************** _pthread_getspecific(pthread_key_t key) *** 232,234 **** --- 226,233 ---- data = NULL; return (data); } + + __strong_reference(_pthread_key_create, pthread_key_create); + __strong_reference(_pthread_key_delete, pthread_key_delete); + __strong_reference(_pthread_getspecific, pthread_getspecific); + __strong_reference(_pthread_setspecific, pthread_setspecific); diff -c3pr thread.orig/thr_suspend_np.c thread/thr_suspend_np.c *** thread.orig/thr_suspend_np.c Sun May 4 09:17:01 2003 --- thread/thr_suspend_np.c Mon Jun 7 18:05:26 2004 *************** *** 37,45 **** static void suspend_common(struct pthread *thread); - __weak_reference(_pthread_suspend_np, pthread_suspend_np); - __weak_reference(_pthread_suspend_all_np, pthread_suspend_all_np); - /* Suspend a thread: */ int _pthread_suspend_np(pthread_t thread) --- 37,42 ---- *************** suspend_common(struct pthread *thread) *** 107,109 **** --- 104,109 ---- #endif } } + + __strong_reference(_pthread_suspend_np, pthread_suspend_np); + __strong_reference(_pthread_suspend_all_np, pthread_suspend_all_np); diff -c3pr thread.orig/thr_switch_np.c thread/thr_switch_np.c *** thread.orig/thr_switch_np.c Thu Apr 17 22:04:16 2003 --- thread/thr_switch_np.c Mon Jun 7 18:05:36 2004 *************** *** 36,45 **** #include <pthread_np.h> #include "thr_private.h" - - __weak_reference(_pthread_switch_add_np, pthread_switch_add_np); - __weak_reference(_pthread_switch_delete_np, pthread_switch_delete_np); - int _pthread_switch_add_np(pthread_switch_routine_t routine) { --- 36,41 ---- *************** _pthread_switch_delete_np(pthread_switch *** 51,53 **** --- 47,52 ---- { return (ENOTSUP); } + + __strong_reference(_pthread_switch_add_np, pthread_switch_add_np); + __strong_reference(_pthread_switch_delete_np, pthread_switch_delete_np); diff -c3pr thread.orig/thr_system.c thread/thr_system.c *** thread.orig/thr_system.c Mon Dec 8 18:20:56 2003 --- thread/thr_system.c Mon Jun 7 18:05:44 2004 *************** *** 35,42 **** extern int __system(const char *); - __weak_reference(_system, system); - int _system(const char *string) { --- 35,40 ---- *************** _system(const char *string) *** 49,51 **** --- 47,51 ---- return ret; } + + __strong_reference(_system, system); diff -c3pr thread.orig/thr_tcdrain.c thread/thr_tcdrain.c *** thread.orig/thr_tcdrain.c Mon Dec 8 18:20:56 2003 --- thread/thr_tcdrain.c Mon Jun 7 18:05:54 2004 *************** *** 35,42 **** extern int __tcdrain(int); - __weak_reference(_tcdrain, tcdrain); - int _tcdrain(int fd) { --- 35,40 ---- *************** _tcdrain(int fd) *** 49,51 **** --- 47,51 ---- return (ret); } + + __strong_reference(_tcdrain, tcdrain); diff -c3pr thread.orig/thr_vfork.c thread/thr_vfork.c *** thread.orig/thr_vfork.c Mon Apr 9 21:19:20 2001 --- thread/thr_vfork.c Mon Jun 7 18:06:04 2004 *************** *** 3,12 **** */ #include <unistd.h> - __weak_reference(_vfork, vfork); - int _vfork(void) { return (fork()); } --- 3,12 ---- */ #include <unistd.h> int _vfork(void) { return (fork()); } + + __strong_reference(_vfork, vfork); diff -c3pr thread.orig/thr_wait.c thread/thr_wait.c *** thread.orig/thr_wait.c Mon Dec 8 18:20:56 2003 --- thread/thr_wait.c Mon Jun 7 18:06:12 2004 *************** *** 34,41 **** extern int __wait(int *); - __weak_reference(_wait, wait); - pid_t _wait(int *istat) { --- 34,39 ---- *************** _wait(int *istat) *** 48,50 **** --- 46,50 ---- return ret; } + + __strong_reference(_wait, wait); diff -c3pr thread.orig/thr_wait4.c thread/thr_wait4.c *** thread.orig/thr_wait4.c Mon Dec 8 18:20:56 2003 --- thread/thr_wait4.c Mon Jun 7 18:06:20 2004 *************** *** 41,48 **** #include "thr_private.h" - __weak_reference(__wait4, wait4); - pid_t __wait4(pid_t pid, int *istat, int options, struct rusage *rusage) { --- 41,46 ---- *************** __wait4(pid_t pid, int *istat, int optio *** 55,57 **** --- 53,57 ---- return ret; } + + __strong_reference(__wait4, wait4); diff -c3pr thread.orig/thr_waitpid.c thread/thr_waitpid.c *** thread.orig/thr_waitpid.c Mon Dec 8 18:20:56 2003 --- thread/thr_waitpid.c Mon Jun 7 18:06:29 2004 *************** *** 36,43 **** extern int __waitpid(pid_t, int *, int); - __weak_reference(_waitpid, waitpid); - pid_t _waitpid(pid_t wpid, int *status, int options) { --- 36,41 ---- *************** _waitpid(pid_t wpid, int *status, int op *** 50,52 **** --- 48,52 ---- return ret; } + + __strong_reference(_waitpid, waitpid); diff -c3pr thread.orig/thr_write.c thread/thr_write.c *** thread.orig/thr_write.c Mon Dec 8 18:20:56 2003 --- thread/thr_write.c Mon Jun 7 18:06:37 2004 *************** *** 40,47 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(__write, write); - ssize_t __write(int fd, const void *buf, size_t nbytes) { --- 40,45 ---- *************** __write(int fd, const void *buf, size_t *** 54,56 **** --- 52,56 ---- return ret; } + + __strong_reference(__write, write); diff -c3pr thread.orig/thr_writev.c thread/thr_writev.c *** thread.orig/thr_writev.c Mon Dec 8 18:20:56 2003 --- thread/thr_writev.c Mon Jun 7 18:06:45 2004 *************** *** 42,49 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(__writev, writev); - ssize_t __writev(int fd, const struct iovec *iov, int iovcnt) { --- 42,47 ---- *************** __writev(int fd, const struct iovec *iov *** 56,58 **** --- 54,58 ---- return ret; } + + __strong_reference(__writev, writev); diff -c3pr thread.orig/thr_yield.c thread/thr_yield.c *** thread.orig/thr_yield.c Sun Aug 17 20:58:29 2003 --- thread/thr_yield.c Mon Jun 7 18:06:55 2004 *************** *** 34,42 **** #include <pthread.h> #include "thr_private.h" - __weak_reference(_sched_yield, sched_yield); - __weak_reference(_pthread_yield, pthread_yield); - int _sched_yield(void) { --- 34,39 ---- *************** _pthread_yield(void) *** 71,73 **** --- 68,73 ---- /* Schedule the next thread: */ _thr_sched_switch(curthread); } + + __strong_reference(_sched_yield, sched_yield); + __strong_reference(_pthread_yield, pthread_yield);Received on Tue Jun 08 2004 - 00:57:42 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:56 UTC