[PATCH] wineboot: Fill ActiveProcessorAffinity field in USD.
Paul Gofman
pgofman at codeweavers.com
Fri Nov 20 07:20:33 CST 2020
On 11/20/20 15:54, Huw Davies wrote:
> 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) ?
Yes, I will update it.
>
>> + ? ~(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?
Yeah, indeed, thanks. The structure's consequen the next field. the next
field. Geoff Chappel defines this field as:
union {
ULONGLONG AffinityPad;
ULONG ActiveProcessorAffinity;
};
But perhaps we can just make ActiveProcessorAffinity ULONGLONG. This is
defined as ULONGLONG Reserved4; in Win DDK 10.0.19041.
More information about the wine-devel
mailing list