/**********************************************************************
 
	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.

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



#include	"task.h"
#include	"xl.h"
#include	"resource.h"

extern RW_LOCK resource_lock;

void
gc_unlock()
{
	gc_xl_unlock();
	gc_gv_resource_unlock();
}

void
gc_lock()
{
	gc_queue_lock_high();
retry:
	gc_gv_resource_onlock();
	if ( gc_gv_resource_clock() < 0 )
		goto retry;
	gc_xl_lock();
}


void
gc()
{
	gc_lib();
	gc_gv_resource();
}

void
sp_gc()
{
	sp_gc_lib();
}

void
after_gc()
{
	after_gc_lib();
}

