diff options
author | Richard Braun <rbraun@sceen.net> | 2017-09-06 23:43:32 +0200 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2017-09-06 23:43:32 +0200 |
commit | ae2a752261bc95a2227c74785f11d535070696f6 (patch) | |
tree | 1419d436fbca642cba986fc9031d45b6f1425aca /test | |
parent | 7f4858978a49855b23904169db5e44d2fbdb428e (diff) |
test/test_mutex: minor change
Add a macro expanding to the required number of processors.
Diffstat (limited to 'test')
-rw-r--r-- | test/test_mutex.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/test_mutex.c b/test/test_mutex.c index f24cc9e1..9e28c78a 100644 --- a/test/test_mutex.c +++ b/test/test_mutex.c @@ -41,6 +41,8 @@ #include <kern/timer.h> #include <test/test.h> +#define TEST_MIN_CPUS 3 + #define TEST_REPORT_INTERVAL 10000 struct test { @@ -164,8 +166,8 @@ test_setup(void) { uint64_t time; - if (cpu_count() < 3) { - panic("test: at least 3 processors are required"); + if (cpu_count() < TEST_MIN_CPUS) { + panic("test: at least %u processors are required", TEST_MIN_CPUS); } test_create(1); |