Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Jan 1998 18:17:03 +1030
From:      Greg Lehey <grog@lemis.com>
To:        Terry Lambert <tlambert@primenet.com>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: Why no sys/setjmp.h?
Message-ID:  <19980117181703.04492@lemis.com>
In-Reply-To: <199801170717.AAA26333@usr01.primenet.com>; from Terry Lambert on Sat, Jan 17, 1998 at 07:17:52AM %2B0000
References:  <19980116164618.38842@lemis.com> <199801170717.AAA26333@usr01.primenet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jan 17, 1998 at 07:17:52AM +0000, Terry Lambert wrote:
>>>> Which are?  That was my question.
>>>
>>> Using tsleep()/wakeup(), for one.  Any set of operations can be reduced.
>>
>> OK.  I have a situation where I discover an error in the middle of a
>> relatively complicated function.  

As Mike Smith pointed out, 'function' is a poor choice of words.  I'm
in the top half of a driver (in process context *only*), checking
configuration information, which requires a number of nested function
calls.  It does not require communication with the bottom half of the
driver.

>> I can see two possibilities to solve it:
>>
>> 1.  Return -1 or some such, and test every function call within this
>>     part of the code.  A lot of code.
>> 2.  longjmp () out of the code.
>>
>> Could you explain how to use tsleep()/wakeup() to perform this
>> function?
>
> Obtain intention mode locks before descending.

Locks on what?  Descending where?  This is pure code.  With the
exception of having to read disk blocks at times, there is no
interruption.  Reading the disk blocks is not part of the problem,
though it would cause the process to be scheduled.

> If you have a possible conflict, then the intention mode lock wasn't
> granted, and this situtation never arose.  8-).

Which situation?

> Oh, yeah, I forgot, "transitive colsure" is a bad phrase.  8-(.

So is "quality Microsoft software".

Greg



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