+@anchor{Hash Table}
+@b{How do I use the hash table provided in @file{lib/kernel/hash.c}?}
+
+First, you need to embed a @code{hash_elem} object as a member of the
+object that the hash table will contain. Each @code{hash_elem} allows
+the object to a member of at most one hash table at a given time. All
+the hash table functions that deal with hash table items actually use
+the address of a @code{hash_elem}. You can convert a pointer to a
+@code{hash_elem} member into a pointer to the structure in which
+member is embedded using the @code{hash_entry} macro.
+
+Second, you need to decide on a key type. The key should be something
+that is unique for each object, because a given hash table may not
+contain two objects with equal keys. Then you need to write two
+functions. The first is a @dfn{hash function} that converts a key
+into an integer. Some sample hash functions that you can use or just
+examine are given in @file{lib/kernel/hash.c}. The second function
+needed is a @dfn{comparison function} that compares a pair and returns
+true if the first is less than the second. These two functions have
+to be compatible with the prototypes for @code{hash_hash_func} and
+@code{hash_less_func} in @file{lib/kernel/hash.h}.
+
+Here's a quick example. Suppose you want to put @struct{thread}s
+in a hash table. First, add a @code{hash_elem} to the thread
+structure by adding a line to its definition: