From owner-freebsd-current Thu Oct 31 12:34:38 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 BAC5E37B401 for ; Thu, 31 Oct 2002 12:34:36 -0800 (PST) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 46FAD43E6E for ; Thu, 31 Oct 2002 12:34:36 -0800 (PST) (envelope-from eischen@pcnet1.pcnet.com) Received: from localhost (eischen@localhost) by mail.pcnet.com (8.12.3/8.12.1) with ESMTP id g9VKYURn017323; Thu, 31 Oct 2002 15:34:30 -0500 (EST) Date: Thu, 31 Oct 2002 15:34:30 -0500 (EST) From: Daniel Eischen To: Doug Rabson Cc: ak03@gte.com, tlambert2@mindspring.com, current@freebsd.org Subject: Re: [PATCH: libc]Re: gnome on current In-Reply-To: <20021031193158.B13073-100000@herring.nlsystems.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 On Thu, 31 Oct 2002, Doug Rabson wrote: > On Thu, 31 Oct 2002, Daniel Eischen wrote: > > > This is better, although it has two stubs for each routine. Adding > > a weak definition from pthread_foo() to _pthread_foo() (note the > > lack of _stub) doesn't do the same thing? > > Ok, this version works and seems to be a reasonably tidy solution, at > least until/if the jump-table version a-la solaris is available. I > tweaked it slightly to move all the __weak_reference() calls together. Can > I commit this? Yes, it looks OK. I started a slightly different version that automatically added both references with one macro. Something like: #define WEAK_REF(sym, alias) __weak_reference(sym, alias) #define DUAL_WEAK_STUB(sym) \ WEAK_REF(__CONCAT(sym, _stub), __CONCAT(_, sym)); \ WEAK_REF(__CONCAT(sym, _stub), sym) DUAL_WEAK_STUB(pthread_mutex_lock); ... or something like that. Go ahead and commit yours if you don't care to fiddle any more with it. I won't be able to get to the jump table thing for a few days. -- Dan Eischen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message