Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/hash.h
Show First 20 Lines • Show All 119 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
#ifdef _KERNEL | #ifdef _KERNEL | ||||
/* | /* | ||||
* Hashing function from Bob Jenkins. Implementation in libkern/jenkins_hash.c. | * Hashing function from Bob Jenkins. Implementation in libkern/jenkins_hash.c. | ||||
*/ | */ | ||||
uint32_t jenkins_hash(const void *, size_t, uint32_t); | uint32_t jenkins_hash(const void *, size_t, uint32_t); | ||||
uint32_t jenkins_hash32(const uint32_t *, size_t, uint32_t); | uint32_t jenkins_hash32(const uint32_t *, size_t, uint32_t); | ||||
uint32_t XXH32 (const void* input, int len, uint32_t seed); | |||||
#if defined(XXHASH) | |||||
#define kern_hash32 XXH32 | |||||
#else | |||||
#define kern_hash32 jenkins_hash32 | |||||
#endif | |||||
#endif /* _KERNEL */ | #endif /* _KERNEL */ | ||||
#endif /* !_SYS_HASH_H_ */ | #endif /* !_SYS_HASH_H_ */ |