summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbel Romero Pérez <romeroperezabel@gmail.com>2018-06-28 02:19:30 -0400
committerAbel Romero Pérez <romeroperezabel@gmail.com>2018-06-28 02:19:30 -0400
commit14df0432c8d80fb42cec2f28ea7ef2d268a216c1 (patch)
treed8a677079527cf98c658b3eb113fbfe2936787f8
parenta740096d77b6ac73afa0eb174a945609384e7710 (diff)
parent3fed2f3264ebe6a1c7dd40a010c73c2882d2c6f5 (diff)
Merge branch 'smp' of https://github.com/AlmuHS/GNUMach_SMP into smp
-rw-r--r--configfrag.ac2
-rw-r--r--i386/i386/lock.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/configfrag.ac b/configfrag.ac
index 3d7033ec..d1fe1018 100644
--- a/configfrag.ac
+++ b/configfrag.ac
@@ -32,7 +32,7 @@ AC_DEFINE([BOOTSTRAP_SYMBOLS], [0], [BOOTSTRAP_SYMBOLS])
# Multiprocessor support is still broken.
AH_TEMPLATE([MULTIPROCESSOR], [set things up for a uniprocessor])
-mach_ncpus=1
+mach_ncpus=2
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])
diff --git a/i386/i386/lock.h b/i386/i386/lock.h
index 8efa0ca0..35e2ea4c 100644
--- a/i386/i386/lock.h
+++ b/i386/i386/lock.h
@@ -44,13 +44,13 @@
*/
#define _simple_lock_xchg_(lock, new_val) \
- ({ int _old_val_; \
+ ({ int _old_val_; \
asm volatile("xchgl %0, %2" \
: "=r" (_old_val_) \
: "0" (new_val), "m" (*(lock)) : "memory" \
); \
_old_val_; \
- })
+ })
#define simple_lock_init(l) \
((l)->lock_data = 0)