Date: Thu, 9 Jan 2003 20:59:25 +0100 From: Pawel Jakub Dawidek <P.Dawidek@prioris.mini.pw.edu.pl> To: Julian Elischer <julian@elischer.org> Cc: freebsd-hackers@freebsd.org Subject: Re: Exceptions via setjmp/longjmp in kernel. Message-ID: <20030109195925.GD51455@prioris.mini.pw.edu.pl> In-Reply-To: <Pine.BSF.4.21.0301091050310.34227-100000@InterJet.elischer.org> References: <20030109143059.GC47263@prioris.mini.pw.edu.pl> <Pine.BSF.4.21.0301091050310.34227-100000@InterJet.elischer.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jan 09, 2003 at 10:51:13AM -0800, Julian Elischer wrote: +> how do you ensure that the thread doesn't own any locks when it does the +> longjmp? Hmm, hard to explain. I got my own infrastructure for this and every locks that are done I got in my-threads, so I just have to check those thread when setjmp() returns value != 0 and release them. I got also my own functions for locking/unlocking data based on tsleep()/wakeup_one() functions. For now this works only on 4.x, but I want to be prepare for 5.x (but I don't understand mutexes handling for now). Also... I got setjmp() only in one place and when I'm returning with longjmp() I need to just unlock everything that was locked between setjmp() and longjmp() and this is easy, because every lock is stored in my-thread structure. -- Pawel Jakub Dawidek UNIX Systems Administrator http://garage.freebsd.pl Am I Evil? Yes, I Am. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030109195925.GD51455>