Date: Wed, 7 Aug 2002 12:36:57 -0400 (EDT) From: Daniel Eischen <eischen@mail.pcnet.com> To: hackers@freebsd.org, jdp@polstra.com Subject: Re: Help needed. Deadlock in rtld makes openoffice build hang ag Message-ID: <200208071636.g77GavpD003986@mail.pcnet.com>
next in thread | raw e-mail | index | archive | help
> I agree completely about spinlocks vs. mutexes, in principle. But ... > the reason the rtld uses its own spinlock implementation is because > it cannot assume that the threads package is libc_r. It could be > linuxthreads or some completely unknown threads package. I don't > like the current solution in the rtld, but it's hard to come up with > something that works with arbitrary threads packages. As long as all threads packages that we want to support have pthread_mutex_lock/pthread_mutex_unlock, then you can just use a weak reference to them (and pthread_mutex_init I guess too) and use them when present. Both libc_r (under -current anyways) and linuxthreads use weak definitions from pthread_* to _pthread_* (or __pthread_* in Linux I think), so that might throw a wrench into this solution. I'm not sure how weak references to weak definitions work. [ I may have reversed my use of weak reference and definitions, but _you_ should be able to figure out what I meant. ] -- Dan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200208071636.g77GavpD003986>