diff options
author | Andrew Waterman <waterman@cs.berkeley.edu> | 2015-02-09 15:38:07 -0800 |
---|---|---|
committer | Andrew Waterman <waterman@cs.berkeley.edu> | 2015-02-09 21:19:18 -0800 |
commit | 5c8645013001ff125f9b28e0f861328e9b9a4d12 (patch) | |
tree | 0b04cb002dd38ff87b1d9ead9f45f31717fb1617 /pk/atomic.h | |
parent | d2b36b1484059c5792cdf9243f972c83bb96026a (diff) | |
download | pk-5c8645013001ff125f9b28e0f861328e9b9a4d12.zip pk-5c8645013001ff125f9b28e0f861328e9b9a4d12.tar.gz pk-5c8645013001ff125f9b28e0f861328e9b9a4d12.tar.bz2 |
work in progress on new supervisor spec
Diffstat (limited to 'pk/atomic.h')
-rw-r--r-- | pk/atomic.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pk/atomic.h b/pk/atomic.h index fea1330..24db8be 100644 --- a/pk/atomic.h +++ b/pk/atomic.h @@ -74,7 +74,7 @@ static inline void spinlock_unlock(spinlock_t* lock) static inline long spinlock_lock_irqsave(spinlock_t* lock) { - long flags = clear_csr(status, SR_EI); + long flags = clear_csr(mstatus, MSTATUS_IE); spinlock_lock(lock); return flags; } @@ -82,7 +82,7 @@ static inline long spinlock_lock_irqsave(spinlock_t* lock) static inline void spinlock_unlock_irqrestore(spinlock_t* lock, long flags) { spinlock_unlock(lock); - set_csr(status, flags & SR_EI); + set_csr(mstatus, flags & MSTATUS_IE); } #endif |