📄 evce.c
字号:
/*************************************************************************/
/* */
/* Copyright Mentor Graphics Corporation 2004 */
/* 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 */
/* */
/* evce.c Nucleus PLUS 1.15 */
/* */
/* COMPONENT */
/* */
/* EV - Event Group Management */
/* */
/* DESCRIPTION */
/* */
/* This file contains the error checking routines for the functions */
/* in the Event Group component. This permits easy removal of */
/* error checking logic when it is not needed. */
/* */
/* DATA STRUCTURES */
/* */
/* None */
/* */
/* FUNCTIONS */
/* */
/* EVCE_Create_Event_Group Create an event group */
/* EVCE_Delete_Event_Group Delete an event group */
/* EVCE_Set_Events Set events in a group */
/* EVCE_Retrieve_Events Retrieve events from a group */
/* */
/* DEPENDENCIES */
/* */
/* cs_extr.h Common Service functions */
/* tc_extr.h Thread Control functions */
/* ev_extr.h Event Group functions */
/* */
/*************************************************************************/
#define NU_SOURCE_FILE
#include "plus/inc/cs_extr.h" /* Common service functions */
#include "plus/inc/tc_extr.h" /* Thread control functions */
#include "plus/inc/ev_extr.h" /* Event Group functions */
/*************************************************************************/
/* */
/* FUNCTION */
/* */
/* EVCE_Create_Event_Group */
/* */
/* DESCRIPTION */
/* */
/* This function performs error checking on the parameters supplied */
/* to the create event group function. */
/* */
/* CALLED BY */
/* */
/* Application */
/* */
/* CALLS */
/* */
/* EVC_Create_Event_Group Actual create event group */
/* function */
/* */
/* INPUTS */
/* */
/* event_group_ptr Event Group control block ptr*/
/* name Event Group name */
/* */
/* OUTPUTS */
/* */
/* NU_INVALID_GROUP Event group control block */
/* pointer is NULL */
/* */
/*************************************************************************/
STATUS EVCE_Create_Event_Group(NU_EVENT_GROUP *event_group_ptr, CHAR *name)
{
EV_GCB *event_group; /* Event control block ptr */
STATUS status; /* Completion status */
/* Move input event group pointer into internal pointer. */
event_group = (EV_GCB *) event_group_ptr;
/* Check for a NULL event group pointer or an already created event
group. */
if ((event_group == NU_NULL) || (event_group -> ev_id == EV_EVENT_ID))
/* Invalid event group control block pointer. */
status = NU_INVALID_GROUP;
else
/* Call the actual service to create the event group. */
status = EVC_Create_Event_Group(event_group_ptr, name);
/* Return completion status. */
return(status);
}
/*************************************************************************/
/* */
/* FUNCTION */
/* */
/* EVCE_Delete_Event_Group */
/* */
/* DESCRIPTION */
/* */
/* This function performs error checking on the parameters supplied */
/* to the delete event group function. */
/* */
/* CALLED BY */
/* */
/* Application */
/* */
/* CALLS */
/* */
/* EVC_Delete_Event_Group Actual delete event group */
/* function */
/* */
/* INPUTS */
/* */
/* event_group_ptr Event Group control block ptr*/
/* */
/* OUTPUTS */
/* */
/* NU_INVALID_GROUP Event group control block */
/* pointer is invalid */
/* */
/*************************************************************************/
STATUS EVCE_Delete_Event_Group(NU_EVENT_GROUP *event_group_ptr)
{
EV_GCB *event_group; /* Event control block ptr */
STATUS status; /* Completion status */
/* Move input event group pointer into internal pointer. */
event_group = (EV_GCB *) event_group_ptr;
/* Determine if the event group pointer is valid. */
if ((event_group) && (event_group -> ev_id == EV_EVENT_ID))
/* Event group pointer is valid, call function to delete it. */
status = EVC_Delete_Event_Group(event_group_ptr);
else
/* Event group pointer is invalid, indicate in completion status. */
status = NU_INVALID_GROUP;
/* Return completion status. */
return(status);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -