From cb873084d0a29db4de571c01041f64ad390e1a2f Mon Sep 17 00:00:00 2001 From: Shane Wang Date: Thu, 23 Feb 2012 21:47:19 +0800 Subject: 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 Signed-off-by: Richard Purdie --- bitbake/lib/bb/command.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'bitbake/lib/bb/command.py') diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py index 2a3a3afaca..4e9e8d657e 100644 --- a/bitbake/lib/bb/command.py +++ b/bitbake/lib/bb/command.py @@ -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: """ -- cgit v1.2.3-54-g00ecf