Tor 0.4.9.0-alpha-dev
bits.h
Go to the documentation of this file.
1/* Copyright (c) 2003-2004, Roger Dingledine
2 * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
3 * Copyright (c) 2007-2021, The Tor Project, Inc. */
4/* See LICENSE for licensing information */
5
6/**
7 * \file bits.h
8 *
9 * \brief Header for bits.c
10 **/
11
12#ifndef TOR_INTMATH_BITS_H
13#define TOR_INTMATH_BITS_H
14
15#include "lib/cc/torint.h"
17
18int tor_log2(uint64_t u64) ATTR_CONST;
19uint64_t round_to_power_of_2(uint64_t u64);
20int n_bits_set_u8(uint8_t v);
21
22#endif /* !defined(TOR_INTMATH_BITS_H) */
int n_bits_set_u8(uint8_t v)
Definition: bits.c:72
int tor_log2(uint64_t u64) ATTR_CONST
Definition: bits.c:16
uint64_t round_to_power_of_2(uint64_t u64)
Definition: bits.c:49
Utility macros to handle different features and behavior in different compilers.
Integer definitions used throughout Tor.