diff options
| author | Patrick Williams <iawillia@us.ibm.com> | 2010-06-09 14:12:01 -0500 |
|---|---|---|
| committer | Patrick Williams <iawillia@us.ibm.com> | 2010-06-09 14:12:01 -0500 |
| commit | e7a6ae9cc5b84abe63c7439005656ecc4beda8c1 (patch) | |
| tree | e50ad79598edeccd4b2e513f146896d2d60f0c82 /src/include/kernel/spinlock.H | |
| parent | cbbd9e5b225e743ee3b4688ac6a3b69a9876926a (diff) | |
| download | blackbird-hostboot-e7a6ae9cc5b84abe63c7439005656ecc4beda8c1.tar.gz blackbird-hostboot-e7a6ae9cc5b84abe63c7439005656ecc4beda8c1.zip | |
Kernel spinlock support.
Diffstat (limited to 'src/include/kernel/spinlock.H')
| -rw-r--r-- | src/include/kernel/spinlock.H | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/include/kernel/spinlock.H b/src/include/kernel/spinlock.H new file mode 100644 index 000000000..92d1f6e05 --- /dev/null +++ b/src/include/kernel/spinlock.H @@ -0,0 +1,20 @@ +#ifndef __KERNEL_SPINLOCK_H +#define __KERNEL_SPINLOCK_H + +#include <util/locked/lock.H> +#include <stdint.h> + +class Spinlock : public Util::Locked::Lock +{ + public: + Spinlock() : iv_reserve(0), iv_ready(0) {}; + + void lock(); + void unlock(); + + private: + volatile uint64_t iv_reserve; + volatile uint64_t iv_ready; +}; + +#endif |

