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

📄 qm_defs.h

📁 NecluesRTX RTOS的源码
💻 H
字号:
/************************************************************************/
/*                                                                      */
/*              Copyright 1990 by Accelerated Technology                */
/*                                                                      */
/*  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 buyer or recipient of this  */
/*  package, implicitly accepts the terms of the license.               */
/*                                                                      */
/************************************************************************/

/************************************************************************/
/*                                                                      */
/*  FILE DESCRIPTION                                                    */
/*                                                                      */
/*  This file contains the description of the Queue Control Structures  */
/*  and the Queue Suspension Structures.                                */
/*                                                                      */
/*  ROUTINES                                                            */
/*                                                                      */
/*      None                                                            */
/*                                                                      */
/*  NOTES                                                               */
/*                                                                      */
/*      None                                                            */
/*                                                                      */
/************************************************************************/


/* Define Queue management attributes.  */

#define            MAX_Q_SUSPENSIONS        3 
#define            QM_MULTIPLE              0
#define            QM_SINGLE                1


/* The structure "QM_SUSPENSION_STRUCT" defines the information necessary 
   to suspend a task on one or multiple queues.  This structure is 
   allocated off of calling application stacks.  */

struct QM_SUSPENSION_STRUCT 
{
    signed int               qm_susp_type;  /* Type of suspension       */
    signed int               qm_task_id;    /* Task suspended           */
    unsigned int             qm_susp_id;    /* ID of this suspension    */
    signed int              *qm_return_addr;/* Address to return value  */
    unsigned int            *qm_item_ptr;   /* Pointer to the start of  
                                               item area                */
    struct QM_QUEUE_CONTROL_STRUCT
                            *qm_QCB_ptr;    /* Pointer to QCB of susp   */
    struct QM_SUSPENSION_STRUCT
                            *qm_next_susp,  /* Next suspension ptr      */
                            *qm_prev_susp;  /* Previous suspension ptr  */
};


/* The structure "QM_QUEUE_CONTROL_STRUCT" defines the information necessary 
   to manage placing information on and removing information from a queue.  
   In the file "QM.C" an array of these structures is allocated relative
   to the number and type of queues specified in the file "IN_DATA.C."  */

struct QM_QUEUE_CONTROL_STRUCT 
{
    unsigned int             qm_queue_items;/* Number of queue items    */
    signed   int             qm_queue_id;   /* Queue ID                 */
    unsigned int             qm_item_size;  /* Size of each item        */
    unsigned int             qm_queued;     /* Number of items queued   */
    unsigned int            *qm_queue_front;/* Front of the queue       */
    unsigned int            *qm_queue_back; /* Last entry in the queue  */
    unsigned int             qm_queue_full; /* Queue full flag          */
    unsigned int            *qm_queue_start;/* Start of queue pointer   */
    unsigned int            *qm_queue_end;  /* End of queue pointer     */
    struct QM_SUSPENSION_STRUCT
                        *qm_full_wait_head, /* Queue full wait head ptr */
                        *qm_full_wait_tail, /* Queue full wait tail ptr */
                        *qm_empty_wait_head,/* Queue empty wait head ptr*/
                        *qm_empty_wait_tail;/* Queue empty wait tail ptr*/
};

⌨️ 快捷键说明

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