cp_heap_get_mode(3)

cp_heap(3) libcprops - cp_heap cp_heap(3)

NAME

cp_heap_get_mode, cp_heap_set_mode, cp_heap_unset_mode - retrieve or change heap mode settings

SYNOPSIS

#include <cprops/heap.h>

int cp_heap_get_mode(cp_heap *heap);
void cp_heap_set_mode(cp_heap *heap, int mode);
void cp_heap_unset_mode(cp_heap *heap, int mode);

DESCRIPTION

The following mode bits affect heap function behavior:

COLLECTION_MODE_COPY
- if the heap was initialized with a non-null copy function, this function is invoked by cp_heap_push (3) when inserting items in the heap.
COLLECTION_MODE_DEEP
- if the heap was initialized with a non-null item destructor function, this function is invoked by cp_heap_pop (3) when removing items and by cp_heap_destroy (3) when deallocating the heap.
COLLECTION_MODE_NOSYNC
- if set, heap operations do not perform locking.

cp_heap_set_mode may be used to set the specified mode bits.
cp_heap_unset_mode may be used to unset the specified mode bits.

RETURN VALUE

cp_heap_get_mode returns the current heap mode settings.

SEE ALSO

cp_heap_create(3), cp_heap_push(3), cp_heap_lock(3)

JULY 2006 libcprops.0.1.5