X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flib%2Fkernel%2Fhash.h;h=0dd0c3d9bfe232185d510b6a5ee55e88576a4878;hb=758240de3a0794f35418a301fbd431b8788f13a5;hp=e37592bfbeae5d32ac2928dcecb8b6470b1f0ad2;hpb=f2f8875638593bd5365cfd6a5ba7c9578e52322f;p=pintos-anon diff --git a/src/lib/kernel/hash.h b/src/lib/kernel/hash.h index e37592b..0dd0c3d 100644 --- a/src/lib/kernel/hash.h +++ b/src/lib/kernel/hash.h @@ -1,5 +1,5 @@ -#ifndef HEADER_HASH_H -#define HEADER_HASH_H 1 +#ifndef __LIB_KERNEL_HASH_H +#define __LIB_KERNEL_HASH_H /* Hash table. @@ -12,11 +12,12 @@ structure that can potentially be in a hash must embed a hash_elem member. All of the hash functions operate on these `hash_elem's. The hash_entry macro allows conversion from a - hash_elem back to a structure object that contains it. + hash_elem back to a structure object that contains it. This + is the same technique used in the linked list implementation. + Refer to lib/kernel/list.h for a detailed explanation. - - -*/ + The FAQ for the VM project contains a detailed example of how + to use the hash table. */ #include #include @@ -88,4 +89,4 @@ unsigned hash_bytes (const void *, size_t); unsigned hash_string (const char *); unsigned hash_int (int); -#endif /* hash.h */ +#endif /* lib/kernel/hash.h */