Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Dec 2005 00:43:39 -0800
From:      rookie <asmrookie@gmail.com>
To:        freebsd-smp@freebsd.org
Subject:   Re: Use turnstile to implement sx_lock
Message-ID:  <3bbf2fe10512160043g2777a8f9t@mail.gmail.com>
In-Reply-To: <3bbf2fe10512160041x7fd719bej@mail.gmail.com>
References:  <1fa17f810512150652h5da6a6a5g3347f841a614689e@mail.gmail.com> <200512151257.22004.jhb@freebsd.org> <3bbf2fe10512151109w22ef9e2aj@mail.gmail.com> <200512152125.16004.max@love2party.net> <3bbf2fe10512160041x7fd719bej@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> After some thinking this strikes me as wrong.  You must not grant a slock
> attempt if there is a thread with a higher priority waiting to get a xloc=
k.
> This does not mean that your approach doesn't work, but you have to keep
> this
> in mind.
Yes, it's right.

[snip]
>
> It seems to me that you are talking about the same things with slightly
> different implementation details.  It doesn't really matter much where th=
e
> queue of slocking threads is kept as long as it is easily and efficient t=
o
> update the turnstile's owner on sunlock.  In practice it should be easier=
 to
> have it in the turnstile as well and I still don't really understand why =
you
> (rookie) do not want to change turnstiles.
In order to mantain current code for mutex (less changes mean less problems=
).
However I think that a good start point would be writing code for a
new primitive (as John and Max suggested) and I will concentrate my
work there.

Attilio


--
Peace can only be achieved by understanding - A. Einstein



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3bbf2fe10512160043g2777a8f9t>