[KERNEL32] Improve annotation of BaseProcess/ThreadStartup(); remove useless cast; fix PPROCESS_START_ROUTINE return type.

This commit is contained in:
Hermès Bélusca-Maïto 2022-04-18 01:20:22 +02:00
parent 7e13883723
commit 75e2fb4566
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
3 changed files with 17 additions and 13 deletions

View file

@ -445,12 +445,12 @@ BasepSxsCloseHandles(IN PBASE_MSG_SXS_HANDLES Handles)
}
}
DECLSPEC_NORETURN
VOID
WINAPI
BaseProcessStartup(PPROCESS_START_ROUTINE lpStartAddress)
BaseProcessStartup(
_In_ PPROCESS_START_ROUTINE lpStartAddress)
{
DPRINT("BaseProcessStartup(..) - setting up exception frame.\n");
_SEH2_TRY
{
/* Set our Start Address */

View file

@ -50,11 +50,12 @@ BasepNotifyCsrOfThread(IN HANDLE ThreadHandle,
return STATUS_SUCCESS;
}
__declspec(noreturn)
DECLSPEC_NORETURN
VOID
WINAPI
BaseThreadStartup(IN LPTHREAD_START_ROUTINE lpStartAddress,
IN LPVOID lpParameter)
BaseThreadStartup(
_In_ LPTHREAD_START_ROUTINE lpStartAddress,
_In_ LPVOID lpParameter)
{
/* Attempt to call the Thread Start Address */
_SEH2_TRY
@ -67,7 +68,7 @@ BaseThreadStartup(IN LPTHREAD_START_ROUTINE lpStartAddress,
}
/* Get the exit code from the Thread Start */
ExitThread((lpStartAddress)((PVOID)lpParameter));
ExitThread(lpStartAddress(lpParameter));
}
_SEH2_EXCEPT(UnhandledExceptionFilter(_SEH2_GetExceptionInformation()))
{

View file

@ -234,22 +234,25 @@ BasepProbeForDllManifest(
OUT PVOID *ActCtx
);
__declspec(noreturn)
DECLSPEC_NORETURN
VOID
WINAPI
BaseThreadStartup(LPTHREAD_START_ROUTINE lpStartAddress,
LPVOID lpParameter);
BaseThreadStartup(
_In_ LPTHREAD_START_ROUTINE lpStartAddress,
_In_ LPVOID lpParameter);
__declspec(noreturn)
DECLSPEC_NORETURN
VOID
WINAPI
BaseFiberStartup(VOID);
typedef UINT (WINAPI *PPROCESS_START_ROUTINE)(VOID);
typedef DWORD (WINAPI *PPROCESS_START_ROUTINE)(VOID);
DECLSPEC_NORETURN
VOID
WINAPI
BaseProcessStartup(PPROCESS_START_ROUTINE lpStartAddress);
BaseProcessStartup(
_In_ PPROCESS_START_ROUTINE lpStartAddress);
PVOID
WINAPI