📄 quse.c
字号:
/*************************************************************************/
/* */
/* Copyright (c) 1993-1996 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 */
/* */
/* quse.c PLUS 1.2 */
/* */
/* COMPONENT */
/* */
/* QU - Queue Management */
/* */
/* DESCRIPTION */
/* */
/* This file contains error checking routines for supplemental */
/* functions in the Queue component. This permits easy removal of */
/* error checking logic when it is not needed. */
/* */
/* AUTHOR */
/* */
/* William E. Lamie, Accelerated Technology, Inc. */
/* */
/* DATA STRUCTURES */
/* */
/* None */
/* */
/* FUNCTIONS */
/* */
/* QUSE_Reset_Queue Reset a queue */
/* QUSE_Send_To_Front_Of_Queue Send message to queue's front*/
/* QUSE_Broadcast_To_Queue Broadcast message to queue */
/* */
/* DEPENDENCIES */
/* */
/* cs_extr.h Common Service functions */
/* tc_extr.h Thread Control functions */
/* qu_extr.h Queue functions */
/* */
/* HISTORY */
/* */
/* NAME DATE REMARKS */
/* */
/* W. Lamie 03-01-1994 Created initial version 1.1 from */
/* routines originally in core */
/* error checking file */
/* R. Pfaff - */
/* D. Lamie 03-18-1994 Verified version 1.1 */
/* M.Q. Qian 04-17-1996 updated to version 1.2 */
/* */
/*************************************************************************/
#define NU_SOURCE_FILE
#include "cs_extr.h" /* Common service functions */
#include "tc_extr.h" /* Thread control functions */
#include "qu_extr.h" /* Queue functions */
/*************************************************************************/
/* */
/* FUNCTION */
/* */
/* QUSE_Reset_Queue */
/* */
/* DESCRIPTION */
/* */
/* This function performs error checking on the parameter supplied */
/* to the queue reset function. */
/* */
/* AUTHOR */
/* */
/* William E. Lamie, Accelerated Technology, Inc. */
/* */
/* CALLED BY */
/* */
/* Application */
/* */
/* CALLS */
/* */
/* QUS_Reset_Queue Actual reset queue function */
/* */
/* INPUTS */
/* */
/* queue_ptr Queue control block pointer */
/* */
/* OUTPUTS */
/* */
/* NU_INVALID_QUEUE Invalid queue pointer */
/* */
/* HISTORY */
/* */
/* NAME DATE REMARKS */
/* */
/* W. Lamie 03-01-1993 Created initial version 1.0 */
/* D. Lamie 04-19-1993 Verified version 1.0 */
/* W. Lamie 03-01-1994 Modified function interface, */
/* resulting in version 1.1 */
/* R. Pfaff - */
/* D. Lamie 03-18-1994 Verified version 1.1 */
/* */
/*************************************************************************/
STATUS QUSE_Reset_Queue(NU_QUEUE *queue_ptr)
{
QU_QCB *queue;
STATUS status;
/* Move input queue pointer into internal pointer. */
queue = (QU_QCB *) queue_ptr;
/* Determine if there is an error with the queue pointer. */
if (queue == NU_NULL)
/* Indicate that the queue pointer is invalid. */
status = NU_INVALID_QUEUE;
else if (queue -> qu_id != QU_QUEUE_ID)
/* Indicate that the queue pointer is invalid. */
status = NU_INVALID_QUEUE;
else
/* All the parameters are okay, call the actual function to reset
a queue. */
status = QUS_Reset_Queue(queue_ptr);
/* Return completion status. */
return(status);
}
/*************************************************************************/
/* */
/* FUNCTION */
/* */
/* QUSE_Send_To_Front_Of_Queue */
/* */
/* DESCRIPTION */
/* */
/* This function performs error checking on the parameters supplied */
/* to the send message to front of queue function. */
/* */
/* AUTHOR */
/* */
/* William E. Lamie, Accelerated Technology, Inc. */
/* */
/* CALLED BY */
/* */
/* Application */
/* */
/* CALLS */
/* */
/* QUS_Send_To_Front_Of_Queue Actual send to front of */
/* queue function */
/* TCCE_Suspend_Error Check suspend validity */
/* */
/* INPUTS */
/* */
/* queue_ptr Queue control block pointer */
/* message Pointer to message to send */
/* size Size of message to send */
/* suspend Suspension option if full */
/* */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -