12 #ifdef epicsExportSharedSymbols 13 # define fairQueueExportSharedSymbols 14 # undef epicsExportSharedSymbols 25 #ifdef fairQueueExportSharedSymbols 26 # define epicsExportSharedSymbols 27 # undef fairQueueExportSharedSymbols 87 enode.node.next = enode.node.previous =
NULL;
92 assert(!enode.node.next && !enode.node.previous);
93 assert(Qcnt==0 && !holder);
113 std::vector<value_type> garbage;
117 garbage.resize(
unsigned(
ellCount(&list)));
121 typedef typename entry::enode_t enode_t;
122 enode_t *PN =
CONTAINER(cur, enode_t, node);
127 PN->node.previous = PN->node.next =
NULL;
130 garbage[i++].swap(P->holder);
143 entry *P = ent.get();
153 ellAdd(&list, &P->enode.node);
157 if(wake) wakeup.signal();
167 typedef typename entry::enode_t enode_t;
168 enode_t *PN =
CONTAINER(cur, enode_t, node);
173 PN->node.previous = PN->node.next =
NULL;
178 ellAdd(&list, &P->enode.node);
204 if(!wakeup.wait(timeout))
218 #endif // FAIRQUEUE_H
#define assert(exp)
Declare that a condition should be true.
#define ellCount(PLIST)
Report the number of nodes in a list.
#define CONTAINER(ptr, structure, member)
Find parent object from a member pointer.
void pop_front(value_type &ret)
ELLNODE * ellGet(ELLLIST *pList)
Deletes and returns the first node from a list.
TODO only here because of the Lockable.
Mark external symbols and entry points for shared libraries.
bool pop_front_try(value_type &ret)
Miscellaneous macro definitions.
A doubly-linked list library.
void ellAdd(ELLLIST *pList, ELLNODE *pNode)
Adds a node to the end of a list.
APIs for the epicsMutex mutual exclusion semaphore.
std::tr1::shared_ptr< T > value_type
bool pop_front(value_type &ret, double timeout)
APIs for the epicsEvent binary semaphore.
void push_back(const value_type &ent)
#define ellInit(PLIST)
Initialize a list type.
#define ellFirst(PLIST)
Find the first node in list.