List implementation of segcol_t. More...
#include <stdlib.h>
#include <errno.h>
#include "segcol.h"
#include "segcol_internal.h"
#include "segcol_list.h"
#include "type_limits.h"
#include "list.h"
#include "debug.h"
Go to the source code of this file.
Functions | |
static int | find_seg_entry (segcol_t *segcol, struct segment_entry **entry, off_t *mapping, off_t offset) |
Finds the segment entry in the segcol_list that contains a logical offset. | |
static int | segcol_list_clear_cache (struct segcol_list_impl *impl) |
Clears the search cache of a segcol_list_impl. | |
static int | segcol_list_set_cache (struct segcol_list_impl *impl, struct list_node *node, off_t mapping) |
Sets the search cache of a segcol_list_impl. | |
int | segcol_list_new (segcol_t **segcol) |
Creates a new segcol_t using a linked list implementation. |
List implementation of segcol_t.
Definition in file segcol_list.c.
static int find_seg_entry | ( | segcol_t * | segcol, | |
struct segment_entry ** | entry, | |||
off_t * | mapping, | |||
off_t | offset | |||
) | [static] |
Finds the segment entry in the segcol_list that contains a logical offset.
segcol | the segcol_t to search | |
[out] | entry | the found entry (or NULL if not found) |
[out] | mapping | the mapping of the found node |
offset | the offset to look for |
Definition at line 99 of file segcol_list.c.
References list_entry, segcol_find(), segcol_iter_free(), segcol_iter_get_impl(), and segcol_iter_is_valid().
static int segcol_list_clear_cache | ( | struct segcol_list_impl * | impl | ) | [static] |
Clears the search cache of a segcol_list_impl.
impl | the segcol_list_impl |
Definition at line 129 of file segcol_list.c.
Referenced by segcol_list_new().
static int segcol_list_set_cache | ( | struct segcol_list_impl * | impl, | |
struct list_node * | node, | |||
off_t | mapping | |||
) | [static] |
Sets the search cache of a segcol_list_impl.
impl | the segcol_list_impl | |
node | the cached list node | |
mapping | the logical mapping of the cached node in the segcol_list |
Definition at line 149 of file segcol_list.c.