1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-03 01:40:07 +00:00

command.py: add new API to get the cpu count on the server

Add a new API in command.py to get the cpu count in order to set the appropriate default BB_NUMBER_THREADS and PARALLEL_MAKE variables.

(Bitbake rev: 335047b2e440e65713e88fabb24b47a9c82f939b)

Signed-off-by: Shane Wang <shane.wang@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Shane Wang
2012-02-23 21:47:19 +08:00
committed by Richard Purdie
parent c42f973180
commit cb873084d0
2 changed files with 10 additions and 0 deletions
+6
View File
@@ -173,6 +173,12 @@ class CommandsSync:
"""
command.cooker.reset()
def getCpuCount(self, command, params):
"""
Get the CPU count on the bitbake server
"""
return bb.utils.cpu_count()
class CommandsAsync:
"""