Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
#run all tests
diag "Executing URCU tests"
+NUM_CPUS="1"
+for i in nproc gnproc; do
+ NUM_CPUS=$($i 2>/dev/null)
+ if [ "$?" -eq "0" ]; then
+ break
+ else
+ NUM_CPUS="1"
+ fi
+done
+
#set to number of active CPUS
-NUM_CPUS=$(nproc)
if [[ ${NUM_CPUS} -lt 4 ]]; then
NUM_CPUS=4 # Floor at 4 due to following assumptions.
fi
TESTPROG=./test_urcu_hash
+NUM_CPUS="1"
+for i in nproc gnproc; do
+ NUM_CPUS=$($i 2>/dev/null)
+ if [ "$?" -eq "0" ]; then
+ break
+ else
+ NUM_CPUS="1"
+ fi
+done
+
#thread multiplier: number of processors divided by 4.
-NUM_CPUS=$(nproc)
if [[ ${NUM_CPUS} -lt 4 ]]; then
NUM_CPUS=4 # Floor at 4 due to following assumptions.
fi