kernel32: add a stub for GetCurrentProcessorNumberEx (try 2)

Sebastian Lackner sebastian at fds-team.de
Fri Oct 9 07:30:01 CDT 2015


On 09.10.2015 12:15, Austin English wrote:
> Try 2:
> move implementation to ntdll.RtlGetCurrentProcessorNumberEx with a
> forward from kernel32.
> Initialize Group/Processor to 0.
> 
> For https://bugs.winehq.org/show_bug.cgi?id=39376
> 
> +/**********************************************************************
> + *           RtlGetCurrentProcessorNumberEx [NTDLL.@]
> + */
> +VOID WINAPI RtlGetCurrentProcessorNumberEx(PPROCESSOR_NUMBER processor)

I think its preferred to use PROCESSOR_NUMBER * here.

> +{
> +    processor->Group = 0;
> +    processor->Number = 0;

The ->Number member could be initialized to the result to NtGetCurrentProcessorNumber().
Initializing ->Group to 0 is correct because Wine supports max 64 processors.
According to MSDN, the struct also has a ->Reserved member, which probably should
be set to zero.

> +
> +    FIXME(":%p stub\n", processor);

It might be better to print the FIXME before accessing the pointer, this
allows to see if applications pass garbage pointers before the crash happens. ;)

> +}




More information about the wine-devel mailing list