base: coding style

This commit is contained in:
Norman Feske 2015-03-27 14:27:55 +01:00 committed by Christian Helmuth
parent 13a0c336d9
commit 394fce110e
1 changed files with 17 additions and 20 deletions

View File

@ -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<Lock> Guard;
/**
* Lock guard
*/
typedef Lock_guard<Lock> Guard;
};
#endif /* _INCLUDE__BASE__LOCK_H_ */