Lines 2361-2366
Link Here
|
2361 |
return (r); |
2361 |
return (r); |
2362 |
} |
2362 |
} |
2363 |
|
2363 |
|
|
|
2364 |
uintptr_t |
2365 |
InterlockedCompareExchange(dst, exc, com) |
2366 |
volatile uint32_t *dst; |
2367 |
uintptr_t exc; |
2368 |
uintptr_t com; |
2369 |
{ |
2370 |
uintptr_t r; |
2371 |
|
2372 |
mtx_lock_spin(&ntoskrnl_interlock); |
2373 |
r = *dst; |
2374 |
if(*dst == com) *dst = exc; |
2375 |
mtx_unlock_spin(&ntoskrnl_interlock); |
2376 |
|
2377 |
return (r); |
2378 |
} |
2379 |
|
2364 |
static uint32_t |
2380 |
static uint32_t |
2365 |
InterlockedIncrement(addend) |
2381 |
InterlockedIncrement(addend) |
2366 |
volatile uint32_t *addend; |
2382 |
volatile uint32_t *addend; |
Lines 4381-4386
Link Here
|
4381 |
IMPORT_FFUNC(InterlockedIncrement, 1), |
4397 |
IMPORT_FFUNC(InterlockedIncrement, 1), |
4382 |
IMPORT_FFUNC(InterlockedDecrement, 1), |
4398 |
IMPORT_FFUNC(InterlockedDecrement, 1), |
4383 |
IMPORT_FFUNC(InterlockedExchange, 2), |
4399 |
IMPORT_FFUNC(InterlockedExchange, 2), |
|
|
4400 |
IMPORT_FFUNC(InterlockedCompareExchange, 3), |
4384 |
IMPORT_FFUNC(ExInterlockedAddLargeStatistic, 2), |
4401 |
IMPORT_FFUNC(ExInterlockedAddLargeStatistic, 2), |
4385 |
IMPORT_SFUNC(IoAllocateMdl, 5), |
4402 |
IMPORT_SFUNC(IoAllocateMdl, 5), |
4386 |
IMPORT_SFUNC(IoFreeMdl, 1), |
4403 |
IMPORT_SFUNC(IoFreeMdl, 1), |