diff options
author | orivej <orivej@yandex-team.ru> | 2022-02-10 16:44:49 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:44:49 +0300 |
commit | 718c552901d703c502ccbefdfc3c9028d608b947 (patch) | |
tree | 46534a98bbefcd7b1f3faa5b52c138ab27db75b7 /util/thread | |
parent | e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (diff) | |
download | ydb-718c552901d703c502ccbefdfc3c9028d608b947.tar.gz |
Restoring authorship annotation for <orivej@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/thread')
-rw-r--r-- | util/thread/lfstack.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/util/thread/lfstack.h b/util/thread/lfstack.h index ca3d95f3c3..b94bf11b48 100644 --- a/util/thread/lfstack.h +++ b/util/thread/lfstack.h @@ -35,14 +35,14 @@ class TLockFreeStack: TNonCopyable { EraseList(current); } } - void EraseList(TNode* volatile p) { + void EraseList(TNode* volatile p) { while (p) { TNode* next = p->Next; delete p; p = next; } } - void EnqueueImpl(TNode* volatile head, TNode* volatile tail) { + void EnqueueImpl(TNode* volatile head, TNode* volatile tail) { for (;;) { tail->Next = AtomicGet(Head); if (AtomicCas(&Head, head, tail->Next)) @@ -51,7 +51,7 @@ class TLockFreeStack: TNonCopyable { } template <class U> void EnqueueImpl(U&& u) { - TNode* volatile node = new TNode(std::forward<U>(u)); + TNode* volatile node = new TNode(std::forward<U>(u)); EnqueueImpl(node, node); } @@ -85,8 +85,8 @@ public: return; } TIter i = dataBegin; - TNode* volatile node = new TNode(*i); - TNode* volatile tail = node; + TNode* volatile node = new TNode(*i); + TNode* volatile tail = node; for (++i; i != dataEnd; ++i) { TNode* nextNode = node; |