Changeset 328 for trunk/Include/api_system.sbp
- Timestamp:
- Sep 8, 2007, 8:41:52 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Include/api_system.sbp
r300 r328 218 218 '---------------------- 219 219 ' Kernel Operation API 220 #ifdef _WIN64 221 Function InterlockedIncrement(ByRef lpAddend As Long) As Long 222 lpAddend++ 223 Return lpAddend 224 End Function 225 Function InterlockedDecrement(ByRef lpAddend As Long) As Long 226 lpAddend-- 227 Return lpAddend 228 End Function 229 Function InterlockedExchange(ByRef Target As Long, Value As Long) As Long 230 Target = Value 231 Return Target 232 End Function 233 Function InterlockedCompareExchange(ByRef Destination As Long, Exchange As Long, Comperand As Long) As Long 234 InterlockedCompareExchange = Destination 235 If Destination = Comperand Then 236 Destination = Exchange 237 End If 238 End Function 239 Function InterlockedExchangeAdd(ByRef Addend As Long, Value As Long) As Long 240 InterlockedExchangeAdd = Addend 241 Addend += Value 242 End Function 243 Function InterlockedExchangePointer(ByRef Target As VoidPtr, Value As VoidPtr) As VoidPtr 244 Target = Value 245 Return Target 246 End Function 247 Function InterlockedCompareExchangePointer(ByRef Destination As VoidPtr, Exchange As VoidPtr, Comperand As VoidPtr) As VoidPtr 248 InterlockedCompareExchangePointer = Destination 249 If Destination = Comperand Then 250 Destination = Exchange 251 End If 252 End Function 253 #else 220 254 Declare Function InterlockedIncrement Lib "kernel32" (ByRef lpAddend As Long) As Long 221 255 Declare Function InterlockedDecrement Lib "kernel32" (ByRef lpAddend As Long) As Long … … 223 257 Declare Function InterlockedCompareExchange Lib "kernel32" (ByRef Destination As Long, Exchange As Long, Comperand As Long) As Long 224 258 Declare Function InterlockedExchangeAdd Lib "kernel32" (ByRef Addend As Long, Value As Long) As Long 225 #ifdef _WIN64226 Declare Function InterlockedCompareExchangePointer Lib "kernel32" (ByRef Destination As VoidPtr, Exchange As VoidPtr, Comperand As VoidPtr) As VoidPtr227 Declare Function InterlockedExchangePointer Lib "kernel32" (ByRef Target As VoidPtr, Value As VoidPtr) As VoidPtr228 #else229 259 Declare Function InterlockedCompareExchangePointer Lib "kernel32" Alias "InterlockedCompareExchange" (ByRef Destination As VoidPtr, Exchange As VoidPtr, Comperand As VoidPtr) As VoidPtr 230 260 Declare Function InterlockedExchangePointer Lib "kernel32" Alias "InterlockedExchange" (ByRef Target As VoidPtr, Value As VoidPtr) As VoidPtr
Note:
See TracChangeset
for help on using the changeset viewer.