]> git.buserror.net Git - polintos/scott/priv.git/blobdiff - kernel/include/kern/lock.h
Untangle header file interdependencies.
[polintos/scott/priv.git] / kernel / include / kern / lock.h
index 99a139e876352a3f55d67d16a7614a7334e1cd6d..46e009c500eacffa92ce6c4ed639029551a1a68f 100644 (file)
@@ -3,7 +3,7 @@
 
 #include <kern/kernel.h>
 #include <kern/spinlock.h>
-#include <kern/thread.h>
+#include <kern/sched.h>
 #include <util/spinlock.h>
 
 namespace Lock {
@@ -22,10 +22,8 @@ namespace Lock {
                void lock();
                void unlock();
 
-               bool held_by_curthread()
-               {
-                       return lockval == reinterpret_cast<ulong>(curthread);
-               }
+               // Include kern/thread.h for inline definition
+               bool held_by_curthread();
        };
 }