forked from KolibriOS/kolibrios
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:
parent
944bcba007
commit
be9e2b43f3
@ -2254,8 +2254,9 @@ sys_cachetodiskette:
|
|||||||
|
|
||||||
uglobal
|
uglobal
|
||||||
; bgrchanged dd 0x0
|
; bgrchanged dd 0x0
|
||||||
bgrlock db 0
|
align 4
|
||||||
bgrlockpid dd 0
|
bgrlockpid dd 0
|
||||||
|
bgrlock db 0
|
||||||
endg
|
endg
|
||||||
|
|
||||||
sys_background:
|
sys_background:
|
||||||
@ -2267,10 +2268,9 @@ sys_background:
|
|||||||
cmp edx,0
|
cmp edx,0
|
||||||
je sbgrr
|
je sbgrr
|
||||||
@@:
|
@@:
|
||||||
mov al, 1
|
;;Maxis use atomic bts for mutexes 4.4.2009
|
||||||
xchg [bgrlock], al
|
bts dword [bgrlock], 0
|
||||||
test al, al
|
jnc @f
|
||||||
jz @f
|
|
||||||
call change_task
|
call change_task
|
||||||
jmp @b
|
jmp @b
|
||||||
@@:
|
@@:
|
||||||
@ -2368,11 +2368,10 @@ draw_background_temp:
|
|||||||
|
|
||||||
cmp ebx, 6
|
cmp ebx, 6
|
||||||
jnz nosb6
|
jnz nosb6
|
||||||
|
;;Maxis use atomic bts for mutex 4.4.2009
|
||||||
@@:
|
@@:
|
||||||
mov al, 1
|
bts [bgrlock], 0
|
||||||
xchg [bgrlock], al
|
jnc @f
|
||||||
test al, al
|
|
||||||
jz @f
|
|
||||||
call change_task
|
call change_task
|
||||||
jmp @b
|
jmp @b
|
||||||
@@:
|
@@:
|
||||||
|
Loading…
Reference in New Issue
Block a user