Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Linux/drivers/md/dm-vdo/   (Open Source Betriebssystem Version 6.17.9©)  Datei vom 24.10.2025 mit Größe 1 kB image not shown  

Quelle  int-map.h   Sprache: C

 
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright 2023 Red Hat
 */


#ifndef VDO_INT_MAP_H
#define VDO_INT_MAP_H

#include <linux/compiler.h>
#include <linux/types.h>

/**
 * DOC: int_map
 *
 * An int_map associates pointers (void *) with integer keys (u64). NULL pointer values are
 * not supported.
 *
 * The map is implemented as hash table, which should provide constant-time insert, query, and
 * remove operations, although the insert may occasionally grow the table, which is linear in the
 * number of entries in the map. The table will grow as needed to hold new entries, but will not
 * shrink as entries are removed.
 */


struct int_map;

int __must_check vdo_int_map_create(size_t initial_capacity, struct int_map **map_ptr);

void vdo_int_map_free(struct int_map *map);

size_t vdo_int_map_size(const struct int_map *map);

void *vdo_int_map_get(struct int_map *map, u64 key);

int __must_check vdo_int_map_put(struct int_map *map, u64 key, void *new_value,
     bool update, void **old_value_ptr);

void *vdo_int_map_remove(struct int_map *map, u64 key);

#endif /* VDO_INT_MAP_H */

Messung V0.5
C=96 H=96 G=95

¤ Dauer der Verarbeitung: 0.2 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.