use atomic bts for mutex in sys_background from Maxis

git-svn-id: svn://kolibrios.org@1071 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Evgeny Grechnikov (Diamond) 2009-05-16 09:57:16 +00:00
parent 944bcba007
commit be9e2b43f3

View File

@ -2254,8 +2254,9 @@ sys_cachetodiskette:
uglobal
; bgrchanged dd 0x0
bgrlock db 0
align 4
bgrlockpid dd 0
bgrlock db 0
endg
sys_background:
@ -2267,10 +2268,9 @@ sys_background:
cmp edx,0
je sbgrr
@@:
mov al, 1
xchg [bgrlock], al
test al, al
jz @f
;;Maxis use atomic bts for mutexes 4.4.2009
bts dword [bgrlock], 0
jnc @f
call change_task
jmp @b
@@:
@ -2368,11 +2368,10 @@ draw_background_temp:
cmp ebx, 6
jnz nosb6
;;Maxis use atomic bts for mutex 4.4.2009
@@:
mov al, 1
xchg [bgrlock], al
test al, al
jz @f
bts [bgrlock], 0
jnc @f
call change_task
jmp @b
@@: