MCPcopy Create free account
hub / github.com/catboost/catboost / Enqueue

Method Enqueue

library/cpp/lfalloc/lf_allocX64.h:673–680  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

671 void* Padding;
672
673 static Y_FORCE_INLINE void Enqueue(TNode* volatile* headPtr, TNode* n) {
674 for (;;) {
675 TNode* volatile prevHead = *headPtr;
676 n->Next = prevHead;
677 if (DoCas(headPtr, n, prevHead) == prevHead)
678 break;
679 }
680 }
681 Y_FORCE_INLINE void* DoAlloc() {
682 TNode* res;
683 for (res = Head; res; res = Head) {

Callers

nothing calls this directly

Calls 1

DoCasFunction · 0.70

Tested by

no test coverage detected