kernel: Improve rw_spinlock implementation

* Add more debug checks
 * Reduce the number of executed instructions that lock the bus.
This commit is contained in:
Pawel Dziepak
2013-11-21 02:25:03 +01:00
parent 6fb61d001a
commit 024541a4c8
2 changed files with 79 additions and 24 deletions
+3 -2
View File
@@ -100,8 +100,6 @@ release_spinlock_inline(spinlock* lock)
#define acquire_spinlock(lock) acquire_spinlock_inline(lock)
#define release_spinlock(lock) release_spinlock_inline(lock)
#endif // !DEBUG_SPINLOCKS && !B_DEBUG_SPINLOCK_CONTENTION
static inline bool
try_acquire_write_spinlock_inline(rw_spinlock* lock)
@@ -207,4 +205,7 @@ release_read_seqlock_inline(seqlock* lock, uint32 count) {
release_read_seqlock_inline(lock, count)
#endif // !DEBUG_SPINLOCKS && !B_DEBUG_SPINLOCK_CONTENTION
#endif /* KERNEL_SMP_H */