Files | |
| file | priority_list.h |
Data Structures | |
| struct | _cp_priority_list |
Defines | |
| #define | PRIORITY_LIST_IMMEDIATE 1 |
| #define | PRIORITY_LIST_NORMAL 2 |
| #define | cp_priority_list_create(immediate, normal_priorities, weights) |
| #define | cp_priority_list_get_next(l) cp_priority_list_get_next_by_option((l), (l)->mode) |
| #define | cp_priority_list_rdlock(list) cp_priority_list_lock(list, COLLECTION_LOCK_READ) |
| #define | cp_priority_list_wrlock(list) cp_priority_list_lock(list, COLLECTION_LOCK_WRITE) |
Typedefs | |
|
typedef CPROPS_DLL struct _cp_priority_list | cp_priority_list |
Functions | |
| int | cp_priority_list_txlock (cp_priority_list *list, int type) |
| int | cp_priority_list_txunlock (cp_priority_list *list) |
| void | cp_priority_list_destroy (cp_priority_list *list) |
| void | cp_priority_list_destroy_by_option (cp_priority_list *list, int mode) |
| cp_priority_list * | cp_priority_list_create_by_option (int immediate, int normal_priority_queues, int *weight, cp_compare_fn compare_fn, cp_copy_fn copy_fn, cp_destructor_fn item_destructor, int mode) |
| void * | cp_priority_list_insert (cp_priority_list *list, void *item, int priority) |
| void * | cp_priority_list_insert_by_option (cp_priority_list *list, void *item, int priority, int mode) |
| int | cp_priority_list_is_empty (cp_priority_list *list) |
| void * | cp_priority_list_get_next_by_option (cp_priority_list *list, int mode) |
| int | cp_priority_list_lock_internal (cp_priority_list *list, int lock_mode) |
| int | cp_priority_list_unlock_internal (cp_priority_list *list) |
| int | cp_priority_list_lock (cp_priority_list *list, int type) |
| int | cp_priority_list_unlock (cp_priority_list *list) |
| int | cp_priority_list_get_mode (cp_priority_list *list) |
| int | cp_priority_list_set_mode (cp_priority_list *list, int mode) |
| int | cp_priority_list_unset_mode (cp_priority_list *list, int mode) |
| long | cp_priority_list_item_count (cp_priority_list *list) |
|
|
Value: cp_priority_list_create_by_option(immediate, normal_priorities, weights, \ NULL, NULL, NULL, COLLECTION_MODE_MULTIPLE_VALUES)
Definition at line 73 of file priority_list.h. |
|
|
Get the "first" entry of the list with default-mode. The internal algorithm selects one of the non-empty list and returns the first entry of that list. Definition at line 146 of file priority_list.h. |
|
|
Lock the collection for reading. Definition at line 170 of file priority_list.h. |
|
|
Lock the collection for writing. Definition at line 175 of file priority_list.h. |
|
||||||||||||||||||||||||||||||||
|
Constructor with all parameters.
Definition at line 64 of file priority_list.c. References COLLECTION_MODE_NOSYNC, cp_list, and cp_list_create_list(). |
|
|
Destructor Definition at line 36 of file priority_list.c. References cp_priority_list_destroy_by_option(). |
|
||||||||||||
|
Destructor with locking option. Definition at line 41 of file priority_list.c. References cp_list_destroy_by_option(). Referenced by cp_priority_list_destroy(). |
|
||||||||||||
|
Get the "first" entry of the list with mode. The internal algorithm selects one of the non-empty list and returns the first entry of that list. Definition at line 232 of file priority_list.c. References COLLECTION_LOCK_WRITE, and cp_list_remove_tail(). |
|
||||||||||||||||
|
Inserts an entry to the list with priority and default-mode. The entry is added to the list which holds the entries with given priority.
Definition at line 156 of file priority_list.c. References cp_priority_list_insert_by_option(). |
|
||||||||||||||||||||
|
Inserts an entry to the list with priority and mode. The entry is added to the list which holds the entries with given priority.
Definition at line 161 of file priority_list.c. References COLLECTION_LOCK_WRITE, cp_list_insert(), and cp_list_search(). Referenced by cp_priority_list_insert(). |
|
|
Test if object is empty.
Definition at line 218 of file priority_list.c. References COLLECTION_LOCK_READ. |
|
|
Number of entries in the whole collection.
Definition at line 412 of file priority_list.c. |
|
||||||||||||
|
Lock the collection with mode.
Definition at line 327 of file priority_list.c. |
|
|
Unlock the collection. Definition at line 339 of file priority_list.c. |
1.3.9.1