[uClibc-cvs] uClibc/libc/inet/rpc create_xid.c,1.2,1.3

Manuel Novoa III mjn3 at uclibc.org
Sat Dec 27 23:30:34 UTC 2003


Update of /var/cvs/uClibc/libc/inet/rpc
In directory nail:/tmp/cvs-serv11655/libc/inet/rpc

Modified Files:
	create_xid.c 
Log Message:
Fix a long-standing bug with pthreads.  A couple of linuxthreads files
were including libc-lock.h which had a bunch of weak pragmas.  Also,
uClibc supplied a number of no-op weak thread functions even though
many weren't needed.  This combined result was that sometimes the
functional versions of thread functions in pthread would not override
the weaks in libc.

While fixing this, I also prepended double-underscore to all necessary
weak thread funcs in uClibc, and removed all unused weaks.

I did a test build, but haven't tested this since these changes are
a backport from my working tree.  I did test the changes there and
no longer need to explicitly add -lpthread in the perl build for
perl to pass its thread self tests.



Index: create_xid.c
===================================================================
RCS file: /var/cvs/uClibc/libc/inet/rpc/create_xid.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- create_xid.c	6 Aug 2002 14:46:14 -0000	1.2
+++ create_xid.c	27 Dec 2003 23:30:31 -0000	1.3
@@ -30,8 +30,8 @@
 #ifdef __UCLIBC_HAS_THREADS__
 #include <pthread.h>
 static pthread_mutex_t createxid_lock = PTHREAD_MUTEX_INITIALIZER;
-# define LOCK	pthread_mutex_lock(&createxid_lock)
-# define UNLOCK	pthread_mutex_unlock(&createxid_lock);
+# define LOCK	__pthread_mutex_lock(&createxid_lock)
+# define UNLOCK	__pthread_mutex_unlock(&createxid_lock);
 #else
 # define LOCK
 # define UNLOCK




More information about the uClibc-cvs mailing list