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 c4d738c..f5d5300 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)
-                       num_processors += hweight32(processor_info[i].ProcessorMask);
+                       num_processors += hweight64(processor_info[i].ProcessorMask);
        }
 
        free(processor_info);