Fx_si.c
上传用户:super_houu
上传日期:2008-09-21
资源大小:4099k
文件大小:7k
- /**************************************************************************/
- /* */
- /* Copyright (c) 1996-2002 by Express Logic Inc. */
- /* */
- /* This software is copyrighted by and is the sole property of Express */
- /* Logic, Inc. All rights, title, ownership, or other interests */
- /* in the software remain the property of Express Logic, Inc. This */
- /* software may only be used in accordance with the corresponding */
- /* license agreement. Any unauthorized use, duplication, transmission, */
- /* distribution, or disclosure of this software is expressly forbidden. */
- /* */
- /* This Copyright notice may not be removed or modified without prior */
- /* written consent of Express Logic, Inc. */
- /* */
- /* Express Logic, Inc. reserves the right to modify this software */
- /* without notice. */
- /* */
- /* Express Logic, Inc. info@expresslogic.com */
- /* 11423 West Bernardo Court http://www.expresslogic.com */
- /* San Diego, CA 92127 */
- /* */
- /**************************************************************************/
- /**************************************************************************/
- /**************************************************************************/
- /** */
- /** FileX Component */
- /** */
- /** System (SYS) */
- /** */
- /**************************************************************************/
- /**************************************************************************/
- #include "Config.h" // Global Configuration - do not remove!
- #ifdef ENABLE_FILEX
- #ifdef _DEBUG
- #undef IFTRACE
- #define IFTRACE if (gTraceFileSys)
- #include "DebugDbgMain.h"
- #endif //_DEBUG
- #define FX_SOURCE_CODE
- /* Locate FileX control component data in this file. */
- #define FX_SYSTEM_INIT
- /* Include necessary system files. */
- #include "PlaycoreFileSysFileXfx_api.h"
- #include "PlaycoreFileSysFileXfx_sys.h"
- /**************************************************************************/
- /* */
- /* FUNCTION RELEASE */
- /* */
- /* _fx_system_initialize PORTABLE C */
- /* 3.0 */
- /* AUTHOR */
- /* */
- /* William E. Lamie, Express Logic, Inc. */
- /* */
- /* DESCRIPTION */
- /* */
- /* This function initializes the various control data structures for */
- /* the FileX System component. */
- /* */
- /* INPUT */
- /* */
- /* None */
- /* */
- /* OUTPUT */
- /* */
- /* None */
- /* */
- /* CALLS */
- /* */
- /* tx_timer_create Create system timer */
- /* */
- /* CALLED BY */
- /* */
- /* Application Initialization */
- /* */
- /* RELEASE HISTORY */
- /* */
- /* DATE NAME DESCRIPTION */
- /* */
- /* 01-01-1999 William E. Lamie Initial Version 1.0 */
- /* 03-01-2000 William E. Lamie Modified comment(s), */
- /* resulting in version 1.0b. */
- /* 01-28-2001 William E. Lamie Modified comment(s), */
- /* resulting in version 2.0. */
- /* 03-01-2002 William E. Lamie Modified comment(s), */
- /* resulting in version 3.0. */
- /* */
- /**************************************************************************/
- VOID _fx_system_initialize(VOID)
- {
- /* Initialize the head pointer of the opened media list and the
- number of opened media. */
- _fx_system_media_opened_ptr = FX_NULL;
- _fx_system_media_opened_count = 0;
- /* Initialize the time and date fields with their default values. */
- _fx_system_date = FX_INITIAL_DATE;
- _fx_system_time = FX_INITIAL_TIME;
- /* Create the FileX system timer. This is responsible for updating
- the specified date and time at the rate specified by
- FX_UPDATE_RATE_IN_TICKS. Note that the timer is not necessary for
- regular FileX operation - it is only needed for accurate system
- date and time stamps on files. */
- #ifndef FX_NO_TIMER
- // os_Create_Timer(tStrct,tName,tExpiration,tID,tInitTime,tReschedleTime,tEnable)
- os_Create_Timer(&_fx_system_timer, "FileX System Timer", _fx_system_timer_entry, 0,
- FX_UPDATE_RATE_IN_TICKS, FX_UPDATE_RATE_IN_TICKS, TX_AUTO_ACTIVATE);
- #endif
- }
- #endif