diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_synch.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c index 0d36d7f..497aff7 100644 --- a/sys/kern/kern_synch.c +++ b/sys/kern/kern_synch.c @@ -35,6 +35,7 @@ #include <sys/atomic.h> #include <sys/syslog.h> #include <sys/spinlock.h> +#include <machine/cdefs.h> #include <dev/timer.h> #include <string.h> @@ -83,7 +84,9 @@ spinlock_usleep(struct spinlock *lock, size_t usec_max) void spinlock_acquire(struct spinlock *lock) { - while (__atomic_test_and_set(&lock->lock, __ATOMIC_ACQUIRE)); + while (__atomic_test_and_set(&lock->lock, __ATOMIC_ACQUIRE)) { + md_pause(); + } } /* |