Fx_si.c
上传用户:super_houu
上传日期:2008-09-21
资源大小:4099k
文件大小:7k
源码类别:

DVD

开发平台:

Others

  1. /**************************************************************************/ 
  2. /*                                                                        */ 
  3. /*            Copyright (c) 1996-2002 by Express Logic Inc.               */ 
  4. /*                                                                        */ 
  5. /*  This software is copyrighted by and is the sole property of Express   */ 
  6. /*  Logic, Inc.  All rights, title, ownership, or other interests         */ 
  7. /*  in the software remain the property of Express Logic, Inc.  This      */ 
  8. /*  software may only be used in accordance with the corresponding        */ 
  9. /*  license agreement.  Any unauthorized use, duplication, transmission,  */ 
  10. /*  distribution, or disclosure of this software is expressly forbidden.  */ 
  11. /*                                                                        */
  12. /*  This Copyright notice may not be removed or modified without prior    */ 
  13. /*  written consent of Express Logic, Inc.                                */ 
  14. /*                                                                        */ 
  15. /*  Express Logic, Inc. reserves the right to modify this software        */ 
  16. /*  without notice.                                                       */ 
  17. /*                                                                        */ 
  18. /*  Express Logic, Inc.                     info@expresslogic.com         */
  19. /*  11423 West Bernardo Court               http://www.expresslogic.com   */
  20. /*  San Diego, CA  92127                                                  */
  21. /*                                                                        */
  22. /**************************************************************************/
  23. /**************************************************************************/
  24. /**************************************************************************/
  25. /**                                                                       */ 
  26. /** FileX Component                                                       */ 
  27. /**                                                                       */
  28. /**   System (SYS)                                                        */
  29. /**                                                                       */
  30. /**************************************************************************/
  31. /**************************************************************************/
  32. #include "Config.h" // Global Configuration - do not remove!
  33. #ifdef ENABLE_FILEX
  34. #ifdef _DEBUG
  35. #undef IFTRACE
  36. #define IFTRACE if (gTraceFileSys)
  37. #include "DebugDbgMain.h"
  38. #endif //_DEBUG
  39. #define FX_SOURCE_CODE
  40. /* Locate FileX control component data in this file.  */
  41. #define FX_SYSTEM_INIT
  42. /* Include necessary system files.  */
  43. #include "PlaycoreFileSysFileXfx_api.h"
  44. #include "PlaycoreFileSysFileXfx_sys.h"
  45. /**************************************************************************/ 
  46. /*                                                                        */ 
  47. /*  FUNCTION                                               RELEASE        */ 
  48. /*                                                                        */ 
  49. /*    _fx_system_initialize                               PORTABLE C      */ 
  50. /*                                                           3.0          */ 
  51. /*  AUTHOR                                                                */ 
  52. /*                                                                        */ 
  53. /*    William E. Lamie, Express Logic, Inc.                               */ 
  54. /*                                                                        */ 
  55. /*  DESCRIPTION                                                           */ 
  56. /*                                                                        */ 
  57. /*    This function initializes the various control data structures for   */ 
  58. /*    the FileX System component.                                         */ 
  59. /*                                                                        */ 
  60. /*  INPUT                                                                 */ 
  61. /*                                                                        */ 
  62. /*    None                                                                */
  63. /*                                                                        */ 
  64. /*  OUTPUT                                                                */ 
  65. /*                                                                        */ 
  66. /*    None                                                                */
  67. /*                                                                        */ 
  68. /*  CALLS                                                                 */ 
  69. /*                                                                        */ 
  70. /*    tx_timer_create                       Create system timer           */ 
  71. /*                                                                        */ 
  72. /*  CALLED BY                                                             */ 
  73. /*                                                                        */ 
  74. /*    Application Initialization                                          */ 
  75. /*                                                                        */ 
  76. /*  RELEASE HISTORY                                                       */ 
  77. /*                                                                        */ 
  78. /*    DATE              NAME                      DESCRIPTION             */ 
  79. /*                                                                        */ 
  80. /*  01-01-1999     William E. Lamie         Initial Version 1.0           */ 
  81. /*  03-01-2000     William E. Lamie         Modified comment(s),          */ 
  82. /*                                            resulting in version 1.0b.  */ 
  83. /*  01-28-2001     William E. Lamie         Modified comment(s),          */ 
  84. /*                                            resulting in version 2.0.   */ 
  85. /*  03-01-2002     William E. Lamie         Modified comment(s),          */ 
  86. /*                                            resulting in version 3.0.   */ 
  87. /*                                                                        */ 
  88. /**************************************************************************/ 
  89. VOID    _fx_system_initialize(VOID)
  90. {
  91.     /* Initialize the head pointer of the opened media list and the
  92.        number of opened media.  */
  93.     _fx_system_media_opened_ptr =       FX_NULL;
  94.     _fx_system_media_opened_count =     0;
  95.     /* Initialize the time and date fields with their default values.  */
  96.     _fx_system_date =   FX_INITIAL_DATE;
  97.     _fx_system_time =   FX_INITIAL_TIME;
  98.     /* Create the FileX system timer.  This is responsible for updating 
  99.        the specified date and time at the rate specified by 
  100.        FX_UPDATE_RATE_IN_TICKS.  Note that the timer is not necessary for
  101.        regular FileX operation - it is only needed for accurate system 
  102.        date and time stamps on files.  */
  103. #ifndef FX_NO_TIMER
  104. // os_Create_Timer(tStrct,tName,tExpiration,tID,tInitTime,tReschedleTime,tEnable)
  105.    os_Create_Timer(&_fx_system_timer, "FileX System Timer", _fx_system_timer_entry, 0,
  106.                         FX_UPDATE_RATE_IN_TICKS, FX_UPDATE_RATE_IN_TICKS, TX_AUTO_ACTIVATE);
  107. #endif
  108. }
  109. #endif