Changeset 243 for trunk/src/helpers/interlock.asm
- Timestamp:
- Jan 29, 2003, 7:41:39 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/helpers/interlock.asm
r196 r243 19 19 CODE32 SEGMENT DWORD PUBLIC USE32 'CODE' 20 20 21 ;* LONG DosInterlockedIncrement(PLONG);21 ;* LONG lockIncrement(PLONG); 22 22 ;* 23 23 ;* InterlockedIncrement adds 1 to a long variable and returns … … 28 28 ;* The returned number need not be equal to the result!!!! 29 29 30 public DosInterlockedIncrement31 DosInterlockedIncrement proc near30 public lockIncrement 31 lockIncrement proc near 32 32 ;we are allowed to trash edx 33 33 mov edx, dword ptr [esp+4] ; LPLONG lpAddend … … 36 36 inc eax 37 37 ret 4 38 DosInterlockedIncrement endp38 lockIncrement endp 39 39 40 ;* LONG DosInterlockedDecrement(PLONG);40 ;* LONG lockDecrement(PLONG); 41 41 ;* 42 42 ;* InterlockedIncrement adds 1 to a long variable and returns … … 47 47 ;* The returned number need not be equal to the result!!!! 48 48 49 public DosInterlockedDecrement50 DosInterlockedDecrement proc near49 public lockDecrement 50 lockDecrement proc near 51 51 ;we are allowed to trash edx 52 52 mov edx, dword ptr [esp+4] ; LPLONG lpAddend … … 55 55 dec eax 56 56 ret 4 57 DosInterlockedDecrement endp57 lockDecrement endp 58 58 59 59 60 ; * LONG DosInterlockedExchange(PLONG, LONG);60 ; * LONG lockExchange(PLONG, LONG); 61 61 ; * 62 62 ; * Atomically exchanges a pair of values. … … 65 65 ; * Prior value of value pointed to by Target 66 66 67 public DosInterlockedExchange68 DosInterlockedExchange proc near67 public lockExchange 68 lockExchange proc near 69 69 push edx 70 70 mov eax, [esp+12] ; LONG value … … 73 73 pop edx 74 74 ret 8 75 DosInterlockedExchange endp75 lockExchange endp 76 76 77 77 78 78 ;/************************************************************************ 79 ; * LONG DosInterlockedCompareExchange(PLONG dest, LONG xchg, LONG compare)79 ; * LONG lockCompareExchange(PLONG dest, LONG xchg, LONG compare) 80 80 ; * 81 81 ; * Atomically compares Destination and Comperand, and if found equal exchanges … … 84 84 ; */ 85 85 86 public DosInterlockedCompareExchange87 DosInterlockedCompareExchange proc near86 public lockCompareExchange 87 lockCompareExchange proc near 88 88 push ebp 89 89 mov ebp, esp … … 100 100 pop ebp 101 101 ret 12 102 DosInterlockedCompareExchange endp102 lockCompareExchange endp 103 103 104 ; * LONG DosInterlockedExchangeAdd(PLONG dest, LONG incr);104 ; * LONG lockExchangeAdd(PLONG dest, LONG incr); 105 105 ; * 106 106 ; * Atomically adds Increment to Addend and returns the previous value of … … 111 111 ; */ 112 112 113 public DosInterlockedExchangeAdd114 DosInterlockedExchangeAdd proc near113 public lockExchangeAdd 114 lockExchangeAdd proc near 115 115 push edx 116 116 mov eax, dword ptr [esp+12] ;LONG Increment /* Value to add */ … … 119 119 pop edx 120 120 ret 8 121 DosInterlockedExchangeAdd endp121 lockExchangeAdd endp 122 122 123 123 CODE32 ENDS
Note:
See TracChangeset
for help on using the changeset viewer.