FreeBSD kernel libkern code
jenkins.h File Reference

Go to the source code of this file.

Macros

#define rot(x, k)   (((x)<<(k)) | ((x)>>(32-(k))))
 
#define mix(a, b, c)
 
#define final(a, b, c)
 

Functions

static uint32_t jenkins_hashword (const uint32_t *k, size_t length, uint32_t initval)
 

Macro Definition Documentation

#define final (   a,
  b,
  c 
)
Value:
{ \
c ^= b; c -= rot(b,14); \
a ^= c; a -= rot(c,11); \
b ^= a; b -= rot(a,25); \
c ^= b; c -= rot(b,16); \
a ^= c; a -= rot(c,4); \
b ^= a; b -= rot(a,14); \
c ^= b; c -= rot(b,24); \
}
int c
#define rot(x, k)
Definition: jenkins.h:44

Definition at line 125 of file jenkins.h.

#define mix (   a,
  b,
  c 
)
Value:
{ \
a -= c; a ^= rot(c, 4); c += b; \
b -= a; b ^= rot(a, 6); a += c; \
c -= b; c ^= rot(b, 8); b += a; \
a -= c; a ^= rot(c,16); c += b; \
b -= a; b ^= rot(a,19); a += c; \
c -= b; c ^= rot(b, 4); b += a; \
}
int c
#define rot(x, k)
Definition: jenkins.h:44

Definition at line 90 of file jenkins.h.

Referenced by jenkins_hashword().

#define rot (   x,
 
)    (((x)<<(k)) | ((x)>>(32-(k))))

Definition at line 44 of file jenkins.h.

Function Documentation

static uint32_t jenkins_hashword ( const uint32_t *  k,
size_t  length,
uint32_t  initval 
)
static

Definition at line 150 of file jenkins.h.

References c, and mix.