📄 zfsclose.c
字号:
/*
* File : ZFSClose.c
* Description: This file contains the implementation of ZFSClose API
* Author : Mahadev K C
* Created on : 30-APR-2003
*
* Copyright 2004 ZiLOG Inc. ALL RIGHTS RESERVED.
*
* This file contains unpublished confidential and proprietary information
* of ZiLOG, Inc.
* NO PART OF THIS WORK MAY BE DUPLICATED, STORED, PUBLISHED OR DISCLOSED
* IN ANY FORM WITHOUT THE PRIOR WRITTEN CONSENT OF ZiLOG, INC.
* This is not a license and no use of any kind of this work is authorized
* in the absence of a written license granted by ZiLOG, Inc. in ZiLOG's
* sole discretion
*/
#include "glextern.h"
//Function Name: ZFSClose
//Description: This API closes an opened file
ZFS_STATUS_t ZFSClose( IN ZFS_HANDLE_t handle )
{
#define handle ((PZFS_OPEN_REC_t)handle)
UINT preempt_status ;
// if ZFS is not initialized, return error
if( !IsZFSInited() )
return ZFSERR_NOT_INITIALIZED ;
// first check whether the handle is valid or not
if( handle->status != ZFS_OR_MAGIC_NUM )
return ZFSERR_INVALID_HANDLE ;
preempt_status = DisablePreemption() ;
// got the OR, change the status to 0x00
handle->status = ZFS_OR_INVALID_MAGIC_NUM ;
EnablePreemption( preempt_status ) ;
return ZFSERR_SUCCESS ;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -