Subject: Re: newlock
To: YAMAMOTO Takashi <firstname.lastname@example.org>
From: Garrett D'Amore <email@example.com>
Date: 09/03/2006 17:28:22
YAMAMOTO Takashi wrote:
>> The assumptions were that we would be dealing with two or more locks, with the
>> same SPL, and that the acquire and release would be done locally. That's not
>> general enough though. So, following your suggestion, something like this:
>> .. find b ..
>> mutex_link(b, mutex_exit_linked(a));
>> .. update b ..
>> This is a part of the design I'm not comfortable with, and I think the above
>> is quite ugly. What do people think?
> what's wrong with using plain old splxxx() where out-of-order operation is
> really necessary? i don't think it's often.
> YAMAMOTO Takashi
What's wrong with the standard solaris way of doing this?
/* possibly unlock a now *
mutex_exit(a); /* unless you did it earlier */
It gives full flexibility, and keeps everything explicit.
Garrett D'Amore, Principal Software Engineer
Tadpole Computer / Computing Technologies Division,
General Dynamics C4 Systems
Phone: 951 325-2134 Fax: 951 325-2191