os_kernel_lab/related_info/lab7/race-condition/wait-for-me.s
2015-04-29 12:38:37 +08:00

14 lines
166 B
ArmAsm

.main
test $1, %ax # ax should be 1 (signaller) or 0 (waiter)
je .signaller
.waiter
mov 2000, %cx
test $1, %cx
jne .waiter
halt
.signaller
mov $1, 2000
halt