Leopold Toetsch wrote:

> Why? The bytecode is patched by a different thread *if* an 
> event is due (which in CPU cycles is rare). And I don't see a 
> thread safety problem. The (possibly different) CPU reads an 
> opcode and runs it. Somewhere in the meantime, the opcode at 
> that memory position changes to the byte sequence 0xCC (on 
> intel: int3 ) one byte changes, the CPU executes the trap or 
> not (or course changing that memory position is assumed to be 
> atomic, which AFAIK works on i386) - but next time in the 
> loop the trap is honored.

Other threads than the target could be executing the same chunk
of JITted code at the same time.

-- 

Gordon Henriksen
IT Manager
ICLUBcentral Inc.
[EMAIL PROTECTED]

Reply via email to