A Ksem question [Was: Re: changes to thread locking layer]

Patrick Tullmann tullmann at cs.utah.edu
Mon Apr 10 12:42:31 PDT 2000


alanlb at rrinc.com wrote:
> I've made the modifications to the beos-native threading system to
> use Ksems instead, using a simple mapping to native semaphores.

Cool.

> Although I've managed to pass most of the regression tests, I've
> noticed that the ThreadState test program, among others, gets
> hopelessly deadlocked because the main thread attempts to acquire a
> lock it already holds.

Is it an internal lock (i.e., not a Java object lock)?  If so, do you
know which one?  A backtrace should provide sufficient information.

> I haven't made my Ksem implementation recursive, because FAQ.locks
> states that they don't have to be so.  Is this statement still true?

It should be.  Of course, bugs can break that assumption in all sorts
of ways.  ;)  I could also be wrong about the non-recursive usage,
though.

-Pat

----- ----- ---- ---  ---  --   -    -      -         -               -
Pat Tullmann                                       tullmann at cs.utah.edu
	  This signature witticism intentionally left blank.


More information about the kaffe mailing list