lcls2
C++ API: public headers of xtcdata, psalg, psdaq and psana
Loading...
Searching...
No Matches
Pds::List Class Reference

Head (label) of an intrusive doubly linked list of Entry objects; insert, jam and remove hold a spin lock, their NL variants do not. More...

#include <Queue.hh>

Inherited by Pds::Queue< PoolEntry > [private], Pds::Queue< Pds::Routine > [private], and Pds::QueueSS< T > [private].

Public Member Functions

 List ()
 Construct an empty list (both links point at the list label).
 
Entry * empty () const
 Return the list label address, which atHead() and remove() return when the list is empty.
 
Entry * insert (Entry *)
 Under the lock, append entry at the tail and return the entry it was inserted after.
 
Entry * insertNL (Entry *)
 Append entry at the tail without locking and return the entry it was inserted after.
 
Entry * jam (Entry *)
 Under the lock, insert entry at the head and return the entry it was inserted after.
 
Entry * remove ()
 Under the lock, unlink and return the head entry; returns empty() if the list is empty.
 
Entry * removeNL ()
 Unlink and return the head entry without locking; returns empty() if the list is empty.
 
Entry * remove (Entry *)
 Under the lock, unlink entry and return it.
 
Entry * atHead () const
 Return the head entry (empty() if the list is empty).
 
Entry * atTail () const
 Return the tail entry (empty() if the list is empty).
 

Detailed Description

Head (label) of an intrusive doubly linked list of Entry objects; insert, jam and remove hold a spin lock, their NL variants do not.

Constructor & Destructor Documentation

◆ List()

Pds::List::List ( )
inline

Construct an empty list (both links point at the list label).

Member Function Documentation

◆ atHead()

Pds::Entry * Pds::List::atHead ( ) const
inline

Return the head entry (empty() if the list is empty).

◆ atTail()

Pds::Entry * Pds::List::atTail ( ) const
inline

Return the tail entry (empty() if the list is empty).

◆ empty()

Pds::Entry * Pds::List::empty ( ) const
inline

Return the list label address, which atHead() and remove() return when the list is empty.

◆ insert()

Pds::Entry * Pds::List::insert ( Entry *  entry)
inline

Under the lock, append entry at the tail and return the entry it was inserted after.

◆ insertNL()

Pds::Entry * Pds::List::insertNL ( Entry *  entry)
inline

Append entry at the tail without locking and return the entry it was inserted after.

◆ jam()

Pds::Entry * Pds::List::jam ( Entry *  entry)
inline

Under the lock, insert entry at the head and return the entry it was inserted after.

◆ remove() [1/2]

Pds::Entry * Pds::List::remove ( )
inline

Under the lock, unlink and return the head entry; returns empty() if the list is empty.

◆ remove() [2/2]

Pds::Entry * Pds::List::remove ( Entry *  entry)
inline

Under the lock, unlink entry and return it.

◆ removeNL()

Pds::Entry * Pds::List::removeNL ( )
inline

Unlink and return the head entry without locking; returns empty() if the list is empty.


The documentation for this class was generated from the following file: