|
Zero
0.1.0
|
Templated list of type T. More...
#include <w_list.h>
Public Member Functions | |
| w_list_t (uint32_t link_offset, LOCK *l) | |
| Linked list constructor. More... | |
| w_list_t () | |
| ~w_list_t () | |
| void | set_offset (uint32_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. More... | |
| w_list_t< T, LOCK > & | append (T *t) |
| Insert at tail. More... | |
| void | insert_after (T *t, T *pos) |
| void | insert_before (T *t, T *pos) |
| T * | pop () |
| Remove. More... | |
| T * | chop () |
| Remove from rear. More... | |
| void | remove (T *t) |
| T * | top () |
| Get first but don't remove. More... | |
| T * | bottom () |
| Get last but don't remove. More... | |
| T * | next (w_link_t *p) |
| Get next. More... | |
| T * | prev (w_link_t *p) |
| Get prev. More... | |
| T * | next_of (T *t) |
| T * | prev_of (T *t) |
| uint32_t | count () |
Public Member Functions inherited from w_list_base_t | |
| bool | is_empty () const |
| uint32_t | num_members () const |
| void | dump () |
Public Member Functions inherited from w_vbase_t | |
| w_vbase_t () | |
| virtual | ~w_vbase_t () |
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 More... | |
| T * | base_of (w_link_t *p) const |
| return object of which the given link is a member More... | |
| const T * | base_of (const w_link_t *p) const |
| const version of the above More... | |
Protected Member Functions inherited from w_list_base_t | |
| w_list_base_t () | |
| w_list_base_t (uint32_t offset) | |
| ~w_list_base_t () | |
| void | set_offset (uint32_t offset) |
Private Member Functions | |
| w_list_t (const w_list_t< T, LOCK > &x) | |
| w_list_t< T, LOCK > & | operator= (const w_list_t< T, LOCK > &) |
Private Attributes | |
| LOCK * | lock |
Friends | |
| ostream const w_list_t< T, LOCK > & | l |
| class | w_list_i< T, LOCK > |
| ostream & | operator<<BIND_FRIEND_OPERATOR_PART_2 (T, LOCK)(ostream &o |
| streams output More... | |
Additional Inherited Members | |
Public Types inherited from w_base_t | |
| enum | CompareOp { badOp = 0x0, eqOp = 0x1, gtOp = 0x2, geOp = 0x3, ltOp = 0x4, leOp = 0x5, NegInf = 0x100, eqNegInf, gtNegInf, geNegInf, ltNegInf, leNegInf, PosInf = 0x400, eqPosInf, gtPosInf, gePosInf, ltPosInf, lePosInf } |
| Comparison Operators. More... | |
| typedef unsigned char | u_char |
| typedef unsigned short | u_short |
| typedef unsigned long | u_long |
| typedef uint64_t | large_stat_t |
| typedef int32_t | base_stat_t |
| typedef float | base_float_t |
| typedef float | f4_t |
| typedef double | f8_t |
Static Public Member Functions inherited from w_base_t | |
| static bool | is_aligned (size_t sz) |
| static bool | is_aligned (const void *s) |
| static bool | is_big_endian () |
| static bool | is_little_endian () |
| static int64_t | strtoi8 (const char *, char **end=0, int base=0) |
| Convert string to 8-byte integer. More... | |
| static uint64_t | strtou8 (const char *, char **end=0, int base=0) |
| Convert string to 8-byte unsigned integer. More... | |
| static bool | is_finite (const f8_t x) |
| static bool | is_infinite (const f8_t x) |
| static bool | is_nan (const f8_t x) |
| static bool | is_infinite_or_nan (const f8_t x) |
| static uint16_t | w_ntohs (uint16_t) |
| static uint16_t | w_htons (uint16_t) |
| static uint32_t | w_ntohl (uint32_t) |
| static uint32_t | w_htonl (uint32_t) |
| static void | assert_failed (const char *desc, const char *file, uint32_t line) |
| print a message and abort More... | |
| static void | abort () |
| dump core More... | |
Static Public Attributes inherited from w_base_t | |
| static const int8_t | int1_max = 0x7f |
| static const int8_t | int1_min = (int8_t)0x80u |
| static const int16_t | int2_max = 0x7fff |
| static const int16_t | int2_min = (int16_t)0x8000u |
| static const int32_t | int4_max = 0x7fffffff |
| static const int32_t | int4_min = 0x80000000 |
| static const int64_t | int8_max |
| static const int64_t | int8_min |
| static const uint8_t | uint1_max = 0xff |
| static const uint8_t | uint1_min = 0x0 |
| static const uint16_t | uint2_max = 0xffff |
| static const uint16_t | uint2_min = 0x0 |
| static const uint32_t | uint4_max = 0xffffffff |
| static const uint32_t | uint4_min = 0x0 |
| static const uint64_t | uint8_max |
| static const uint64_t | uint8_min |
Protected Attributes inherited from w_list_base_t | |
| w_link_t | _tail |
| uint32_t | _cnt |
| uint32_t | _adj |
Templated list of type T.
|
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. |
create a list sans offset. Client must use set_offset later, before using the list.
|
private |
Insert at tail.
return object of which the given link is a member
|
inlineprotected |
const version of the above
return non-const ptr to link member of an object in this list
|
inlineprotected |
const version of the above
|
private |
For ordered lists, this uses the ordering. For unordered lists (simply w_list_t<T,LOCK>), it just inserts.
Reimplemented in w_descend_list_t< T, LOCK, K >, w_descend_list_t< xct_t, mcs_lock, tid_t >, and w_ascend_list_t< T, LOCK, K >.
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.
|
friend |
streams output
1.8.12