lhash_local.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
  3. *
  4. * Licensed under the Apache License 2.0 (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
  8. */
  9. #include <openssl/crypto.h>
  10. #include "internal/tsan_assist.h"
  11. struct lhash_node_st {
  12. void *data;
  13. struct lhash_node_st *next;
  14. unsigned long hash;
  15. };
  16. struct lhash_st {
  17. OPENSSL_LH_NODE **b;
  18. OPENSSL_LH_COMPFUNC comp;
  19. OPENSSL_LH_HASHFUNC hash;
  20. unsigned int num_nodes;
  21. unsigned int num_alloc_nodes;
  22. unsigned int p;
  23. unsigned int pmax;
  24. unsigned long up_load; /* load times 256 */
  25. unsigned long down_load; /* load times 256 */
  26. unsigned long num_items;
  27. unsigned long num_expands;
  28. unsigned long num_expand_reallocs;
  29. unsigned long num_contracts;
  30. unsigned long num_contract_reallocs;
  31. TSAN_QUALIFIER unsigned long num_hash_calls;
  32. TSAN_QUALIFIER unsigned long num_comp_calls;
  33. unsigned long num_insert;
  34. unsigned long num_replace;
  35. unsigned long num_delete;
  36. unsigned long num_no_delete;
  37. TSAN_QUALIFIER unsigned long num_retrieve;
  38. TSAN_QUALIFIER unsigned long num_retrieve_miss;
  39. TSAN_QUALIFIER unsigned long num_hash_comps;
  40. int error;
  41. };