diff options
author | Cary Clark <> | 2009-04-14 06:33:00 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-04-14 06:33:00 -0700 |
commit | 563af33bc48281d19dce701398dbb88cb54fd7ec (patch) | |
tree | 395b4502f029dea8b25b342d66dc06b5d8f99985 /WebKitTools/Scripts/num-cpus | |
parent | 5cfedfef172691d0f4bcf2be5ca3cddd8c9a47f4 (diff) | |
download | external_webkit-563af33bc48281d19dce701398dbb88cb54fd7ec.zip external_webkit-563af33bc48281d19dce701398dbb88cb54fd7ec.tar.gz external_webkit-563af33bc48281d19dce701398dbb88cb54fd7ec.tar.bz2 |
AI 146110: add missing files to webkit
brings it in sync with webkit svn cl 42046
Automated import of CL 146110
Diffstat (limited to 'WebKitTools/Scripts/num-cpus')
-rwxr-xr-x | WebKitTools/Scripts/num-cpus | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/WebKitTools/Scripts/num-cpus b/WebKitTools/Scripts/num-cpus new file mode 100755 index 0000000..c5f28a1 --- /dev/null +++ b/WebKitTools/Scripts/num-cpus @@ -0,0 +1,16 @@ +#!/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"; |