
mutex underscore lock colon
TSL REGISTER coma MUTEX vertical line copy mutex to register and set mutex to 1
CMP REGISTER coma hash 0 vertical line was mutex zero question mark
JZE ok vertical line if it was zero coma mutex was unlocked coma so return
CALL thread underscore yield vertical line mutex is busy semicolon schedule another thread
JMP mutex underscore lock vertical line try again
ok colon RET vertical line return to caller semicolon critical region entered
mutex underscore unlock colon
MOVE MUTEX coma hash 0 vertical line store a 0 in mutex
RET vertical line return to caller
Back