www.pudn.com > efs.rar > fs_logr.h
/*===========================================================================
fs_logr.c - Log region handling.
This module supports logging to a separate region in flash.
Copyright (c) 2003, 2004, 2005 by QUALCOMM Incorporated. All Rights Reserved.
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_logr.h#5 $ $DateTime: 2006/08/23 13:00:38 $ $Author: davidb $
when who what, where, why
-------- --- ------------------------------------------------------
2005-12-14 sh Expand Log Region from 8 to 32 blocks.
2005-01-04 dlb Update copyright line.
2004-12-30 dlb Remove excess infiltration of factory image code.
2004-10-15 dlb Update copyright line.
2004-10-07 dlb Whitespace cleanup.
2003-06-12 dlb Added factory start up code.
2003-03-07 dlb Added fs_logr_peek_alloc().
2003-02-28 dlb Created.
===========================================================================*/
#ifndef __FS_LOGR_H__
#define __FS_LOGR_H__
#include "customer.h"
#include "fs_pm_log.h"
#include "fs_pm_super.h"
struct fs_logr_data;
typedef struct fs_logr_data *fs_logr_t;
/* Initialize */
void fs_logr_init (
fs_logr_t logr,
fs_super_t super,
int fresh_start);
page_id fs_logr_alloc (fs_logr_t logr);
void fs_logr_iterate (fs_logr_t logr, fs_log_t log,
void (*visit) (void *priv, fs_log_code_t code, uint32 *args),
void *priv);
page_id fs_logr_peek_alloc (fs_logr_t logr);
#define FS_LOGR_MAX_LOG_BLOCKS 32
struct fs_logr_data {
fs_super_t super;
block_id block_base;
/* Parameters. */
/* Boundaries of the log region, in pages. [stop] is 1 past the end of
* the log region. */
page_id start, stop;
block_id write_block;
page_id write_page;
};
#endif /* __FS_LOGR_H__ */