/**********************************************************************
 
	Copyright (C) 2003 Hirohisa MORI <joshua@nichibun.ac.jp>
 
	This program is free software; you can redistribute it 
	and/or modify it under the terms of the GLOBALBASE 
	Library General Public License (G-LGPL) as published by 

	http://www.globalbase.org/
 
	This program is distributed in the hope that it will be 
	useful, but WITHOUT ANY WARRANTY; without even the 
	implied warranty of MERCHANTABILITY or FITNESS FOR A 
	PARTICULAR PURPOSE.

**********************************************************************/


#ifndef ___XLLOCK_H___
#define ___XLLOCK_H___

typedef struct xll_xli_list {
	struct xll_xli_list *	next;
	int			iid;
	int			count;
} XLL_XLI_LIST;

typedef struct xl_lock_list {
	struct xl_lock_list *	next;
	L_CHAR *		name;
	XLL_XLI_LIST *		xli_list;
	int			count;
} XL_LOCK_LIST;

#define XL_LOCK_HASH_SIZE	10

#define LT_READ		0
#define LT_WRITE	1

void xl_unlock(L_CHAR * name);
XL_SEXP * xl_lock(L_CHAR * name,int type,XL_SEXP * s);


#endif
