Blame xf86drmHash.h

Packit Service 103f6b
/*
Packit Service 103f6b
 * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
Packit Service 103f6b
 * All Rights Reserved.
Packit Service 103f6b
 *
Packit Service 103f6b
 * Permission is hereby granted, free of charge, to any person obtaining a
Packit Service 103f6b
 * copy of this software and associated documentation files (the "Software"),
Packit Service 103f6b
 * to deal in the Software without restriction, including without limitation
Packit Service 103f6b
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
Packit Service 103f6b
 * and/or sell copies of the Software, and to permit persons to whom the
Packit Service 103f6b
 * Software is furnished to do so, subject to the following conditions:
Packit Service 103f6b
 *
Packit Service 103f6b
 * The above copyright notice and this permission notice (including the next
Packit Service 103f6b
 * paragraph) shall be included in all copies or substantial portions of the
Packit Service 103f6b
 * Software.
Packit Service 103f6b
 *
Packit Service 103f6b
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
Packit Service 103f6b
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
Packit Service 103f6b
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
Packit Service 103f6b
 * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
Packit Service 103f6b
 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
Packit Service 103f6b
 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
Packit Service 103f6b
 * DEALINGS IN THE SOFTWARE.
Packit Service 103f6b
 *
Packit Service 103f6b
 * Authors: Rickard E. (Rik) Faith <faith@valinux.com>
Packit Service 103f6b
 */
Packit Service 103f6b
Packit Service 103f6b
#define HASH_SIZE  512		/* Good for about 100 entries */
Packit Service 103f6b
				/* If you change this value, you probably
Packit Service 103f6b
                                   have to change the HashHash hashing
Packit Service 103f6b
                                   function! */
Packit Service 103f6b
Packit Service 103f6b
typedef struct HashBucket {
Packit Service 103f6b
    unsigned long     key;
Packit Service 103f6b
    void              *value;
Packit Service 103f6b
    struct HashBucket *next;
Packit Service 103f6b
} HashBucket, *HashBucketPtr;
Packit Service 103f6b
Packit Service 103f6b
typedef struct HashTable {
Packit Service 103f6b
    unsigned long    magic;
Packit Service 103f6b
    unsigned long    entries;
Packit Service 103f6b
    unsigned long    hits;	/* At top of linked list */
Packit Service 103f6b
    unsigned long    partials;	/* Not at top of linked list */
Packit Service 103f6b
    unsigned long    misses;	/* Not in table */
Packit Service 103f6b
    HashBucketPtr    buckets[HASH_SIZE];
Packit Service 103f6b
    int              p0;
Packit Service 103f6b
    HashBucketPtr    p1;
Packit Service 103f6b
} HashTable, *HashTablePtr;