MIPS deadlock bug fix

Godmar Back gback at cs.utah.edu
Wed Jan 10 10:55:31 PST 2001



 Walter,

Are you saying that there's no access to any atomic instruction
(test-and-set, cmp-exchange, fetch-and-add, whatever) in usermode
on the MIPS R3000?

Hmmm...
http://www.ddci.dk/support/free/white_papers/monitor.html says the same:
(The reason semaphores and locks are relatively slow to begin with, is 
that the MIPS R3000 architecture does not have an atomic test-and-set 
instruction, so that semaphores and locks must go through a generalized 
system call and machine exception handling process.)

Well, then why don't you put the generic version with jthread_ in 
your config/mips/... file and ifdef it with (R3000) or whatever macro
the compiler defines when compiling for it.  I take it the R4000 fixes
that oversight.

	- Godmar



More information about the kaffe mailing list