From owner-freebsd-current Wed Oct 30 2:37:56 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0C66737B401 for ; Wed, 30 Oct 2002 02:37:54 -0800 (PST) Received: from flamingo.mail.pas.earthlink.net (flamingo.mail.pas.earthlink.net [207.217.120.232]) by mx1.FreeBSD.org (Postfix) with ESMTP id A222F43E75 for ; Wed, 30 Oct 2002 02:37:53 -0800 (PST) (envelope-from tlambert2@mindspring.com) Received: from pool0004.cvx22-bradley.dialup.earthlink.net ([209.179.198.4] helo=mindspring.com) by flamingo.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 186qEO-0000fC-00; Wed, 30 Oct 2002 02:37:50 -0800 Message-ID: <3DBFB627.6BD0B926@mindspring.com> Date: Wed, 30 Oct 2002 02:36:23 -0800 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Doug Rabson Cc: current@freebsd.org Subject: [PATCH: libc]Re: gnome on current References: <20021030100105.K43274-100000@herring.nlsystems.com> Content-Type: multipart/mixed; boundary="------------D290D46E0DB61299D80748D0" Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG This is a multi-part message in MIME format. --------------D290D46E0DB61299D80748D0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Doug Rabson wrote: > > > All you have to do is create a situation where a shared object that links > > > to libc_r is loaded after libX11 and the thing breaks into little pieces. > > > > So let's dike out libXThrStub.so, and be done with it. > > I think the only stub which it defines that libc.so doesn't also define is > pthread_cond_broadcast. I'm waiting to see if that lack causes any > noticeable problems. That's bizarre... it's defined in libc_r, so there's no reason for the omission in libc. Please find attached a patch that corrects this. PS: It looks like the semaphore code use pthread_cond_signal; maybe it should be using the pthread_cond_broadcast, instead? This seeems to be broken, if we are talking a large vs. small count on the semaphore... -- Terry --------------D290D46E0DB61299D80748D0 Content-Type: text/plain; charset=us-ascii; name="libccond.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="libccond.diff" Index: gen/_pthread_stubs.c =================================================================== RCS file: /cvs/src/lib/libc/gen/_pthread_stubs.c,v retrieving revision 1.7 diff -c -r1.7 _pthread_stubs.c *** gen/_pthread_stubs.c 19 Sep 2002 01:09:49 -0000 1.7 --- gen/_pthread_stubs.c 30 Oct 2002 06:16:11 -0000 *************** *** 42,47 **** --- 42,48 ---- */ __weak_reference(_pthread_cond_init_stub, _pthread_cond_init); __weak_reference(_pthread_cond_signal_stub, _pthread_cond_signal); + __weak_reference(_pthread_cond_broadcast_stub, _pthread_cond_broadcast); __weak_reference(_pthread_cond_wait_stub, _pthread_cond_wait); __weak_reference(_pthread_cond_destroy_stub, _pthread_cond_destroy); __weak_reference(_pthread_getspecific_stub, _pthread_getspecific); *************** *** 82,87 **** --- 83,94 ---- int _pthread_cond_signal_stub(pthread_cond_t *cond) + { + return (0); + } + + int + _pthread_cond_broadcast_stub(pthread_cond_t *cond) { return (0); } Index: include/namespace.h =================================================================== RCS file: /cvs/src/lib/libc/include/namespace.h,v retrieving revision 1.9 diff -c -r1.9 namespace.h *** include/namespace.h 29 Mar 2002 22:43:42 -0000 1.9 --- include/namespace.h 30 Oct 2002 06:17:39 -0000 *************** *** 77,82 **** --- 77,83 ---- #define open _open #define poll _poll #define pthread_cond_signal _pthread_cond_signal + #define pthread_cond_broadcast _pthread_cond_broadcast #define pthread_cond_wait _pthread_cond_wait #define pthread_cond_init _pthread_cond_init #define pthread_exit _pthread_exit Index: include/reentrant.h =================================================================== RCS file: /cvs/src/lib/libc/include/reentrant.h,v retrieving revision 1.1 diff -c -r1.1 reentrant.h *** include/reentrant.h 19 Mar 2001 12:49:49 -0000 1.1 --- include/reentrant.h 30 Oct 2002 06:18:10 -0000 *************** *** 109,114 **** --- 109,116 ---- #define cond_init(c, a, p) _pthread_cond_init(c, a) #define cond_signal(m) if (__isthreaded) \ _pthread_cond_signal(m) + #define cond_broadcast(m) if (__isthreaded) \ + _pthread_cond_broadcast(m) #define cond_wait(c, m) if (__isthreaded) \ _pthread_cond_wait(c, m) --------------D290D46E0DB61299D80748D0-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message