Date: Tue, 29 Oct 2002 08:47:31 -0800 (PST) From: John Polstra <jdp@polstra.com> To: current@freebsd.org Cc: dfr@nlsystems.com Subject: Re: gnome on current Message-ID: <200210291647.g9TGlVM5049992@vashon.polstra.com> In-Reply-To: <20021029141208.C97929-100000@herring.nlsystems.com> References: <20021029141208.C97929-100000@herring.nlsystems.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In article <20021029141208.C97929-100000@herring.nlsystems.com>, Doug Rabson <dfr@nlsystems.com> wrote: > On Tue, 29 Oct 2002, John Polstra wrote: > > I think it would work if the symbol were defined strongly in libc_r. > > I think so too. I was trying to work out why this wasn't how things were > done already. FWIW, linux's libpthread appears to be defining the > pthread_* symbols strongly. I think the weak symbols have something to do with support for thread cancellation. I didn't pay much attention at the time, so I don't know the details. Here's the relevant commit message, I think (this one taken from lib/libc_r/uthread/uthread_pause.c): date: 2001/01/24 13:03:34; author: deischen; state: Exp; lines: +4 -4 Add weak definitions for wrapped system calls. In general: _foo - wrapped system call foo - weak definition to _foo and for cancellation points: _foo - wrapped system call __foo - enter cancellation point, call _foo(), leave cancellation point foo - weak definition to __foo Change use of global _thread_run to call a function to get the currently running thread. Make all pthread_foo functions weak definitions to _pthread_foo, where _pthread_foo is the implementation. This allows an application to provide its own pthread functions. Provide slightly different versions of pthread_mutex_lock and pthread_mutex_init so that we can tell the difference between a libc mutex and an application mutex. Threads holding mutexes internal to libc should never be allowed to exit, call signal handlers, or cancel. Approved by: -arch John -- John Polstra John D. Polstra & Co., Inc. Seattle, Washington USA "Disappointment is a good sign of basic intelligence." -- Chögyam Trungpa To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200210291647.g9TGlVM5049992>