Man page - pobj_foreach_safe_type(3)
Packages contains this manual
- pmemobj_tx_realloc(3)
- pobj_first(3)
- pmemobj_f_mem_wc(3)
- pmemobj_tx_xwcsdup(3)
- toid_equals(3)
- pmemobj_f_mem_nodrain(3)
- pmemobj_next(3)
- pmemobj_tx_stage(3)
- pmemobj_tx_strdup(3)
- pobj_list_move_element_tail(3)
- pmemobj_tx_begin(3)
- pmemobj_rwlock_tryrdlock(3)
- tx_xadd_direct(3)
- pobj_layout_end(3)
- pobj_znew(3)
- pmemobj_tx_xstrdup(3)
- pmemobj_f_relaxed(3)
- pmemobj_set_user_data(3)
- pobj_reserve_alloc(3)
- tx_xalloc(3)
- pmemobj_tx_log_intents_max_size(3)
- pmemobj_tx_get_failure_behavior(3)
- tx_xstrdup(3)
- pmemobj_action(3)
- tx_add_field(3)
- pmemobj_tx_wcsdup(3)
- pmemobj_memmove(3)
- toid_valid(3)
- pmemobj_tx_free(3)
- pobj_list_insert_tail(3)
- pmemobj_list_insert_new(3)
- tx_add_field_direct(3)
- pobj_layout_types_num(3)
- pmemobj_ctl_set(3)
- pmemobj_close(3)
- pmemobj_root(3)
- pmemobj_mutex_trylock(3)
- toid_assign(3)
- pmemobj_open(3)
- pmemobj_root_construct(3)
- pobj_layout_begin(3)
- pobj_list_first(3)
- pmemobj_pool_by_oid(3)
- pobj_layout_root(3)
- pmemobj_tx_lock(3)
- pmemobj_pool_by_ptr(3)
- pmemobj_realloc(3)
- tx_xadd_field_direct(3)
- pmemobj_create(3)
- pobj_free(3)
- pmemobj_free(3)
- pobj_xreserve_new(3)
- pmemobj_rwlock_trywrlock(3)
- pmemobj_errormsg(3)
- pmemobj_zalloc(3)
- pobj_foreach_safe_type(3)
- direct_rw(3)
- pmemobj_persist(3)
- pmemobj_get_user_data(3)
- libpmemobj(7)
- tx_realloc(3)
- pobj_list_move_element_before(3)
- pmemobj_cond_timedwait(3)
- pmemobj_tx_xalloc(3)
- pmemobj_rwlock_timedwrlock(3)
- tx_memset(3)
- pobj_list_prev(3)
- pmemobj_tx_abort(3)
- tx_xadd(3)
- pmemobj_tx_set_failure_behavior(3)
- pobj_zrealloc(3)
- tx_begin_param(3)
- direct_ro(3)
- oid_instanceof(3)
- pmemobj_tx_errno(3)
- pobj_next_type_num(3)
- pmemobj_direct(3)
- pobj_foreach_safe(3)
- pmemobj_cond_broadcast(3)
- pmemobj_tx_log_snapshots_max_size(3)
- pobj_zalloc(3)
- pobj_root(3)
- pobj_list_foreach_reverse(3)
- pobj_new(3)
- pmemobj_drain(3)
- d_ro(3)
- pmemobj_zrealloc(3)
- pobj_list_insert_after(3)
- pmemobj_check_version(3)
- pmemobj_set_funcs(3)
- pmemobj_tx_log_append_buffer(3)
- pmemobj_publish(3)
- pobj_list_insert_before(3)
- pmemobj_f_mem_noflush(3)
- tx_onabort(3)
- pobj_list_empty(3)
- pmemobj_mutex_unlock(3)
- pmemobj_cond_zero(3)
- pmemobj_tx_xadd_range(3)
- pmemobj_tx_get_user_data(3)
- tx_zrealloc(3)
- pmemobj_tx_zrealloc(3)
- pmemobj_xflush(3)
- toid_typeof(3)
- pmemobj_f_mem_nontemporal(3)
- tx_wcsdup(3)
- pobj_layout_name(3)
- pmemobj_list_move(3)
- pmemobj_tx_xlock(3)
- oid_is_null(3)
- pmemobj_tx_publish(3)
- toid_declare_root(3)
- pobj_list_entry(3)
- pobj_list_insert_new_after(3)
- pmemobj_tx_end(3)
- pobj_list_move_element_head(3)
- pmemobj_list_insert(3)
- pmemobj_tx_commit(3)
- pmemobj_cond_wait(3)
- toid_declare(3)
- pmemobj_set_value(3)
- pmemobj_xalloc(3)
- tx_zalloc(3)
- d_rw(3)
- tx_strdup(3)
- pmemobj_cancel(3)
- pobj_list_foreach(3)
- pmemobj_rwlock_unlock(3)
- pmemobj_memcpy(3)
- pobj_first_type_num(3)
- pmemobj_tx_process(3)
- tx_begin(3)
- toid_is_null(3)
- tx_free(3)
- toid_type_num_of(3)
- pmemobj_mutex_zero(3)
- pobj_foreach_type(3)
- pmemobj_rwlock_wrlock(3)
- pmemobj_tx_xfree(3)
- pmemobj_mutex_lock(3)
- pmemobj_oid(3)
- pmemobj_tx_xadd_range_direct(3)
- pobj_list_head(3)
- pmemobj_memset(3)
- pmemobj_root_size(3)
- tx_xwcsdup(3)
- pobj_list_insert_head(3)
- pmemobj_wcsdup(3)
- pobj_list_last(3)
- pmemobj_type_num(3)
- tx_set(3)
- pmemobj_defrag(3)
- pmemobj_volatile(3)
- pobj_list_next(3)
- pobj_xreserve_alloc(3)
- pmemobj_rwlock_rdlock(3)
- pmemobj_check(3)
- pmemobj_memcpy_persist(3)
- pobj_list_insert_new_before(3)
- tx_set_direct(3)
- pobj_list_remove(3)
- pobj_list_remove_free(3)
- pmemobj_tx_set_user_data(3)
- pmemobj_mutex_timedlock(3)
- pobj_foreach(3)
- pmemobj_tx_zalloc(3)
- pmemobj_reserve(3)
- toid(3)
- pmemobj_defer_free(3)
- pmemobj_flush(3)
- tx_add_direct(3)
- pmemobj_alloc_usable_size(3)
- pmemobj_tx_log_auto_alloc(3)
- pmemobj_first(3)
- toid_type_num(3)
- pmemobj_ctl_exec(3)
- pmemobj_alloc(3)
- pmemobj_tx_add_range_direct(3)
- tx_oncommit(3)
- tx_alloc(3)
- pmemobj_tx_add_range(3)
- tx_xadd_field(3)
- pobj_realloc(3)
- tx_finally(3)
- pobj_next(3)
- toid_offsetof(3)
- tx_memcpy(3)
- pmemobj_xpersist(3)
- tx_add(3)
- pobj_list_insert_new_head(3)
- pmemobj_xreserve(3)
- pmemobj_strdup(3)
- tx_new(3)
- pobj_layout_toid(3)
- pmemobj_rwlock_zero(3)
- pmemobj_rwlock_timedrdlock(3)
- tx_begin_cb(3)
- tx_znew(3)
- pmemobj_f_mem_temporal(3)
- pmemobj_ctl_get(3)
- tx_end(3)
- pmemobj_cond_signal(3)
- pmemobj_list_remove(3)
- pobj_list_insert_new_tail(3)
- pmemobj_tx_xlog_append_buffer(3)
- pobj_reserve_new(3)
- tx_xfree(3)
- pmemobj_f_mem_wb(3)
- pobj_alloc(3)
- oid_equals(3)
- pobj_list_move_element_after(3)
- pmemobj_tx_alloc(3)
- pmemobj_memset_persist(3)
- pmemobj_tx_xpublish(3)
apt-get install libpmemobj-dev
Manual
NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
SEE ALSO
NAME
pmemobj_first (), pmemobj_next (), POBJ_FIRST (), POBJ_FIRST_TYPE_NUM (), POBJ_NEXT (), POBJ_NEXT_TYPE_NUM (), POBJ_FOREACH (), POBJ_FOREACH_SAFE (), POBJ_FOREACH_TYPE (), POBJ_FOREACH_SAFE_TYPE () - pmemobj container operations
SYNOPSIS
#include <libpmemobj.h> PMEMoid pmemobj_first(PMEMobjpool *pop); PMEMoid pmemobj_next(PMEMoid oid); POBJ_FIRST(PMEMobjpool *pop, TYPE) POBJ_FIRST_TYPE_NUM(PMEMobjpool *pop, uint64_t type_num) POBJ_NEXT(TOID oid) POBJ_NEXT_TYPE_NUM(PMEMoid oid) POBJ_FOREACH(PMEMobjpool *pop, PMEMoid varoid) POBJ_FOREACH_SAFE(PMEMobjpool *pop, PMEMoid varoid, PMEMoid nvaroid) POBJ_FOREACH_TYPE(PMEMobjpool *pop, TOID var) POBJ_FOREACH_SAFE_TYPE(PMEMobjpool *pop, TOID var, TOID nvar)
DESCRIPTION
The libpmemobj (7) container operations provide a mechanism that allows iteration through the internal object collection, either looking for a specific object, or performing a specific operation on each object of a given type. Software should not make any assumptions about the order of the objects in the internal object containers.
The pmemobj_first () function returns the first object from the pool.
The POBJ_FIRST () macro returns the first object from the pool of the type specified by TYPE .
The POBJ_FIRST_TYPE_NUM () macro returns the first object from the pool of the type specified by type_num .
The pmemobj_next () function returns the next object from the pool.
The POBJ_NEXT () macro returns the next object of the same type as the object referenced by oid .
The POBJ_NEXT_TYPE_NUM () macro returns the next object of the same type number as the object referenced by oid .
The following four macros provide a more convenient way to iterate through the internal collections, performing a specific operation on each object.
The POBJ_FOREACH () macro performs a specific operation on each allocated object stored in the persistent memory pool pop . It traverses the internal collection of all the objects, assigning a handle to each element in turn to varoid .
The POBJ_FOREACH_TYPE () macro performs a specific operation on each allocated object stored in the persistent memory pool pop that has the same type as var . It traverses the internal collection of all the objects of the specified type, assigning a handle to each element in turn to var .
The macros POBJ_FOREACH_SAFE () and POBJ_FOREACH_SAFE_TYPE () work in a similar fashion as POBJ_FOREACH () and POBJ_FOREACH_TYPE (), except that prior to performing the operation on the object, they preserve a handle to the next object in the collection by assigning it to nvaroid or nvar , respectively. This allows safe deletion of selected objects while iterating through the collection.
RETURN VALUE
pmemobj_first () returns the first object from the pool, or, if the pool is empty, OID_NULL .
pmemobj_next () returns the next object from the pool. If the object referenced by oid is the last object in the collection, or if oid is OID_NULL , pmemobj_next () returns OID_NULL .
SEE ALSO
libpmemobj (7) and <https://pmem.io>