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 [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message

