Re: ntdll: Fix calculation of process and thread affinity masks on systems with a large number of processors.
Jan. 15, 2015
noon
On 15 Jan 2015, at 12:44, Hans Leidekker wrote: > + const DWORD shift = min(NtCurrentTeb()->Peb- > >NumberOfProcessors, sizeof(DWORD_PTR) * 8); > + const DWORD_PTR mask = (1 << shift) - 1; Note that this will result in a mask of 0 on i386 if NumberOfProcessors >= 32 (and on x86-64 if NumberProcessors >= 64). (1 << 32) == 1 on Intel if calculated as a 32 bit operation, and similarly (1 << 64) == 1 on 64 bit. Jonas
4089
Age (days ago)
4089
Last active (days ago)
0 comments
1 participants
participants (1)
-
Jonas Maebe