www.pudn.com > efs.rar > fs_pathbuff.h
/***********************************************************************
* fs_pathbuff.h
*
* Provides array of FS_PATH_MAX sized buffers, a lock is also available
* to mutually access these buffers.
*
* Copyright (C) 2006 QUALCOMM, Inc.
*
* There are an array of fs_path_buff[] buffers provided, use
* FS_PATH_BUFF_LOCK() and FS_PATH_BUFF_UNLOCK() to exclusively
* access these arrays.
*
***********************************************************************/
/*===========================================================================
EDIT HISTORY FOR MODULE
This section contains comments describing changes made to the module.
Notice that changes are listed in reverse chronological order.
$Header: //depot/asic/MSMSHARED/services/efs/MSM_EFS.01.02/fs_pathbuff.h#1 $ $DateTime: 2006/11/13 09:20:40 $ $Author: davidb $
when who what, where, why
---------- --- ---------------------------------------------------------
2006-11-02 rp Create
===========================================================================*/
#ifndef __FS_PATHBUFF_H__
#define __FS_PATHBUFF_H__
#include "rex.h"
#include "fs_config.h"
/* How many buffers are available in our fs_path_buff[] array */
#define EFS_MAX_PATH_BUFF_CNT 2
/* These array of buffers are available for mutual access. The caller
* has to call FS_PATH_BUFF_LOCK() and FS_PATH_BUFF_UNLOCK() to mutually
* access these arrays. The size of each member of this array is big
* enough to store a file-path including the '\0' character.
*/
extern char fs_path_buff[EFS_MAX_PATH_BUFF_CNT][FS_PATH_MAX + 1];
#ifdef FS_UNIT_TEST
#error code not present
#else
extern rex_crit_sect_type fs_path_buff_crit_sec;
#define FS_PATH_BUFF_LOCK_INIT() \
rex_init_crit_sect (&fs_path_buff_crit_sec)
#define FS_PATH_BUFF_LOCK() rex_enter_crit_sect (&fs_path_buff_crit_sec)
#define FS_PATH_BUFF_UNLOCK() rex_leave_crit_sect (&fs_path_buff_crit_sec)
#endif /* FS_UNIT_TEST */
#endif /* not __FS_PATHBUFF_H__ */