Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/ntdll/actctx.c | 2 +- dlls/ntdll/loader.c | 8 ++++---- dlls/ntdll/sync.c | 12 ++++++------ 3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/dlls/ntdll/actctx.c b/dlls/ntdll/actctx.c index ca38f37e673..9fa93a3b5e3 100644 --- a/dlls/ntdll/actctx.c +++ b/dlls/ntdll/actctx.c @@ -532,7 +532,7 @@ enum context_sections typedef struct _ACTIVATION_CONTEXT { ULONG magic; - int ref_count; + LONG ref_count; struct file_info config; struct file_info appdir; struct assembly *assemblies; diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index b50b9e61bbc..3a3cc82582a 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -250,8 +250,8 @@ RTL_UNLOAD_EVENT_TRACE * WINAPI RtlGetUnloadEventTrace(void) */ void WINAPI RtlGetUnloadEventTraceEx(ULONG **size, ULONG **count, void **trace) { - static unsigned int element_size = sizeof(*unload_traces); - static unsigned int element_count = ARRAY_SIZE(unload_traces); + static ULONG element_size = sizeof(*unload_traces); + static ULONG element_count = ARRAY_SIZE(unload_traces);
*size = &element_size; *count = &element_count; @@ -4369,7 +4369,7 @@ NTSTATUS WINAPI RtlSetSearchPathMode( ULONG flags ) val = 0; break; case BASE_SEARCH_PATH_ENABLE_SAFE_SEARCHMODE | BASE_SEARCH_PATH_PERMANENT: - InterlockedExchange( (int *)&path_safe_mode, 2 ); + InterlockedExchange( (LONG *)&path_safe_mode, 2 ); return STATUS_SUCCESS; default: return STATUS_INVALID_PARAMETER; @@ -4379,7 +4379,7 @@ NTSTATUS WINAPI RtlSetSearchPathMode( ULONG flags ) { int prev = path_safe_mode; if (prev == 2) break; /* permanently set */ - if (InterlockedCompareExchange( (int *)&path_safe_mode, val, prev ) == prev) return STATUS_SUCCESS; + if (InterlockedCompareExchange( (LONG *)&path_safe_mode, val, prev ) == prev) return STATUS_SUCCESS; } return STATUS_ACCESS_DENIED; } diff --git a/dlls/ntdll/sync.c b/dlls/ntdll/sync.c index bdb39e59d6d..06b594c633f 100644 --- a/dlls/ntdll/sync.c +++ b/dlls/ntdll/sync.c @@ -182,12 +182,12 @@ static inline NTSTATUS wait_semaphore( RTL_CRITICAL_SECTION *crit, int timeout ) } else { - int *lock = (int *)&crit->LockSemaphore; + LONG *lock = (LONG *)&crit->LockSemaphore; while (!InterlockedCompareExchange( lock, 0, 1 )) { - static const int zero; + static const LONG zero; /* this may wait longer than specified in case of multiple wake-ups */ - if (RtlWaitOnAddress( lock, &zero, sizeof(int), &time ) == STATUS_TIMEOUT) + if (RtlWaitOnAddress( lock, &zero, sizeof(LONG), &time ) == STATUS_TIMEOUT) return STATUS_TIMEOUT; } return STATUS_WAIT_0; @@ -363,7 +363,7 @@ NTSTATUS WINAPI RtlpUnWaitCriticalSection( RTL_CRITICAL_SECTION *crit ) } else { - int *lock = (int *)&crit->LockSemaphore; + LONG *lock = (LONG *)&crit->LockSemaphore; InterlockedExchange( lock, 1 ); RtlWakeAddressSingle( lock ); ret = STATUS_SUCCESS; @@ -761,7 +761,7 @@ void WINAPI RtlInitializeConditionVariable( RTL_CONDITION_VARIABLE *variable ) */ void WINAPI RtlWakeConditionVariable( RTL_CONDITION_VARIABLE *variable ) { - InterlockedIncrement( (int *)&variable->Ptr ); + InterlockedIncrement( (LONG *)&variable->Ptr ); RtlWakeAddressSingle( variable ); }
@@ -772,7 +772,7 @@ void WINAPI RtlWakeConditionVariable( RTL_CONDITION_VARIABLE *variable ) */ void WINAPI RtlWakeAllConditionVariable( RTL_CONDITION_VARIABLE *variable ) { - InterlockedIncrement( (int *)&variable->Ptr ); + InterlockedIncrement( (LONG *)&variable->Ptr ); RtlWakeAddressAll( variable ); }