/*-=-=-=-=-=-=-=-=-=-=-=- RCCL/RCI Notice of Copyright -=-=-=-=-=-=-=-=-=-=-*
 *									    *
 *	Copyright (C) 1991 by John E. Lloyd.				    *
 *									    *
 *	Information on copyright permissions, as well as a complete	    *
 *	disclaimer of warranty, is given in the file COPYRIGHT.		    *
 *									    *
 *-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
#ifndef _HASHTABLE_H_
#define _HASHTABLE_H_

/*---------------------------------------------------------------------------
 *
 * DESCRIPTION:	Definitions for the RCI global memory hash table.
 * 
 * AUTHOR/DATE:	John Lloyd, Fall 1989
 *
 * MODIFICATION HISTORY:
 *
 *--------------------------------------------------------------------------*/

/* Private ID values used by packages using the hash table.
   Lower byte is reserved for taskIds. If MAX_RCI_TASKS (in h/rciTask.h)
   is increased to more than 255, we will need more space */
#define GLOBAL_HASH_ID	0x000	/* for rciGlobalMemory() calls */
#define SHARED_HASH_ID	0x100	/* for rciSharedMemory() calls */
#define LOCAL_HASH_ID	0x200	/* for rciLocalMemory() calls */
#define MEM_HASH_ID	0x300	/* for allocMem() calls */
/* Used by RCCL */
#define POS_HASH_ID	0x400   /* for makePosition() calls */
#define TRSF_HASH_ID	0x500	/* for allocTrans() calls */

typedef struct _HASH_LINK {
	  struct _HASH_LINK *next;
	  short id;		/* distinguish diff. types with same name */ 
	  short cpu;		/* CPU thing is allocated on */
	  void *addr;		/* stored address */
} HASH_LINK;

#define HASHTAB_SIZE	1009
#define HASHPOOL_SIZE	0x8000	/* 32 K */

#endif
