/*

 shmalloc.h

 Author: Liraz Siri <liraz@bigfoot.com>

 Copyright (c) 1998 Liraz Siri <liraz@bigfoot.com> Ariel, Israel,
 		    All rights reserved.

 Created: Tue Sep 29 05:24:07 GMT 1998

 Code for handling shared memory segments, allocation, free resources, etc.
*/
		    
#define SHMALLOC_KEY	131
#define SEMALLOC_KEY	313

extern int DESTROY_SHM;

/* link shm_destroy to the exit procedures */
void shmalloc_init(void);

/* Find a free not previously allocated shared memory segment and attach
   to it. */
char *shmalloc(int len);

/* update our dynamic list of shmid's */
void shm_link_destroy(int shmid);

/* mark the segments as destroyed. they'll actually be freed when the
   last user detaches the segment */
void shm_destroy(void);


