windows: use hweight64(), it's a 64-bit type
authorJens Axboe <axboe@kernel.dk>
Mon, 21 Jan 2013 19:28:42 +0000 (12:28 -0700)
committerJens Axboe <axboe@kernel.dk>
Mon, 21 Jan 2013 19:28:42 +0000 (12:28 -0700)
Courtesy of Bruce.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
os/windows/posix.c

index c4d738c7ecd57aa3bd963f9c3cff6ab551acd880..f5d530011c4f938134bc8a6f77219704a053ebce 100755 (executable)
@@ -69,7 +69,7 @@ int GetNumLogicalProcessors(void)
        for (i = 0; i < len / sizeof(SYSTEM_LOGICAL_PROCESSOR_INFORMATION); i++)
        {
                if (processor_info[i].Relationship == RelationProcessorCore)
        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);
        }
 
        free(processor_info);