/* 
	THIS IS A TEMPLATE NOT A REAL LIBRARY FUNCTION 

to use:
	Copy lib_mutex.h,h into your own project and modify lib_mutex.h
	to contain a list of mutex names you want to use
Then call:
	mutex_init();

		mutex_wait(M_LOG);
		UNTHREDSAFECODE
		mutex_release(M_LOG);

	Call mutex_exit() when your program shuts down.
	*/

enum {
	M_HISTORY,M_ADDITEM,M_IDX_WRITE
	,M_IDX_READ,M_BKT_WRITE,M_LOG
	,M_CLASS,M_MAIN,M_LINK,M_EMSG,M_VINI
	,M_REPORT,M_KEY,M_GRAPH,M_DNS
,M_LAST};
#ifdef MUTEX_MAIN
static char *m_names[]={
	"HISTORY","ADDITEM","IDX_WRITE"
	,"IDX_READ","BKT_WRITE","LOG"
	,"CLASS","MAIN","LINK","EMSG","VINI"
	,"REPORT","KEY","GRAPH","DNS"
,NULL};
#define MAX_MUTEX M_LAST
static Mutex *mutexes[MAX_MUTEX];
#endif
void mutex_wait(int i);
void mutex_init(void);
void mutex_release(int x);
void mutex_exit(void);




