Files | |
| file | linked_list.c |
Functions | |
| int | cp_list_txlock (cp_list *list, int type) |
| int | cp_list_txunlock (cp_list *list) |
| cp_list * | cp_list_create_internal (int mode, cp_compare_fn compare_fn, cp_copy_fn copy_fn, cp_destructor_fn item_destructor, int is_view) |
| cp_list * | cp_list_create () |
| cp_list * | cp_list_create_nosync () |
| cp_list * | cp_list_create_list (int mode, cp_compare_fn compare_fn, cp_copy_fn copy_fn, cp_destructor_fn item_destructor) |
| cp_list * | cp_list_create_view (int mode, cp_compare_fn compare_fn, cp_copy_fn copy_fn, cp_destructor_fn item_destructor, cp_lock *lock) |
| void | cp_list_destroy_internal (cp_list *list, cp_destructor_fn fn, int mode) |
| void | cp_list_destroy (cp_list *list) |
| void | cp_list_destroy_by_option (cp_list *list, int option) |
| void | cp_list_destroy_custom (cp_list *list, cp_destructor_fn fn) |
| long | cp_list_item_count (cp_list *list) |
| void * | cp_list_insert (cp_list *list, void *item) |
| void * | cp_list_remove (cp_list *list, void *item) |
| void * | cp_list_insert_after (cp_list *list, void *item, void *existing) |
| void * | cp_list_insert_before (cp_list *list, void *item, void *existing) |
| void * | cp_list_search (cp_list *list, void *item) |
| int | cp_list_callback (cp_list *l, int(*item_action)(void *, void *), void *id) |
| void * | cp_list_append (cp_list *list, void *item) |
| void * | cp_list_get_head (cp_list *list) |
| void * | cp_list_get_tail (cp_list *list) |
| void * | cp_list_remove_head (cp_list *list) |
| void * | cp_list_remove_tail (cp_list *list) |
| int | cp_list_is_empty (cp_list *list) |
| int | cp_list_lock_internal (cp_list *list, int mode) |
| int | cp_list_unlock_internal (cp_list *list) |
| int | cp_list_lock (cp_list *list, int type) |
| int | cp_list_unlock (cp_list *list) |
| int | cp_list_get_mode (cp_list *list) |
| int | cp_list_set_mode (cp_list *list, int mode) |
| int | cp_list_unset_mode (cp_list *list, int mode) |
| int | cp_list_use_mempool (cp_list *list, cp_mempool *pool) |
| int | cp_list_share_mempool (cp_list *list, cp_shared_mempool *pool) |
| cp_list_iterator * | cp_list_create_iterator (cp_list *list, int type) |
| int | cp_list_iterator_init (cp_list_iterator *iterator, cp_list *list, int type) |
| int | cp_list_iterator_head (cp_list_iterator *iterator) |
| int | cp_list_iterator_tail (cp_list_iterator *iterator) |
| int | cp_list_iterator_init_tail (cp_list_iterator *iterator, cp_list *list, int type) |
| int | cp_list_iterator_release (cp_list_iterator *iterator) |
| int | cp_list_iterator_destroy (cp_list_iterator *iterator) |
| void * | cp_list_iterator_next (cp_list_iterator *iterator) |
| void * | cp_list_iterator_prev (cp_list_iterator *iterator) |
| void * | cp_list_iterator_curr (cp_list_iterator *iterator) |
| void * | cp_list_iterator_insert (cp_list_iterator *iterator, void *item) |
| void * | cp_list_iterator_append (cp_list_iterator *iterator, void *item) |
| void * | cp_list_iterator_remove (cp_list_iterator *iterator) |
|
||||||||||||
|
Append the element at the end of the list.
Definition at line 402 of file linked_list.c. References COLLECTION_LOCK_WRITE, cp_list_entry, and _cp_list_entry::item. Referenced by cp_db_connection_pool_create(), cp_db_register_dbms(), cp_result_set_next(), cp_thread_pool_create(), and lookup_internal(). |
|
||||||||||||||||
|
run a callback on each item. Stops if the callback function returns non-zero. Definition at line 385 of file linked_list.c. References COLLECTION_LOCK_READ, and cp_list_entry. |
|
|
Default constructor Definition at line 115 of file linked_list.c. References COLLECTION_MODE_MULTIPLE_VALUES, and cp_list. Referenced by cp_db_init(), cp_result_set_autodispose(), and cp_thread_pool_create(). |
|
||||||||||||
|
create a new iterator and initialize it at the beginning of the list.
Definition at line 716 of file linked_list.c. References cp_list_iterator, _cp_list_iterator::list, _cp_list_iterator::lock_type, and _cp_list_iterator::pos. Referenced by cp_thread_pool_stop(). |
|
||||||||||||||||||||
|
Constructor
Definition at line 130 of file linked_list.c. References cp_list. Referenced by cp_db_connection_pool_create(), and cp_priority_list_create_by_option(). |
|
|
Destroy the object with the mode stored in the list. Definition at line 199 of file linked_list.c. Referenced by cp_db_connection_pool_destroy(), cp_hashlist_iterator_to_key(), cp_hashtable_contains(), cp_result_set_destroy(), and cp_thread_pool_destroy(). |
|
||||||||||||
|
Destroy the object with the specified mode (override default). Definition at line 204 of file linked_list.c. Referenced by cp_priority_list_destroy_by_option(). |
|
||||||||||||
|
Destroy the object and all contained elements. For each element the method cp_destructor_fn is called. Definition at line 209 of file linked_list.c. References COLLECTION_MODE_DEEP. Referenced by cp_db_shutdown(), and cp_thread_pool_create(). |
|
|
Returns the first element of the list. Definition at line 427 of file linked_list.c. References COLLECTION_LOCK_WRITE, and _cp_list_entry::item. Referenced by cp_hashlist_iterator_to_key(). |
|
|
Returns the last element of the list. Definition at line 438 of file linked_list.c. References COLLECTION_LOCK_WRITE, and _cp_list_entry::item. |
|
||||||||||||
|
Insert a new element at the beginning of the list. The operation is synchronized according to the properties of the object. Definition at line 230 of file linked_list.c. References COLLECTION_LOCK_WRITE, cp_list_entry, and _cp_list_entry::item. Referenced by cp_db_connection_pool_release_connection(), cp_priority_list_insert_by_option(), and lookup_internal(). |
|
||||||||||||||||
|
Insert the element after an existing one. Definition at line 283 of file linked_list.c. References COLLECTION_LOCK_WRITE, cp_list_entry, _cp_list_entry::item, _cp_list_entry::next, and _cp_list_entry::prev. |
|
||||||||||||||||
|
Insert the element before an existing one. Definition at line 327 of file linked_list.c. References COLLECTION_LOCK_WRITE, cp_list_entry, _cp_list_entry::item, _cp_list_entry::next, and _cp_list_entry::prev. |
|
|
Test if object is empty.
Definition at line 497 of file linked_list.c. References COLLECTION_LOCK_READ. |
|
|
Get the number of elements in the collection.
Definition at line 214 of file linked_list.c. Referenced by cp_db_connection_pool_shutdown(), cp_db_register_dbms(), and cp_thread_pool_count_available(). |
|
||||||||||||
|
append item to the list just after the current iterator position. In the special case that the iterator has been moved beyond the list head the new item is added at the head of the list.
Definition at line 879 of file linked_list.c. References cp_list_entry, _cp_list_entry::item, _cp_list_entry::next, and _cp_list_entry::prev. |
|
|
returns the value at the current iterator position
Definition at line 824 of file linked_list.c. |
|
|
Move the iterator to the beginning of the list. Definition at line 743 of file linked_list.c. References _cp_list_iterator::list, and _cp_list_iterator::pos. |
|
||||||||||||||||
|
Initialize the Iterator at the first position. Set the iterator at the beginning of the list and lock the list in the mode specified in type.
Definition at line 734 of file linked_list.c. References _cp_list_iterator::list, _cp_list_iterator::lock_type, and _cp_list_iterator::pos. |
|
||||||||||||||||
|
Initialize the Iterator at the end. Set the iterator at the end of the list and lock the list in the mode specified in type.
Definition at line 759 of file linked_list.c. References _cp_list_iterator::list, _cp_list_iterator::lock_type, and _cp_list_iterator::pos. |
|
||||||||||||
|
insert item to the list just before the current iterator position. In the special case that the iterator has been moved beyond the list end the new item is added at the end of the list.
Definition at line 834 of file linked_list.c. References cp_list_entry, _cp_list_entry::item, _cp_list_entry::next, and _cp_list_entry::prev. |
|
|
Go to the next entry in the list and return the content.
Definition at line 786 of file linked_list.c. References _cp_list_iterator::list, and _cp_list_iterator::pos. Referenced by cp_thread_pool_stop(). |
|
|
Go to the previous entry in the list and return the content.
Definition at line 805 of file linked_list.c. References _cp_list_iterator::list, and _cp_list_iterator::pos. |
|
|
unlock the list the iterator is operating on. Definition at line 769 of file linked_list.c. |
|
|
delete the item at the current iterator position.
Definition at line 924 of file linked_list.c. References COLLECTION_MODE_DEEP, cp_list_entry, _cp_list_entry::next, and _cp_list_entry::prev. |
|
|
Move the iterator to the end of the list. Definition at line 751 of file linked_list.c. References _cp_list_iterator::list, and _cp_list_iterator::pos. |
|
||||||||||||
|
Locks the collection with the specified mode. This overrides the default mode stored in the object. Definition at line 550 of file linked_list.c. |
|
||||||||||||
|
Remove the element from the list. The operation is synchronized according to the properties of the object. Definition at line 251 of file linked_list.c. References COLLECTION_LOCK_WRITE, cp_list_entry, and _cp_list_entry::next. |
|
|
remove and release first entry
Definition at line 450 of file linked_list.c. References COLLECTION_LOCK_WRITE, cp_list_entry, and _cp_list_entry::item. Referenced by cp_db_connection_pool_get_connection(), cp_db_connection_pool_shutdown(), cp_result_set_destroy(), and cp_result_set_next(). |
|
|
remove and release last entry
Definition at line 474 of file linked_list.c. References COLLECTION_LOCK_WRITE, cp_list_entry, and _cp_list_entry::item. Referenced by cp_priority_list_get_next_by_option(). |
|
||||||||||||
|
Get the first element that equals the parameter. Definition at line 370 of file linked_list.c. References COLLECTION_LOCK_READ, cp_list_entry, and _cp_list_entry::item. Referenced by cp_priority_list_insert_by_option(). |
|
|
Unlock the object. Definition at line 562 of file linked_list.c. |
1.3.9.1