Date: Tue, 15 Aug 2000 09:13:28 -0700 (PDT) From: John Polstra <jdp@polstra.com> To: hackers@freebsd.org Cc: jonas.bulow@servicefactory.se Subject: Re: IPC, shared memory, syncronization AND threads... Message-ID: <200008151613.JAA04129@vashon.polstra.com> In-Reply-To: <3997BD3E.2B65AD19@servicefactory.se> References: <39943C37.76D2DBCC@servicefactory.se> <3995431A.324F8C89@servicefactory.se> <200008121639.JAA63479@vashon.polstra.com> <3997BD3E.2B65AD19@servicefactory.se>
next in thread | previous in thread | raw e-mail | index | archive | help
In article <3997BD3E.2B65AD19@servicefactory.se>, Jonas Bulow <jonas.bulow@servicefactory.se> wrote: > John Polstra wrote: > > > I think the ideal solution would first try to lock the > > test-and-set lock, maybe spinning on it just a few times. If that > > failed it would fall back to using a system-call lock such as > > flock() which would allow the process to block without spinning. > > But I don't have any code to do that. (If you write some, could I > > have a copy?) > > I am about to. Actually I thought about this some more, and I'm not all that sure it's possible. I haven't actually _tried_ it, but I think you'd end up needing a low-level mutex around parts of the code. That would have to be implemented as a spinlock, which is exactly what we're trying to avoid in this exercise. > don't know it it's bad design to have rtld.c export > lockdflt_init in the same way as dlopen, what di you think? Right, bad design. :-) John -- John Polstra jdp@polstra.com 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-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200008151613.JAA04129>