📄 glextern.h
字号:
/*
* File : glextern.h
* Description: This file contains the extern declarations for different
* global variables
* 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
*/
#ifndef _GLEXTERN_H_
#define _GLEXTERN_H_
// include standard header files
#include <stdio.h>
#include <string.h>
// include file system headers
#include "dirnode.h"
#include "zfstruct.h"
#include "zfsapi.h"
#include "sec.h"
// extern functions
extern UINT DisablePreemption( void ) ;
extern VOID EnablePreemption( UINT ) ;
extern ZFS_THD_HANDLE_t GetCurrentThread( void ) ;
extern INT8 *GetCwdPathForHandle( VOID *handle ) ;
extern INT8 SetCwdPath( INT8 *pcwd_path ) ;
extern ZFS_THD_HANDLE_t GetThreadHandleFromId( UINT id ) ;
extern void SetFSData( ZFS_STATUS_t status ) ;
extern ZFS_STATUS_t GetFSData() ;
//Function: ValidatePath
//Description: This function will validate the path and returns ZFS_TRUE if success, ZFS_FALSE if failure
extern UINT8 ValidatePath( INT8 *path ) ;
//Function: ValidateFileDirName
//Description: This function will validate the file or directory name and returns ZFS_TRUE if success, ZFS_FALSE if failure
extern UINT8 ValidateFileDirName( INT8 *fd_name ) ;
//Function: InitializeHeader
//Description: This function will fill the memory locations with 0xFFs as required by flash.
extern void InitializeHeader( void *addr, UINT len ) ;
//Function: AllocateOR
//Description: This function will allocate a OPEN_REC structure to the caller. returns
// NULL in case all OPEN_REC are allocated.
extern PZFS_OPEN_REC_t AllocateOR( void ) ;
//Function: ComputeCheckSum
//Description: This function will compute the checksum for the given number of bytes
extern ZFS_CHECKSUM_t ComputeCheckSum( IN ZFS_CHECKSUM_t oldcs, UINT8 *buf, UINT bytes ) ;
//Function: RemoveCheckSum
//Description: This function will remove the checksum for the given number of bytes
extern ZFS_CHECKSUM_t RemoveCheckSum( IN ZFS_CHECKSUM_t oldcs, UINT8 *buf, UINT bytes ) ;
//Function: GetCWD
//Description: This function will return the CWD_INFO structure for current thread
extern PZFS_CWD_INFO_t GetCWD( void ) ;
//Function: FreeDirNodesForVol
//Description: This function will free the directory nodes which are allocated for the particular volume
extern void FreeDirNodesForVol( IN PZFS_VOL_INFO_t pvol_info ) ;
extern INT GetTB( PZFS_VOL_INFO_t vol_info ) ;
extern PZFS_BLK_INFO_t GetTBPtr( PZFS_VOL_INFO_t vol_info ) ;
extern PZFS_BLK_INFO_t GetABForGC( PZFS_VOL_INFO_t vol_info ) ;
extern INT8 GetCwdInfoForCurThread( PZFS_VOL_INFO_t *pvol_info, PZFS_DIR_LIST_t *cwd_dir_node ) ;
extern INT8 GetCwdNodeForThreadId( UINT id, PZFS_DIR_LIST_t *ppcwd_dir_node ) ;
extern UINT8 IsVolumeValid( PZFS_VOL_INFO_t pvol_info ) ;
// extern variables
extern UINT8 g_fmt_from_init ;
extern UINT g_max_or_entries ;
extern UINT g_max_threads ;
extern UINT g_max_cwd_len ;
extern UINT g_max_volumes ;
extern UINT g_max_dirs_supported ;
extern UINT8 g_sec_gc[];
extern UINT8 g_sec_data_write[];
extern UINT g_max_flash_blks ;
extern UINT g_max_flash_sectors ;
extern ZFS_OPEN_REC_t g_zfs_or[ ] ;
//extern ZFS_CWD_INFO_t g_cwd_info[ ] ;
extern ZFS_VOL_INFO_t g_zfs_vol_info[ ] ;
extern ZFS_BLK_INFO_t g_blk_info[ ] ;
extern UINT8 *g_zfs_sat[] ;
#endif // _GLEXTERN_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -