diff options
| author | Michal Idziorek <m.i@gmx.at> | 2014-11-26 23:17:55 +0100 |
|---|---|---|
| committer | Michal Idziorek <m.i@gmx.at> | 2014-11-26 23:17:55 +0100 |
| commit | 7393db6692c861bc66164c0dd9b83f23a554775b (patch) | |
| tree | d60c9deb33630d5fb6117c7c1bbc098e62a66f28 /kernel/spinlock.c | |
| parent | 9c8cfc2e52b0446f7cab14325028075760869b45 (diff) | |
changes, improvements and cleanup
Diffstat (limited to 'kernel/spinlock.c')
| -rw-r--r-- | kernel/spinlock.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/kernel/spinlock.c b/kernel/spinlock.c index 2c6d161..945d8ee 100644 --- a/kernel/spinlock.c +++ b/kernel/spinlock.c @@ -2,12 +2,12 @@ #include "lib/logger/log.h" #include "spinlock.h" +#include "x86.h" // https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html #define NUMBER_SPINLOCKS 16 - -spinlock spinlocks[NUMBER_SPINLOCKS]; +static spinlock spinlocks[NUMBER_SPINLOCKS]; void check_spinlocks() { @@ -16,7 +16,6 @@ void check_spinlocks() log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"%d",spinlocks[i]); } - void lock_spin(spinlock i) { @@ -31,7 +30,6 @@ void lock_release(spinlock i) // log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"unlocking %d",i); spinlock *addr=spinlocks+i; - asm("movb $0,%0"::"m"(*addr)); } |
