[NDK][RTL] Fix RtlTryEnterCriticalSection() return type

The Win32 TryEnterCriticalSection(), which returns a 32-bit BOOL,
directly redirects to NTDLL!RtlTryEnterCriticalSection().

The latter should therefore return a 32-bit boolean as well:
use the LOGICAL type for this purpose. This change has been
validated with the System Informer phnt headers.

This mismatch was caught by Marcin Jabłoński (TheNNX).
This commit is contained in:
Hermès Bélusca-Maïto
2025-08-25 22:12:55 +02:00
parent e250b3fd01
commit ef5eadafb1
2 changed files with 3 additions and 3 deletions

View File

@@ -3214,7 +3214,7 @@ RtlLeaveCriticalSection(
);
NTSYSAPI
BOOLEAN
LOGICAL
NTAPI
RtlTryEnterCriticalSection(
_In_ PRTL_CRITICAL_SECTION CriticalSection

View File

@@ -819,7 +819,7 @@ RtlLeaveCriticalSection(PRTL_CRITICAL_SECTION CriticalSection)
* RtlTryEnterCriticalSection
* @implemented NT4
*
* Attemps to gain ownership of the critical section without waiting.
* Attempts to gain ownership of the critical section without waiting.
*
* Params:
* CriticalSection - Critical section to attempt acquiring.
@@ -831,7 +831,7 @@ RtlLeaveCriticalSection(PRTL_CRITICAL_SECTION CriticalSection)
* None
*
*--*/
BOOLEAN
LOGICAL
NTAPI
RtlTryEnterCriticalSection(PRTL_CRITICAL_SECTION CriticalSection)
{