[PATCH] wineboot: Fill ActiveProcessorAffinity field in USD.
Huw Davies
huw at codeweavers.com
Fri Nov 20 06:54:46 CST 2020
On Fri, Nov 20, 2020 at 02:55:48PM +0300, Paul Gofman wrote:
> diff --git a/programs/wineboot/wineboot.c b/programs/wineboot/wineboot.c
> index 05a5ee6aa62..b3a28444a06 100644
> --- a/programs/wineboot/wineboot.c
> +++ b/programs/wineboot/wineboot.c
> @@ -332,6 +332,8 @@ static void create_user_shared_data(void)
> break;
> }
> data->ActiveProcessorCount = NtCurrentTeb()->Peb->NumberOfProcessors;
> + data->ActiveProcessorAffinity = data->ActiveProcessorCount >= 64
Shouldn't this be >= 8 * sizeof(ULONG_PTR) ?
> + ? ~(ULONG_PTR)0 : ((ULONG_PTR)1 << data->ActiveProcessorCount) - 1;
> data->ActiveGroupCount = 1;
>
> initialize_xstate_features( data );
Also ActiveProcessorAffinity's type is currently ULONG, not ULONG_PTR.
Perhaps it should actually be ULONGLONG?
Huw.
More information about the wine-devel
mailing list