make hlt start at 0x2000
[akaros.git] / kern / include / atomic.h
index 2c6919b..dbe2c68 100644 (file)
@@ -70,6 +70,7 @@ extern inline void __spin_unlock(spinlock_t *lock);
 #ifdef CONFIG_SPINLOCK_DEBUG
 /* Arch indep, in k/s/atomic.c */
 void spin_lock(spinlock_t *lock);
+bool spin_trylock(spinlock_t *lock);
 void spin_unlock(spinlock_t *lock);
 void spinlock_debug(spinlock_t *lock);
 
@@ -80,6 +81,11 @@ static inline void spin_lock(spinlock_t *lock)
        __spin_lock(lock);
 }
 
+static inline bool spin_trylock(spinlock_t *lock)
+{
+       return __spin_trylock(lock);
+}
+
 static inline void spin_unlock(spinlock_t *lock)
 {
        __spin_unlock(lock);