src/segment.h File Reference

Segment. More...

#include <sys/types.h>
Include dependency graph for segment.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef struct segment segment_t
 Opaque type for segment ADT.
typedef int(* segment_data_usage_func )(void *data, int change)
 Function called to change the usage count of some data.

Functions

int segment_new (segment_t **seg, void *data, off_t start, off_t size, segment_data_usage_func data_usage_func)
 Creates a new segment_t.
int segment_copy (segment_t *seg, segment_t **seg_copy)
 Creates a copy of a segment_t.
int segment_free (segment_t *seg)
 Frees a segment_t.
int segment_clear (segment_t *seg)
 Clears a segment_t.
int segment_split (segment_t *seg, segment_t **seg1, off_t split_index)
 Splits a segment.
int segment_merge (segment_t *seg, segment_t *seg1)
 Merges two segments.
int segment_get_data (segment_t *seg, void **data)
 Gets data object a segment_t is related to.
int segment_get_start (segment_t *seg, off_t *start)
 Gets the start offset of a segment_t.
int segment_get_size (segment_t *seg, off_t *size)
 Gets the size of a segment_t.
int segment_set_data (segment_t *seg, void *data, segment_data_usage_func data_usage_func)
 Sets the data association of a segment_t.
int segment_set_range (segment_t *seg, off_t start, off_t size)
 Sets the range of a segment_t.

Detailed Description

Segment.

Definition in file segment.h.


Generated on Sun Nov 15 15:27:51 2009 for libbls by  doxygen 1.6.1