- Timestamp:
- Aug 18, 1999, 11:54:27 PM (26 years ago)
- Location:
- trunk/src/kernel32
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/KERNEL32.CPP
r550 r558 1 /* $Id: KERNEL32.CPP,v 1.1 5 1999-08-18 17:17:59 sandervlExp $ */1 /* $Id: KERNEL32.CPP,v 1.16 1999-08-18 21:54:26 phaller Exp $ */ 2 2 3 3 /* … … 62 62 return HMCloseHandle(hHandle); 63 63 } 64 65 64 66 //****************************************************************************** 65 67 HANDLE WIN32API GetStdHandle(DWORD fdwDevice) … … 191 193 return O32_InterlockedExchange(arg1, arg2); 192 194 } 195 196 197 /************************************************************************ 198 * InterlockedCompareExchange [KERNEL32.879] 199 * 200 * Atomically compares Destination and Comperand, and if found equal exchanges 201 * the value of Destination with Exchange 202 * 203 * RETURNS 204 * Prior value of value pointed to by Destination 205 */ 206 PVOID WIN32API InterlockedCompareExchange( 207 PVOID *Destination, /* Address of 32-bit value to exchange */ 208 PVOID Exchange, /* change value, 32 bits */ 209 PVOID Comperand /* value to compare, 32 bits */ 210 ) { 211 PVOID ret; 212 /* StopAllThreadsAndProcesses() */ 213 214 ret=*Destination; 215 if(*Destination==Comperand) *Destination=Exchange; 216 217 /* ResumeAllThreadsAndProcesses() */ 218 return ret; 219 } 220 221 /************************************************************************ 222 * InterlockedExchangeAdd [KERNEL32.880] 223 * 224 * Atomically adds Increment to Addend and returns the previous value of 225 * Addend 226 * 227 * RETURNS 228 * Prior value of value pointed to by cwAddendTarget 229 */ 230 LONG WIN32API InterlockedExchangeAdd( 231 PLONG Addend, /* Address of 32-bit value to exchange */ 232 LONG Increment /* Value to add */ 233 ) { 234 LONG ret; 235 /* StopAllThreadsAndProcesses() */ 236 237 ret = *Addend; 238 *Addend += Increment; 239 240 /* ResumeAllThreadsAndProcesses() */ 241 return ret; 242 } 243 244 193 245 //****************************************************************************** 194 246 //****************************************************************************** -
trunk/src/kernel32/KERNEL32.DEF
r550 r558 1 ; $Id: KERNEL32.DEF,v 1.2 2 1999-08-18 17:18:00 sandervlExp $1 ; $Id: KERNEL32.DEF,v 1.23 1999-08-18 21:54:27 phaller Exp $ 2 2 3 3 ;Created by BLAST for IBM's compiler … … 557 557 InitializeCriticalSection = _InitializeCriticalSection@4 @472 558 558 ; InitializeCriticialSectionAndSpinCount = _InitializeCriticalSectionAndSpinCount@?? ;NT 559 ; InterlockedCompareExchange = _InterlockedCompareExchange@??;NT559 InterlockedCompareExchange = _InterlockedCompareExchange@12 @785 ;NT 560 560 InterlockedDecrement = _InterlockedDecrement@4 @473 561 561 InterlockedExchange = _InterlockedExchange@8 @474 562 ; InterlockedExchangeAdd = _InterlockedExchangeAdd@??;NT562 InterlockedExchangeAdd = _InterlockedExchangeAdd@8 @786 ;NT 563 563 InterlockedIncrement = _InterlockedIncrement@4 @475 564 564 ; InvalidateNLSCache = _InvalidateNLSCache@?? @476 ;W95 -
trunk/src/kernel32/profile.cpp
r551 r558 1 /* $Id: profile.cpp,v 1.1 5 1999-08-18 17:26:44 sandervlExp $ */1 /* $Id: profile.cpp,v 1.16 1999-08-18 21:54:27 phaller Exp $ */ 2 2 3 3 /* … … 1399 1399 1400 1400 EnterCriticalSection(&PROFILE_CritSect); 1401 if (MRUProfile && CurProfile->filename) 1402 {1401 1402 if (CurProfile && CurProfile->filename) 1403 1403 PROFILE_FlushFile(); //flash current 1404 1405 if (MRUProfile) 1406 { 1404 1407 lastCurProfile = CurProfile; 1405 1408 for(x = 1;x < N_CACHED_PROFILES;x++)
Note:
See TracChangeset
for help on using the changeset viewer.