2 * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
4 * Licensed under the OpenSSL license (the "License"). You may not use
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
9 #include <openssl/crypto.h>
11 struct lhash_node_st {
13 struct lhash_node_st *next;
19 OPENSSL_LH_COMPFUNC comp;
20 OPENSSL_LH_HASHFUNC hash;
22 * some stats are updated on lookup, which callers aren't expecting to have
23 * to take an exclusive lock around. This lock protects them on platforms
24 * without atomics, and their types are int rather than unsigned long below
25 * so they can be adjusted with CRYPTO_atomic_add.
27 CRYPTO_RWLOCK *retrieve_stats_lock;
28 unsigned int num_nodes;
29 unsigned int num_alloc_nodes;
32 unsigned long up_load; /* load times 256 */
33 unsigned long down_load; /* load times 256 */
34 unsigned long num_items;
35 unsigned long num_expands;
36 unsigned long num_expand_reallocs;
37 unsigned long num_contracts;
38 unsigned long num_contract_reallocs;
41 unsigned long num_insert;
42 unsigned long num_replace;
43 unsigned long num_delete;
44 unsigned long num_no_delete;
46 int num_retrieve_miss;