diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2018-02-21 10:25:10 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2018-02-21 11:12:52 +0100 |
commit | 8354713abd533c3a48282f5cdce8961df5ffa178 (patch) | |
tree | 3ad16a88525d5209536708149de948f94e1e99e3 /proto-ft/mutex.hpp | |
parent | 7ffec3899cf9c2fe14350d72cfd0d1858481b43c (diff) |
[STABLE] contrib/npclient, proto/ft: revert
Diffstat (limited to 'proto-ft/mutex.hpp')
-rw-r--r-- | proto-ft/mutex.hpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/proto-ft/mutex.hpp b/proto-ft/mutex.hpp new file mode 100644 index 00000000..f92a14bf --- /dev/null +++ b/proto-ft/mutex.hpp @@ -0,0 +1,16 @@ +#pragma once + +class check_for_first_run final +{ + bool checked_for_first_run; + bool is_first_instance; + bool enabled; + + void try_exit(); +public: + check_for_first_run(); + bool is_first_run(); + void set_enabled(bool flag); + void try_runonce(); + ~check_for_first_run(); +}; |