diff options
Diffstat (limited to 'configfrag.ac')
-rw-r--r-- | configfrag.ac | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/configfrag.ac b/configfrag.ac index 361bf38..77b0024 100644 --- a/configfrag.ac +++ b/configfrag.ac @@ -30,9 +30,13 @@ AC_DEFINE([KERNEL], [1], [KERNEL]) # Used in `kern/bootstrap.c'. AC_DEFINE([BOOTSTRAP_SYMBOLS], [0], [BOOTSTRAP_SYMBOLS]) -# Multiprocessor support is broken. -AC_DEFINE([NCPUS], [1], [set things up for a uniprocessor]) +# Multiprocessor support is still broken. AH_TEMPLATE([MULTIPROCESSOR], [set things up for a uniprocessor]) +mach_ncpus=1 +AC_DEFINE_UNQUOTED([NCPUS], [$mach_ncpus], [number of CPUs]) +[if [ $mach_ncpus -gt 1 ]; then] + AC_DEFINE([MULTIPROCESSOR], [1], [set things up for a multiprocessor]) +[fi] # Restartable Atomic Sequences to get a really fast test-n-set. Can't be # enabled, as the `void recover_ras()' function is missing. |