diff options
Diffstat (limited to 'spinlock.h')
-rw-r--r-- | spinlock.h | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -1,4 +1,4 @@ -// Mutual exclusion lock. +// Mutual exclusion lock for short code fragments struct spinlock { uint locked; // Is the lock held? @@ -9,3 +9,8 @@ struct spinlock { // that locked the lock. }; +// Lock that maybe held across sleeps +struct sleeplock { + uint locked; // Is the lock held? +}; + |