MCPcopy Create free account
hub / github.com/Tencent/libco / AddTail

Function AddTail

co_routine.cpp:192–211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

190
191template <class TNode,class TLink>
192void inline AddTail(TLink*apLink,TNode *ap)
193{
194 if( ap->pLink )
195 {
196 return ;
197 }
198 if(apLink->tail)
199 {
200 apLink->tail->pNext = (TNode*)ap;
201 ap->pNext = NULL;
202 ap->pPrev = apLink->tail;
203 apLink->tail = ap;
204 }
205 else
206 {
207 apLink->head = apLink->tail = ap;
208 ap->pNext = ap->pPrev = NULL;
209 }
210 ap->pLink = apLink;
211}
212template <class TNode,class TLink>
213void inline PopHead( TLink*apLink )
214{

Callers 6

AddTimeoutFunction · 0.85
OnPollPreparePfnFunction · 0.85
co_eventloopFunction · 0.85
co_cond_signalFunction · 0.85
co_cond_broadcastFunction · 0.85
co_cond_timedwaitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected