/*static char *SCCSID = "@(#)ckhldoft.c	6.1 90/11/18";*/
/*static char *SCCSID = "@(#)ckhldoft.c	13.2 90/01/25";*/
#ifndef  _BTXT
#define  _BTXT _BTXT
#define  THISFILE "CKHLDOFT.C"
#include THISFILE.C
#undef   _BTXT
#endif

#ifndef HDRS
#define HDRS

/***	ckhldoft.c - process unholding of OFT
 */

#define INCL_DOSINFOSEG
#include <os2def.h>
#include <bse.h>

#include "const.h"
#include "chain.h"
#include "misc.h"
#include "buf.h"
#include "dir.h"
#include "storage.h"
#include "volume.h"
#include "tables.h"
#include "superb.h"
#include "pb_ifs.h"
#include "lw.h"
#include "frame.h"
#include "fsdata.h"
#include "assert.h"
#include "log.h"

#endif

#include "pr_FSSUB.h"
#include "pr_MISC.h"

/**	ChkHoldOft - Process UnHolding of OFT
 *
 *	If someone wants to lock an OFT and it's being held,
 *	they'll set a special flag to block further holds.  When
 *	the hold count goes to zero and this flag is set then
 *	the waiters are woken.	ChkHoldOft is called when an
 *	OFT has been unheld to check for this.
 *
 *	ENTRY	poft (edi) = OFT address
 *
 *	EXIT	none
 */

void
ChkHoldOFT (POFT poft)
{
    ASSERT_OFT (poft);

    if ((poft->bFlag & OTF_PND) != 0 && poft->cusHolds == 0)
	WakeupOFT( poft );
}
