亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? quc.c

?? nucleas source code
?? C
?? 第 1 頁 / 共 5 頁
字號:
/*************************************************************************/
/*                                                                       */
/*               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       */
/*                                                                       */
/*      quc.c                                          Nucleus PLUS 1.14 */
/*                                                                       */
/* COMPONENT                                                             */
/*                                                                       */
/*      QU - Queue Management                                            */
/*                                                                       */
/* DESCRIPTION                                                           */
/*                                                                       */
/*      This file contains the core routines for the Queue management    */
/*      component.                                                       */
/*                                                                       */
/* DATA STRUCTURES                                                       */
/*                                                                       */
/*      None                                                             */
/*                                                                       */
/* FUNCTIONS                                                             */
/*                                                                       */
/*      QUC_Create_Queue                    Create a message queue       */
/*      QUC_Delete_Queue                    Delete a message queue       */
/*      QUC_Send_To_Queue                   Send message to a queue      */
/*      QUC_Receive_From_Queue              Receive a message from queue */
/*      QUC_Cleanup                         Cleanup on timeout or a      */
/*                                            terminate condition        */
/*                                                                       */
/* DEPENDENCIES                                                          */
/*                                                                       */
/*      cs_extr.h                           Common Service functions     */
/*      tc_extr.h                           Thread Control functions     */
/*      qu_extr.h                           Queue functions              */
/*      hi_extr.h                           History functions            */
/*                                                                       */
/* HISTORY                                                               */
/*                                                                       */
/*         DATE                    REMARKS                               */
/*                                                                       */
/*      03-01-1993      Created initial version 1.0                      */
/*      04-19-1993      Verified version 1.0                             */
/*      08-09-1993      Corrected pointer retrieval                      */
/*                      loop, resulting in version 1.0a                  */
/*      08-09-1993      Verified version 1.0a                            */
/*      11-01-1993      Corrected a problem with fixed-                  */
/*                      size queues of a size equal to                   */
/*                      one message, resulting in                        */
/*                      version 1.0b                                     */
/*      11-01-1993      Verified version 1.0b                            */
/*      03-01-1994      Moved non-core functions into                    */
/*                      supplemental files, changed                      */
/*                      function interfaces to match                     */
/*                      those in prototype, added                        */
/*                      register options, changed                        */
/*                      protection logic to reduce                       */
/*                      overhead, corrected bug in                       */
/*                      queue reset, optimized item                      */
/*                      copy loops, resulting in                         */
/*                      version 1.1                                      */
/*                                                                       */
/*      03-18-1994      Verified version 1.1                             */
/*      04-17-1996      updated to version 1.2                           */
/*      01-28-1998      Corrected SPR412 resulting in                    */
/*                      version 1.2a.                                    */
/*      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        "cs_extr.h"                 /* Common service functions  */
#include        "tc_extr.h"                 /* Thread control functions  */
#include        "qu_extr.h"                 /* Queue functions           */
#include        "hi_extr.h"                 /* History functions         */


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

extern CS_NODE         *QUD_Created_Queues_List;
extern UNSIGNED         QUD_Total_Queues;
extern TC_PROTECT       QUD_List_Protect;


/* Define internal component function prototypes.  */

VOID    QUC_Cleanup(VOID *information);


/*************************************************************************/
/*                                                                       */
/* FUNCTION                                                              */
/*                                                                       */
/*      QUC_Create_Queue                                                 */
/*                                                                       */
/* DESCRIPTION                                                           */
/*                                                                       */
/*      This function creates a queue and then places it on the list     */
/*      of created queues.                                               */
/*                                                                       */
/* CALLED BY                                                             */
/*                                                                       */
/*      Application                                                      */
/*      QUCE_Create_Queue                   Error checking shell         */
/*                                                                       */
/* CALLS                                                                 */
/*                                                                       */
/*      CSC_Place_On_List                   Add node to linked-list      */
/*      [HIC_Make_History_Entry]            Make entry in history log    */
/*      [TCT_Check_Stack]                   Stack checking function      */
/*      TCT_Protect                         Protect created list         */
/*      TCT_Unprotect                       Un-protect data structure    */
/*                                                                       */
/* INPUTS                                                                */
/*                                                                       */
/*      queue_ptr                           Queue control block pointer  */
/*      name                                Queue name                   */
/*      start_address                       Starting address of actual   */
/*                                            queue area                 */
/*      queue_size                          Total size of queue          */
/*      message_type                        Type of message supported by */
/*                                            the queue (fixed/variable) */
/*      message_size                        Size of message.  Variable   */
/*                                            message-length queues, this*/
/*                                            represents the maximum size*/
/*      suspend_type                        Suspension type              */
/*                                                                       */
/* OUTPUTS                                                               */
/*                                                                       */
/*      NU_SUCCESS                                                       */
/*                                                                       */
/* HISTORY                                                               */
/*                                                                       */
/*         DATE                    REMARKS                               */
/*                                                                       */
/*      03-01-1993      Created initial version 1.0                      */
/*      04-19-1993      Verified version 1.0                             */
/*      03-01-1994      Changed function interfaces to                   */
/*                      match those in prototype,                        */
/*                      added register options,                          */
/*                      resulting in version 1.1                         */
/*                                                                       */
/*      03-18-1994      Verified version 1.1                             */
/*                                                                       */
/*************************************************************************/
STATUS  QUC_Create_Queue(NU_QUEUE *queue_ptr, CHAR *name,
                      VOID *start_address, UNSIGNED queue_size,
                      OPTION message_type, UNSIGNED message_size,
                      OPTION suspend_type)
{

R1 QU_QCB      *queue;                      /* Queue control block ptr   */
INT             i;                          /* Working index variable    */
NU_SUPERV_USER_VARIABLES

    /* Switch to supervisor mode */
    NU_SUPERVISOR_MODE();

    /* Move input queue pointer into internal pointer.  */
    queue =  (QU_QCB *) queue_ptr;


#ifdef  NU_ENABLE_STACK_CHECK

    /* Call stack checking function to check for an overflow condition.  */
    TCT_Check_Stack();

#endif

#ifdef  NU_ENABLE_HISTORY

    /* Make an entry that corresponds to this function in the system history
       log.  */
    HIC_Make_History_Entry(NU_CREATE_QUEUE_ID, (UNSIGNED) queue,
                                (UNSIGNED) name, (UNSIGNED) start_address);

#endif

    /* First, clear the queue ID just in case it is an old Queue
       Control Block.  */
    queue -> qu_id =             0;

    /* Fill in the queue name.  */
    for (i = 0; i < NU_MAX_NAME; i++)
        queue -> qu_name[i] =  name[i];

    /* Setup the queue suspension type.  */
    if (suspend_type == NU_FIFO)

        /* FIFO suspension is selected, setup the flag accordingly.  */
        queue -> qu_fifo_suspend =  NU_TRUE;

    else

        /* Priority suspension is selected.  */
        queue -> qu_fifo_suspend =  NU_FALSE;

    /* Setup the queue message type.  */
    if (message_type == NU_FIXED_SIZE)

        /* Fixed-size messages are required.  */
        queue -> qu_fixed_size =  NU_TRUE;
    else

        /* Variable-size messages are required.  */
        queue -> qu_fixed_size =  NU_FALSE;

    /* Setup the message size.  */
    queue -> qu_message_size =  message_size;

    /* Clear the messages counter.   */
    queue -> qu_messages =  0;

    /* Setup the actual queue parameters.  */
    queue -> qu_queue_size =    queue_size;

    /* If the queue supports fixed-size messages, make sure that the queue
       size is an even multiple of the message size.  */
    if (queue -> qu_fixed_size)

        /* Adjust the area of the queue being used.  */
        queue_size =  (queue_size / message_size) * message_size;

    queue -> qu_available =     queue_size;
    queue -> qu_start =         (UNSIGNED *) start_address;
    queue -> qu_end =           queue -> qu_start + queue_size;
    queue -> qu_read =          (UNSIGNED *) start_address;
    queue -> qu_write =         (UNSIGNED *) start_address;

    /* Clear the suspension list pointer.  */
    queue -> qu_suspension_list =  NU_NULL;

    /* Clear the number of tasks waiting on the queue counter.  */
    queue -> qu_tasks_waiting =  0;

    /* Clear the urgent message list pointer.  */
    queue -> qu_urgent_list =  NU_NULL;

    /* Initialize link pointers.  */
    queue -> qu_created.cs_previous =    NU_NULL;
    queue -> qu_created.cs_next =        NU_NULL;

    /* Protect against access to the list of created queues.  */
    TCT_Protect(&QUD_List_Protect);

    /* At this point the queue is completely built.  The ID can now be
       set and it can be linked into the created queue list.  */
    queue -> qu_id =                     QU_QUEUE_ID;

    /* Link the queue into the list of created queues and increment the
       total number of queues in the system.  */
    CSC_Place_On_List(&QUD_Created_Queues_List, &(queue -> qu_created));
    QUD_Total_Queues++;

#ifdef INCLUDE_PROVIEW
    _RTProf_DumpQueue(RT_PROF_CREATE_QUEUE,queue,RT_PROF_OK);
#endif

    /* Release protection against access to the list of created queues.  */
    TCT_Unprotect();

    /* Return to user mode */
    NU_USER_MODE();

    /* Return successful completion.  */
    return(NU_SUCCESS);
}


/*************************************************************************/
/*                                                                       */
/* FUNCTION                                                              */
/*                                                                       */
/*      QUC_Delete_Queue                                                 */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
26uuu国产电影一区二区| 亚洲一二三区不卡| 亚洲激情图片一区| 激情国产一区二区| 在线观看不卡一区| 中文字幕国产一区| 日韩和欧美一区二区三区| av不卡在线观看| 精品99一区二区| 亚洲成年人网站在线观看| 高清av一区二区| 欧美一区二区三区电影| 亚洲欧美日韩精品久久久久| 国产毛片精品视频| 精品免费视频一区二区| 亚洲一区二区在线免费观看视频| 国产精品99精品久久免费| 91精品国产综合久久久蜜臀粉嫩| 亚洲激情六月丁香| 97久久精品人人爽人人爽蜜臀| 久久免费视频一区| 美女性感视频久久| 欧美一区二区在线免费播放| 亚洲综合小说图片| 一本久道中文字幕精品亚洲嫩| 国产精品午夜电影| 粉嫩av一区二区三区粉嫩| 久久综合色综合88| 国产一区二区福利| 国产亚洲欧美一级| 丰满亚洲少妇av| 欧美国产综合色视频| 精品一区二区精品| 久久久久综合网| 国模一区二区三区白浆| 精品国产第一区二区三区观看体验| 日韩精品亚洲一区| 91精品国产一区二区三区| 视频一区免费在线观看| 欧美日韩高清一区二区不卡| 午夜精品久久久久久不卡8050| 欧美亚洲一区三区| 亚洲成a人v欧美综合天堂下载| 欧美日韩视频第一区| 午夜久久久影院| 欧美一区二区成人| 国产一区二区看久久| 国产偷v国产偷v亚洲高清| 成人精品视频一区二区三区尤物| 中文成人av在线| 色婷婷av一区二区三区gif | 在线视频亚洲一区| 亚洲九九爱视频| 欧美日高清视频| 精品亚洲免费视频| 成人免费一区二区三区视频| 99久久精品99国产精品| 亚洲超丰满肉感bbw| 日韩一区二区高清| 成人中文字幕合集| 亚洲成人在线观看视频| 欧美一区二区免费观在线| 国产乱码精品一区二区三区忘忧草| 中文字幕精品一区二区精品绿巨人| 91日韩在线专区| 日韩电影免费在线看| 国产色一区二区| 欧美亚洲精品一区| 国产一区二区三区黄视频 | 精品三级在线看| 懂色av一区二区三区蜜臀| 亚洲永久精品大片| 久久综合九色综合欧美亚洲| av成人免费在线观看| 裸体健美xxxx欧美裸体表演| 中文字幕免费不卡| 日韩手机在线导航| 91亚洲资源网| 精品一区二区免费| 午夜一区二区三区在线观看| 久久免费视频一区| 日韩一级成人av| 在线视频你懂得一区| 国产成人免费视频网站| 精品一二三四区| 亚洲精品伦理在线| 国产婷婷精品av在线| 欧美人与性动xxxx| 成人国产精品免费网站| 日韩精品一卡二卡三卡四卡无卡| 国产精品成人免费| 久久五月婷婷丁香社区| 欧美日韩一级大片网址| 成人高清视频在线| 国产伦理精品不卡| 日韩av一区二区三区四区| 亚洲日本免费电影| 中文字幕第一区综合| 日韩免费看的电影| 欧美欧美午夜aⅴ在线观看| 99re6这里只有精品视频在线观看| 激情综合亚洲精品| 日韩电影在线观看一区| 一区二区三区四区激情| 国产欧美日韩三区| 久久综合九色综合欧美98| 日韩午夜激情av| 正在播放一区二区| 欧美日韩国产高清一区二区三区| 在线一区二区三区| 一本色道亚洲精品aⅴ| 成人免费不卡视频| 成人免费高清在线观看| 国产成人精品一区二区三区网站观看| 久久99日本精品| 狠狠色综合播放一区二区| 精品一区二区综合| 国产综合久久久久久鬼色| 久久成人18免费观看| 精品无人区卡一卡二卡三乱码免费卡 | 樱桃国产成人精品视频| 亚洲免费在线观看| 一区二区三区欧美日| 亚洲欧美日韩人成在线播放| 久久成人羞羞网站| 国产一区激情在线| 国产一区二区精品久久91| 国产乱人伦精品一区二区在线观看 | 国产精品一线二线三线| 国产91精品久久久久久久网曝门| 成人深夜在线观看| 91偷拍与自偷拍精品| 91久久精品一区二区三| 欧美日韩一二三| 精品粉嫩aⅴ一区二区三区四区| 精品国免费一区二区三区| 国产亚洲综合在线| 亚洲三级小视频| 首页国产欧美久久| 国产一区二区精品在线观看| av福利精品导航| 欧美久久久久免费| 久久久青草青青国产亚洲免观| 国产精品久久久久一区| 亚洲中国最大av网站| 麻豆精品蜜桃视频网站| 国产精华液一区二区三区| 91碰在线视频| 日韩免费成人网| 亚洲欧洲国产日本综合| 视频一区二区不卡| 成人性视频网站| 欧美日韩国产精选| 欧美极品xxx| 日韩不卡一二三区| 国产91精品免费| 欧美精品三级在线观看| 国产日韩精品一区| 轻轻草成人在线| 色婷婷久久99综合精品jk白丝| 精品噜噜噜噜久久久久久久久试看 | 国产丝袜在线精品| 亚洲高清免费一级二级三级| 极品尤物av久久免费看| 91传媒视频在线播放| 久久久久久亚洲综合影院红桃| 一区二区久久久| 国产高清亚洲一区| 日韩一区二区三区精品视频| 国产精品国产三级国产普通话三级| 天堂在线一区二区| 色欧美片视频在线观看| 国产欧美精品一区二区色综合| 亚洲国产日韩一区二区| 成人99免费视频| 久久婷婷国产综合国色天香| 亚洲1区2区3区4区| 色菇凉天天综合网| 国产欧美精品一区二区三区四区 | 成人aa视频在线观看| 日韩欧美视频在线| 亚洲mv在线观看| 色综合网色综合| 亚洲欧洲av一区二区三区久久| 国模大尺度一区二区三区| 欧美日韩mp4| 午夜欧美一区二区三区在线播放| 91亚洲永久精品| 日韩伦理免费电影| 99免费精品在线| 国产精品久久国产精麻豆99网站| 国产精品资源网| 久久久一区二区三区捆绑**| 久久国产综合精品| 精品国产乱码久久久久久老虎| 日韩va亚洲va欧美va久久| 欧美日韩国产影片| 三级一区在线视频先锋| 欧美日韩国产成人在线91| 亚洲成人激情社区|