From owner-freebsd-hackers Fri Jan 16 23:18:12 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id XAA09687 for hackers-outgoing; Fri, 16 Jan 1998 23:18:12 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from smtp02.primenet.com (smtp02.primenet.com [206.165.6.132]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id XAA09662 for ; Fri, 16 Jan 1998 23:17:58 -0800 (PST) (envelope-from tlambert@usr01.primenet.com) Received: (from daemon@localhost) by smtp02.primenet.com (8.8.8/8.8.8) id AAA17005; Sat, 17 Jan 1998 00:17:57 -0700 (MST) Received: from usr01.primenet.com(206.165.6.201) via SMTP by smtp02.primenet.com, id smtpd016989; Sat Jan 17 00:17:55 1998 Received: (from tlambert@localhost) by usr01.primenet.com (8.8.5/8.8.5) id AAA26333; Sat, 17 Jan 1998 00:17:52 -0700 (MST) From: Terry Lambert Message-Id: <199801170717.AAA26333@usr01.primenet.com> Subject: Re: Why no sys/setjmp.h? To: grog@lemis.com (Greg Lehey) Date: Sat, 17 Jan 1998 07:17:52 +0000 (GMT) Cc: tlambert@primenet.com, hackers@FreeBSD.ORG In-Reply-To: <19980116164618.38842@lemis.com> from "Greg Lehey" at Jan 16, 98 04:46:18 pm X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk > >> 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. 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. If you have a possible conflict, then the intention mode lock wasn't granted, and this situtation never arose. 8-). Oh, yeah, I forgot, "transitive colsure" is a bad phrase. 8-(. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.