Inherited by w_keyed_list_t< T, LOCK, K >.
Inheritance diagram for w_list_t< T, LOCK >:
Definition at line 264 of file w_list.h.
Public Member Functions | |
NORET | w_list_t (uint4_t link_offset, LOCK *l) |
Linked list constructor. | |
NORET | w_list_t () |
NORET | ~w_list_t () |
void | set_offset (uint4_t link_offset) |
virtual void | put_in_order (T *t) |
w_list_t< T, LOCK > & | push_front (T *t) |
w_list_t< T, LOCK > & | push_back (T *t) |
T * | front () |
T * | back () |
T * | pop_front () |
T * | pop_back () |
w_list_t< T, LOCK > & | push (T *t) |
Insert. | |
w_list_t< T, LOCK > & | append (T *t) |
Insert at tail. | |
T * | pop () |
Remove. | |
T * | chop () |
Remove from rear. | |
T * | top () |
Get first but don't remove. | |
T * | bottom () |
Get last but don't remove. | |
T * | next (w_link_t *p) |
Get next. | |
T * | prev (w_link_t *p) |
Get prev. | |
Protected Member Functions | |
w_link_t * | link_of (T *t) |
const w_link_t * | link_of (const T *t) const |
const version of the above | |
T * | base_of (w_link_t *p) const |
return object of which the given link is a member | |
const T * | base_of (const w_link_t *p) const |
const version of the above | |
Friends | |
ostream &const w_list_t< T, LOCK > & | l |
ostream & | operator<< BIND_FRIEND_OPERATOR_PART_2 (T, LOCK)(ostream &o |
streams output |
NORET w_list_t< T, LOCK >::w_list_t | ( | uint4_t | link_offset, | |
LOCK * | l | |||
) | [inline] |
Linked list constructor.
[in] | link_offset | Offset into type T of the w_link_t used for this list. |
[in] | l | Pointer to the lock that will protect this list. |
return non-const ptr to link member of an object in this list
Definition at line 268 of file w_list.h.
Referenced by w_list_t< stid_list_elem_t, mcs_lock >::append(), w_list_t< stid_list_elem_t, mcs_lock >::push(), w_descend_list_t< T, LOCK, K >::put_in_order(), and w_ascend_list_t< T, LOCK, K >::put_in_order().
Here is the caller graph for this function:
Tell the list where to find the offset of the w_link_t in the item-type T. Lists constructed with the vacuous constructor must have this called before the list is used.
Reimplemented from w_list_base_t.
Definition at line 331 of file w_list.h.
Referenced by w_keyed_list_t< T, LOCK, K >::set_offset().
Here is the caller graph for this function:
virtual void w_list_t< T, LOCK >::put_in_order | ( | T * | t | ) | [inline, virtual] |
For ordered lists, this uses the ordering. For unordered lists (simply w_list_t<T,LOCK>), it just inserts.
Reimplemented in w_ascend_list_t< T, LOCK, K >, and w_descend_list_t< T, LOCK, K >.