Debian Codegraph @

crt/aws-c-common/include/aws/common/fifo_cache.h

raw symbols SCIP
1 #ifndef AWS_COMMON_FIFO_CACHE_H
2 #define AWS_COMMON_FIFO_CACHE_H
3 /**
4 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
5 * SPDX-License-Identifier: Apache-2.0.
6 */
7
8 #include <aws/common/cache.h>
9
10 AWS_PUSH_SANE_WARNING_LEVEL
11 AWS_EXTERN_C_BEGIN
12
13 /**
14 * Initializes the first-in-first-out cache. Sets up the underlying linked hash table.
15 * Once `max_items` elements have been added, the oldest(first-in) item will
16 * be removed. For the other parameters, see aws/common/hash_table.h. Hash table
17 * semantics of these arguments are preserved.
18 */
19 AWS_COMMON_API
20 struct aws_cache *aws_cache_new_fifo(
21 struct aws_allocator *allocator,
22 aws_hash_fn *hash_fn,
23 aws_hash_callback_eq_fn *equals_fn,
24 aws_hash_callback_destroy_fn *destroy_key_fn,
25 aws_hash_callback_destroy_fn *destroy_value_fn,
26 size_t max_items);
27
28 AWS_EXTERN_C_END
29 AWS_POP_SANE_WARNING_LEVEL
30
31 #endif /* AWS_COMMON_FIFO_CACHE_H */