diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2013-11-26 22:37:24 +0100 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2013-12-01 13:49:42 +0100 |
commit | e7d2ac4401be8aaf9629e248cad6a74498a6be24 (patch) | |
tree | 43fc2a026bb83c56d614e8551701ce9feaef71f2 /lib/bitops.h | |
parent | 283c7dfada53a6dee6a8a17ecab492ffafd44b66 (diff) |
Finishes add-path.
Fixes some bugs and uses generic hash implementation.
Diffstat (limited to 'lib/bitops.h')
-rw-r--r-- | lib/bitops.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/bitops.h b/lib/bitops.h index bebd830d..a12f6b60 100644 --- a/lib/bitops.h +++ b/lib/bitops.h @@ -6,6 +6,9 @@ * Can be freely distributed and used under the terms of the GNU GPL. */ +#ifndef _BIRD_BITOPTS_H_ +#define _BIRD_BITOPTS_H_ + /* * Bit mask operations: * @@ -19,3 +22,8 @@ u32 u32_mkmask(unsigned n); int u32_masklen(u32 x); u32 u32_log2(u32 v); + +static inline u32 u32_hash(u32 v) { return v * 2902958171u; } + +#endif + |