Status: Unconfirmed
Owner: ----
Labels: Type-Bug Pri-2 OS-All Area-Misc

New issue 7942 by [email protected]: SCons enhancement: detect  
number of CPUs on POSIX (TODO(evanm))
http://code.google.com/p/chromium/issues/detail?id=7942

In src/build/SConscript.main, there is a linux-specific thing that is easy
to change to posix:

elif root_env['PLATFORM'] in ['linux', 'linux2', 'posix']:
   # TODO(evanm): this is Linux-specific, not posix.
   # Parse /proc/cpuinfo for processor count.
   cpus = len([l for l in open('/proc/cpuinfo') if  
l.startswith('processor\t')])

This can be rewritten to use the posix api:
cpus = os.sysconf('SC_NPROCESSORS_ONLN')


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/group/chromium-bugs
-~----------~----~----~----~------~----~------~--~---

Reply via email to