📄 hic.c
字号:
/*************************************************************************//* *//* Copyright Mentor Graphics Corporation 2002 *//* All Rights Reserved. *//* *//* THIS WORK CONTAINS TRADE SECRET AND PROPRIETARY INFORMATION WHICH IS *//* THE PROPERTY OF MENTOR GRAPHICS CORPORATION OR ITS LICENSORS AND IS *//* SUBJECT TO LICENSE TERMS. *//* *//*************************************************************************//*************************************************************************//* *//* FILE NAME VERSION *//* *//* hic.c Nucleus PLUS 1.14 *//* *//* COMPONENT *//* *//* HI - History Management *//* *//* DESCRIPTION *//* *//* This file contains the core routines for the History Management *//* component. *//* *//* 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. *//* 03-26-1999 Released 1.11m (new release *//* numbering scheme) *//* 04-17-2002 Released version 1.13m *//* 11-07-2002 Released version 1.14 *//*************************************************************************/#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. *//* *//* 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){NU_SUPERV_USER_VARIABLES /* Switch to supervisor mode */ NU_SUPERVISOR_MODE(); /* 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(); /* Return to user mode */ NU_USER_MODE();}/*************************************************************************//* *//* FUNCTION *//* *//* HIC_Enable_History_Saving *//* *//* DESCRIPTION *//* *//* This function enables the history saving function. *//* *//* 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){NU_SUPERV_USER_VARIABLES /* Switch to supervisor mode */ NU_SUPERVISOR_MODE(); /* 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(); /* Return to user mode */ NU_USER_MODE();}/*************************************************************************//* *//* FUNCTION *//* *//* HIC_Make_History_Entry_Service *//* *//* DESCRIPTION *//* *//* This function makes an application entry in the history table. *//* *//* 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 *//* the history table- if history saving is enabled. *//* *//* CALLED BY *//* */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -