git://git.webkit.org
/
WebKit-https.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
c5f28a15d5ffafa643f317eb53bcbea6386c5238
[WebKit-https.git]
/
WebKitTools
/
Scripts
/
num-cpus
1
#!/usr/bin/perl
2
3
use strict;
4
use warnings;
5
6
use Win32API::Registry 0.21 qw( :ALL );
7
8
9
my $key;
10
my $i = 0;
11
while (RegOpenKeyEx(HKEY_LOCAL_MACHINE, "HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\$i", 0, KEY_READ, $key)) {
12
$i++;
13
RegCloseKey($key);
14
}
15
16
print "$i\n";