webengine/osswebengine/WebKitTools/Scripts/num-cpus
author Pat Downey <patd@symbian.org>
Mon, 26 Oct 2009 17:47:05 +0000
changeset 16 23198bb167b0
parent 0 dd21522fd290
permissions -rw-r--r--
Merge tags.

#!/usr/bin/perl

use strict;
use warnings;

use Win32API::Registry 0.21 qw( :ALL );


my $key;
my $i = 0;
while (RegOpenKeyEx(HKEY_LOCAL_MACHINE, "HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\$i", 0, KEY_READ, $key)) {
    $i++;
    RegCloseKey($key);
}

print "$i\n";