Changeset 5938 for trunk/src/kernel32
- Timestamp:
- Jun 9, 2001, 9:45:42 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/interlock.asm
r5816 r5938 1 ; $Id: interlock.asm,v 1. 9 2001-05-28 12:39:33 phallerExp $1 ; $Id: interlock.asm,v 1.10 2001-06-09 19:45:42 sandervl Exp $ 2 2 3 3 ;/* … … 32 32 33 33 _InterlockedIncrement@4 proc near 34 mov eax, dword ptr [esp+4] ; LPLONG lpAddend 35 lock inc dword ptr [eax] 36 mov eax, 0 ; Note: must be "MOV eax,0" 37 ; instead of faster "XOR eax,eax" 38 ; because MOV doesn't tough any 39 ; flag register. 40 41 je @end ; not incremented? 42 jl @decr 43 inc eax ; ? 44 jmp @end 45 @decr: dec eax ; ? 46 @end: ret 4 34 ;we are allowed to trash edx 35 mov edx, dword ptr [esp+4] ; LPLONG lpAddend 36 mov eax, 1 37 lock xadd dword ptr [edx], eax 38 inc eax 39 ret 4 47 40 _InterlockedIncrement@4 endp 48 41 … … 59 52 60 53 _InterlockedDecrement@4 proc near 61 mov eax, dword ptr [esp+4] ; LPLONG lpAddend 62 lock dec dword ptr [eax] 63 mov eax, 0 ; Note: must be "MOV eax,0" 64 ; instead of faster "XOR eax,eax" 65 ; because MOV doesn't tough any 66 ; flag register. 67 je @end ; not decremented? 68 jl @decr 69 inc eax ; ? 70 jmp @end 71 @decr: dec eax ; ? 72 @end: ret 4 54 ;we are allowed to trash edx 55 mov edx, dword ptr [esp+4] ; LPLONG lpAddend 56 mov eax, -1 57 lock xadd dword ptr [edx], eax 58 dec eax 59 ret 4 73 60 _InterlockedDecrement@4 endp 74 61
Note:
See TracChangeset
for help on using the changeset viewer.