In article <[EMAIL PROTECTED]>, Jonas Bulow
<[EMAIL PROTECTED]> 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                                               [EMAIL PROTECTED]
  John D. Polstra & Co., Inc.                        Seattle, Washington USA
  "Disappointment is a good sign of basic intelligence."  -- Ch�gyam Trungpa



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to