Lines Matching refs:t
45 inline void Push(T* const t) { in Push() argument
46 assert(t); in Push()
47 assert(!t->next_); in Push()
48 assert(!t->prev_); in Push()
56 t->next_ = head_; in Push()
58 head_->prev_ = t; in Push()
61 head_ = t; in Push()
63 tail_ = t; in Push()
68 inline void Unlink(T* const t) { in Unlink() argument
70 UnlinkImpl(t); in Unlink()
81 T* t = head_; in Pop() local
82 while (t && t->refs_) { in Pop()
83 t = t->next_; in Pop()
86 if (!t) { in Pop()
91 assert(!t->refs_); in Pop()
94 UnlinkImpl(t); in Pop()
95 return t; in Pop()
99 inline void Touch(T* const t) { in Touch() argument
101 UnlinkImpl(t); in Touch()
102 PushBackImpl(t); in Touch()
113 void UnlinkImpl(T* const t) { in UnlinkImpl() argument
114 assert(t); in UnlinkImpl()
119 assert(t->prev_ || head_ == t); in UnlinkImpl()
120 assert(t->next_ || tail_ == t); in UnlinkImpl()
122 if (t->prev_) { in UnlinkImpl()
123 t->prev_->next_ = t->next_; in UnlinkImpl()
125 if (t->next_) { in UnlinkImpl()
126 t->next_->prev_ = t->prev_; in UnlinkImpl()
129 if (tail_ == t) { in UnlinkImpl()
132 if (head_ == t) { in UnlinkImpl()
136 t->next_ = t->prev_ = nullptr; in UnlinkImpl()
140 inline void PushBack(T* const t) { in PushBack() argument
142 PushBackImpl(t); in PushBack()
145 inline void PushBackImpl(T* const t) { in PushBackImpl() argument
146 assert(t); in PushBackImpl()
147 assert(!t->next_); in PushBackImpl()
148 assert(!t->prev_); in PushBackImpl()
156 t->prev_ = tail_; in PushBackImpl()
158 tail_->next_ = t; in PushBackImpl()
161 tail_ = t; in PushBackImpl()