diff --git a/repos/base/include/base/lock.h b/repos/base/include/base/lock.h index 5d59141fe..d331255ad 100644 --- a/repos/base/include/base/lock.h +++ b/repos/base/include/base/lock.h @@ -19,29 +19,26 @@ namespace Genode { class Lock; } -class Genode::Lock : public Cancelable_lock +struct Genode::Lock : Cancelable_lock { - public: + /** + * Constructor + */ + explicit Lock(State initial = UNLOCKED) : Cancelable_lock(initial) { } - /** - * Constructor - */ - explicit Lock(State initial = UNLOCKED) - : Cancelable_lock(initial) { } + void lock() + { + while (1) + try { + Cancelable_lock::lock(); + return; + } catch (Blocking_canceled) { } + } - void lock() - { - while (1) - try { - Cancelable_lock::lock(); - return; - } catch (Blocking_canceled) { } - } - - /** - * Lock guard - */ - typedef Lock_guard Guard; + /** + * Lock guard + */ + typedef Lock_guard Guard; }; #endif /* _INCLUDE__BASE__LOCK_H_ */