bits.h 537 B

12345678910111213141516171819202122
  1. /* Copyright (c) 2003-2004, Roger Dingledine
  2. * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
  3. * Copyright (c) 2007-2019, The Tor Project, Inc. */
  4. /* See LICENSE for licensing information */
  5. /**
  6. * \file bits.h
  7. *
  8. * \brief Header for bits.c
  9. **/
  10. #ifndef TOR_INTMATH_BITS_H
  11. #define TOR_INTMATH_BITS_H
  12. #include "lib/cc/torint.h"
  13. #include "lib/cc/compat_compiler.h"
  14. int tor_log2(uint64_t u64) ATTR_CONST;
  15. uint64_t round_to_power_of_2(uint64_t u64);
  16. int n_bits_set_u8(uint8_t v);
  17. #endif /* !defined(TOR_INTMATH_BITS_H) */