Skip to content

Commit

Permalink
windows: use hweight64(), it's a 64-bit type
Browse files Browse the repository at this point in the history
Courtesy of Bruce.

Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
axboe committed Jan 21, 2013
1 parent def823d commit 4ee47af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion os/windows/posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ int GetNumLogicalProcessors(void)
for (i = 0; i < len / sizeof(SYSTEM_LOGICAL_PROCESSOR_INFORMATION); i++)
{
if (processor_info[i].Relationship == RelationProcessorCore)
num_processors += hweight32(processor_info[i].ProcessorMask);
num_processors += hweight64(processor_info[i].ProcessorMask);
}

free(processor_info);
Expand Down

0 comments on commit 4ee47af

Please sign in to comment.