aboutsummaryrefslogtreecommitdiffstats
path: root/util/system/atexit.cpp
diff options
context:
space:
mode:
authoriddqd <iddqd@yandex-team.ru>2022-02-10 16:49:46 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:46 +0300
commitff241e1daf76d79ed38015cdb76d55eb3a33ac27 (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /util/system/atexit.cpp
parent07fce9c5f7771600d0b3d70e1f88fd8a7e164d85 (diff)
downloadydb-ff241e1daf76d79ed38015cdb76d55eb3a33ac27.tar.gz
Restoring authorship annotation for <iddqd@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/system/atexit.cpp')
-rw-r--r--util/system/atexit.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/util/system/atexit.cpp b/util/system/atexit.cpp
index c816bc5fe0..74fb10b6b1 100644
--- a/util/system/atexit.cpp
+++ b/util/system/atexit.cpp
@@ -35,7 +35,7 @@ namespace {
}
inline void Finish() noexcept {
- AtomicSet(FinishStarted_, 1);
+ AtomicSet(FinishStarted_, 1);
auto guard = Guard(Lock_);
@@ -65,13 +65,13 @@ namespace {
}
}
- inline bool FinishStarted() const {
- return AtomicGet(FinishStarted_);
- }
+ inline bool FinishStarted() const {
+ return AtomicGet(FinishStarted_);
+ }
private:
TAdaptiveLock Lock_;
- TAtomic FinishStarted_;
+ TAtomic FinishStarted_;
TDeque<TFunc> Store_;
TPriorityQueue<TFunc*, TVector<TFunc*>, TCmp> Items_;
};
@@ -108,13 +108,13 @@ void ManualRunAtExitFinalizers() {
OnExit();
}
-bool ExitStarted() {
+bool ExitStarted() {
if (TAtExit* const atExit = AtomicGet(atExitPtr)) {
return atExit->FinishStarted();
- }
+ }
return false;
-}
-
+}
+
void AtExit(TAtExitFunc func, void* ctx, size_t priority) {
Instance()->Register(func, ctx, priority);
}