Subject: CVS commit: syssrc/sys/sys
To: None <source-changes@netbsd.org>
From: Luke Mewburn <lukem@netbsd.org>
List: source-changes
Date: 12/05/2001 08:51:56
Module Name: syssrc
Committed By: lukem
Date: Wed Dec 5 06:51:56 UTC 2001
Modified Files:
syssrc/sys/sys: Makefile
Added Files:
syssrc/sys/sys: hash.h
Log Message:
Add <sys/hash.h>, which currently implements three inline functions:
uint32_t hash32_buf(const void *buf, size_t len, uint32_t ihash)
return 32 bit hash of buf, size len,
seeded with initial hash of ihash (usually HASH32_BUF_INIT).
this hash may use a different algorithm to hash32_str() and
hash32_strn().
uint32_t hash32_str(const void *buf, uint32_t ihash)
return 32 bit hash of buf, which is an NUL terminated ascii string,
seeded with initial hash of ihash (usually HASH32_STR_INIT).
this hash may use a different algorithm to hash32_buf()
but must use the same algorithm as hash32_strn().
uint32_t hash32_strn(const void *buf, size_t len, uint32_t ihash)
return 32 bit hash of buf, which is an NUL terminated ascii string
up to a maximum of len bytes,
seeded with initial hash of ihash (usually HASH32_STR_INIT).
this hash may use a different algorithm to hash32_buf()
but must use the same algorithm as hash32_str().
As discussed on tech-kern@netbsd.org.
To generate a diff of this commit:
cvs rdiff -r1.36 -r1.37 syssrc/sys/sys/Makefile
cvs rdiff -r0 -r1.1 syssrc/sys/sys/hash.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.