⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hic.c

📁 nuclues 内核源代码已经在arm7-9 上作了移植
💻 C
📖 第 1 页 / 共 2 页
字号:
/*************************************************************************/
/*                                                                       */
/*        Copyright (c) 1993-2001 Accelerated Technology, Inc.           */
/*                                                                       */
/* PROPRIETARY RIGHTS of Accelerated Technology are involved in the      */
/* subject matter of this material.  All manufacturing, reproduction,    */
/* use, and sales rights pertaining to this subject matter are governed  */
/* by the license agreement.  The recipient of this software implicitly  */
/* accepts the terms of the license.                                     */
/*                                                                       */
/*************************************************************************/

/*************************************************************************/
/*                                                                       */
/* FILE NAME                                            VERSION          */
/*                                                                       */
/*      hic.c                                           PLUS  1.13       */
/*                                                                       */
/* COMPONENT                                                             */
/*                                                                       */
/*      HI - History Management                                          */
/*                                                                       */
/* DESCRIPTION                                                           */
/*                                                                       */
/*      This file contains the core routines for the History Management  */
/*      component.                                                       */
/*                                                                       */
/* AUTHOR                                                                */
/*                                                                       */
/*      Accelerated Technology, Inc.                                     */
/*                                                                       */
/* DATA STRUCTURES                                                       */
/*                                                                       */
/*      None                                                             */
/*                                                                       */
/* FUNCTIONS                                                             */
/*                                                                       */
/*      HIC_Disable_History_Saving          Disable history saving       */
/*      HIC_Enable_History_Saving           Enable history saving        */
/*      HIC_Make_History_Entry_Service      Make history entry service   */
/*      HIC_Make_History_Entry              Make system history entry    */
/*      HIC_Retrieve_History_Entry          Retrieve history entry       */
/*                                                                       */
/* DEPENDENCIES                                                          */
/*                                                                       */
/*      tc_extr.h                           Thread Control functions     */
/*      tm_extr.h                           Timer management functions   */
/*      hi_extr.h                           History functions            */
/*                                                                       */
/* HISTORY                                                               */
/*                                                                       */
/*         DATE                    REMARKS                               */
/*                                                                       */
/*      03-01-1993      Created initial version 1.0                      */
/*      04-19-1993      Verified version 1.0                             */
/*      03-01-1994      Replaced void with VOID,                         */
/*                        modified protection logic,                     */
/*                        resulting in version 1.1                       */
/*                                                                       */
/*      03-18-1994      Verified version 1.1                             */
/*      04-17-1996      updated to version 1.2                           */
/*      03-24-1998      Released version 1.3.                            */
/*                                                                       */
/*************************************************************************/
#define         NU_SOURCE_FILE

#include        "in_defs.h"                 /* Initialization defines    */
#include        "tc_extr.h"                 /* Thread control functions  */
#include        "tm_extr.h"                 /* Timer functions           */
#include        "hi_extr.h"                 /* History functions         */

/* Define external inner-component global data references.  */

extern INT              INC_Initialize_State;
extern INT              HID_History_Enable;
extern INT              HID_Write_Index;
extern INT              HID_Read_Index;
extern INT              HID_Entry_Count;
extern TC_PROTECT       HID_History_Protect;


/* Define the actual history table.  Note that this is defined in this file
   in order to eliminate this table if none of the run-time history functions
   are accessed.  */
   
HI_HISTORY_ENTRY  HIC_History_Table[HI_MAX_ENTRIES];


/*************************************************************************/
/*                                                                       */
/* FUNCTION                                                              */
/*                                                                       */
/*      HIC_Disable_History_Saving                                       */
/*                                                                       */
/* DESCRIPTION                                                           */
/*                                                                       */
/*      This function disables the history saving function.              */
/*                                                                       */
/* AUTHOR                                                                */
/*                                                                       */
/*      Accelerated Technology, Inc.                                     */
/*                                                                       */
/* CALLED BY                                                             */
/*                                                                       */
/*      Application                                                      */
/*                                                                       */
/* CALLS                                                                 */
/*                                                                       */
/*      TCT_Protect                         Protect history structures   */
/*      TCT_Unprotect                       Release history protection   */
/*                                                                       */
/* INPUTS                                                                */
/*                                                                       */
/*      None                                                             */
/*                                                                       */
/* OUTPUTS                                                               */
/*                                                                       */
/*      None                                                             */
/*                                                                       */
/* HISTORY                                                               */
/*                                                                       */
/*         DATE                    REMARKS                               */
/*                                                                       */
/*      03-01-1993      Created initial version 1.0                      */
/*      04-19-1993      Verified version 1.0                             */
/*      03-01-1994      Replaced void with VOID,                         */
/*                        resulting in version 1.1                       */
/*                                                                       */
/*      03-18-1994      Verified version 1.1                             */
/*                                                                       */
/*************************************************************************/
VOID  HIC_Disable_History_Saving(VOID)
{

    /* Protect the history data structures.  */
    TCT_Protect(&HID_History_Protect);
    
    /* Disable history saving by setting the enable flag to false.  */
    HID_History_Enable =  NU_FALSE;

    /* Release protection.  */
    TCT_Unprotect();
}


/*************************************************************************/
/*                                                                       */
/* FUNCTION                                                              */
/*                                                                       */
/*      HIC_Enable_History_Saving                                        */
/*                                                                       */
/* DESCRIPTION                                                           */
/*                                                                       */
/*      This function enables the history saving function.               */
/*                                                                       */
/* AUTHOR                                                                */
/*                                                                       */
/*      Accelerated Technology, Inc.                                     */
/*                                                                       */
/* CALLED BY                                                             */
/*                                                                       */
/*      Application                                                      */
/*                                                                       */
/* CALLS                                                                 */
/*                                                                       */
/*      TCT_Protect                         Protect history structures   */
/*      TCT_Unprotect                       Release history protection   */
/*                                                                       */
/* INPUTS                                                                */
/*                                                                       */
/*      None                                                             */
/*                                                                       */
/* OUTPUTS                                                               */
/*                                                                       */
/*      None                                                             */
/*                                                                       */
/* HISTORY                                                               */
/*                                                                       */
/*         DATE                    REMARKS                               */
/*                                                                       */
/*      03-01-1993      Created initial version 1.0                      */
/*      04-19-1993      Verified version 1.0                             */
/*      03-01-1994      Replaced void with VOID,                         */
/*                        resulting in version 1.1                       */
/*                                                                       */
/*      03-18-1994      Verified version 1.1                             */
/*                                                                       */
/*************************************************************************/
VOID  HIC_Enable_History_Saving(VOID)
{

    /* Protect the history data structures.  */
    TCT_Protect(&HID_History_Protect);
    
    /* Enable history saving by setting the enable flag to true.  */
    HID_History_Enable =  NU_TRUE;

    /* Release protection.  */
    TCT_Unprotect();
}


/*************************************************************************/
/*                                                                       */
/* FUNCTION                                                              */
/*                                                                       */
/*      HIC_Make_History_Entry_Service                                   */
/*                                                                       */
/* DESCRIPTION                                                           */
/*                                                                       */
/*      This function makes an application entry in the history table.   */
/*                                                                       */
/* AUTHOR                                                                */
/*                                                                       */
/*      Accelerated Technology, Inc.                                     */
/*                                                                       */
/* CALLED BY                                                             */
/*                                                                       */
/*      Application                                                      */
/*                                                                       */
/* CALLS                                                                 */
/*                                                                       */
/*      HIC_Make_History_Entry              Make a history entry         */
/*                                                                       */
/* INPUTS                                                                */
/*                                                                       */
/*      param1                              First history parameter      */
/*      param2                              Second history parameter     */
/*      param3                              Third history parameter      */
/*                                                                       */
/* OUTPUTS                                                               */
/*                                                                       */
/*      None                                                             */
/*                                                                       */
/* HISTORY                                                               */
/*                                                                       */
/*         DATE                    REMARKS                               */
/*                                                                       */
/*      03-01-1993      Created initial version 1.0                      */
/*      04-19-1993      Verified version 1.0                             */
/*                                                                       */
/*************************************************************************/
VOID  HIC_Make_History_Entry_Service(UNSIGNED param1, 
                                        UNSIGNED param2, UNSIGNED param3)
{

    /* Call actual function to make the history entry.  */
    HIC_Make_History_Entry(NU_USER_ID, param1, param2, param3);
}



/*************************************************************************/
/*                                                                       */
/* FUNCTION                                                              */
/*                                                                       */
/*      HIC_Make_History_Entry                                           */
/*                                                                       */
/* DESCRIPTION                                                           */
/*                                                                       */
/*      This function makes an entry in the next available location in   */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -