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

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

?? quc.c

?? nucleas source code
?? C
?? 第 1 頁 / 共 5 頁
字號:

            /* Decrement the number of available words.  */
            queue -> qu_available =  queue -> qu_available - size;

            /* Increment the number of messages in the queue.  */
            queue -> qu_messages++;

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

        }
    }

    /* Release protection against access to the queue.  */
    TCT_Unprotect();

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

    /* Return the completion status.  */
    return(status);
}


/*************************************************************************/
/*                                                                       */
/* FUNCTION                                                              */
/*                                                                       */
/*      QUC_Receive_From_Queue                                           */
/*                                                                       */
/* DESCRIPTION                                                           */
/*                                                                       */
/*      This function receives a message from the specified queue.  The  */
/*      size of the message is specified by the caller.  If there is a   */
/*      message currently in the queue, the message is removed from the  */
/*      queue and placed in the caller's area.  Suspension is possible   */
/*      if the request cannot be satisfied.                              */
/*                                                                       */
/* CALLED BY                                                             */
/*                                                                       */
/*      Application                                                      */
/*      QUCE_Receive_From_Queue             Error checking shell         */
/*                                                                       */
/* CALLS                                                                 */
/*                                                                       */
/*      CSC_Place_On_List                   Place on suspend list        */
/*      CSC_Priority_Place_On_List          Place on priority list       */
/*      CSC_Remove_From_List                Remove from suspend list     */
/*      [HIC_Make_History_Entry]            Make entry in history log    */
/*      TCC_Resume_Task                     Resume a suspended task      */
/*      TCC_Suspend_Task                    Suspend calling task         */
/*      TCC_Task_Priority                   Pickup task's priority       */
/*      [TCT_Check_Stack]                   Stack checking function      */
/*      TCT_Control_To_System               Transfer control to system   */
/*      TCT_Current_Thread                  Pickup current thread pointer*/
/*      TCT_System_Protect                  Protect queue                */
/*      TCT_Unprotect                       Release protection           */
/*                                                                       */
/* INPUTS                                                                */
/*                                                                       */
/*      queue_ptr                           Queue control block pointer  */
/*      message                             Pointer to message to send   */
/*      size                                Size of the message          */
/*      actual_size                         Size of message received     */
/*      suspend                             Suspension option if empty   */
/*                                                                       */
/* OUTPUTS                                                               */
/*                                                                       */
/*      NU_SUCCESS                          If service is successful     */
/*      NU_QUEUE_EMPTY                      If queue is currently empty  */
/*      NU_TIMEOUT                          If timeout on service expires*/
/*      NU_QUEUE_DELETED                    If queue was deleted during  */
/*                                            suspension                 */
/*      NU_QUEUE_RESET                      If queue was reset during    */
/*                                            suspension                 */
/*                                                                       */
/* HISTORY                                                               */
/*                                                                       */
/*         DATE                    REMARKS                               */
/*                                                                       */
/*      03-01-1993      Created initial version 1.0                      */
/*      04-19-1993      Verified version 1.0                             */
/*      11-01-1993      Corrected a problem resuming a                   */
/*                      task suspended on a full queue                   */
/*                      that only has a capacity of a                    */
/*                      single message, resulting in                     */
/*                      version 1.0b                                     */
/*      11-01-1993      Verified version 1.0b                            */
/*      03-01-1994      Changed function interfaces to                   */
/*                      match those in prototype,                        */
/*                      added register options, changed                  */
/*                      protection logic to reduce                       */
/*                      overhead, optimized copy loop,                   */
/*                      resulting in version 1.1                         */
/*                                                                       */
/*      03-18-1994      Verified version 1.1                             */
/*      01-28-1998      Corrected SPR412.                                */
/*                                                                       */
/*************************************************************************/
STATUS  QUC_Receive_From_Queue(NU_QUEUE *queue_ptr, VOID *message,
                UNSIGNED size, UNSIGNED *actual_size, UNSIGNED suspend)
{

R1 QU_QCB      *queue;                      /* Queue control block ptr   */
QU_SUSPEND      suspend_block;              /* Allocate suspension block */
QU_SUSPEND     *suspend_ptr;                /* Pointer to suspend block  */
R3 UNSIGNED_PTR source;                     /* Pointer to source         */
R4 UNSIGNED_PTR destination;                /* Pointer to destination    */
TC_TCB         *task;                       /* Task pointer              */
UNSIGNED        copy_size;                  /* Number of words to copy   */
R2 INT          i;                          /* Working counter           */
STATUS          preempt;                    /* Preemption flag           */
STATUS          status;                     /* Completion status         */
NU_SUPERV_USER_VARIABLES


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

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

#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_RECEIVE_FROM_QUEUE_ID, (UNSIGNED) queue,
                                        (UNSIGNED) message, (UNSIGNED) size);

#endif

    /* Initialize the status as successful.  */
    status =  NU_SUCCESS;

    /* Protect against simultaneous access to the queue.  */
    TCT_System_Protect();

    /* Determine if an urgent message request is currently suspended.  */
    if (queue -> qu_urgent_list)
    {

        /* If so, copy the message from the suspended request block and
           resume the associated task.  */

        /* Decrement the number of tasks waiting on queue.  */
        queue -> qu_tasks_waiting--;

        /* Remove the first suspended block from the list.  */
        suspend_ptr =  queue -> qu_urgent_list;
        CSC_Remove_From_List((CS_NODE **) &(queue -> qu_urgent_list),
                                          &(suspend_ptr -> qu_suspend_link));

        /* Setup the source and destination pointers.  */
        destination =   (UNSIGNED_PTR) message;
        source =        suspend_ptr -> qu_message_area;

        /* Initialize the return status.  */
        suspend_ptr -> qu_return_status =  NU_SUCCESS;

        /* Loop to actually copy the message.  */
        i =  (INT) suspend_ptr -> qu_message_size;
        do
        {
            *(destination++) =  *(source);
            if ((--i) == 0)
                break;
            source++;
        } while (1);

        /* Return the size of the message copied.  */
        *actual_size =  suspend_ptr -> qu_message_size;

        /* Wakeup the waiting task and check for preemption.  */
        preempt =
            TCC_Resume_Task((NU_TASK *) suspend_ptr -> qu_suspended_task,
                                                     NU_QUEUE_SUSPEND);

        /* Determine if preemption needs to take place. */
        if (preempt)

             /* Transfer control to the system if the resumed task function
                detects a preemption condition.  */
             TCT_Control_To_System();
    }

    /* Determine if there are messages in the queue.  */
    else if (queue -> qu_messages)
    {

        /* Copy message from queue into the caller's area.  */

        /* Setup the source and destination pointers.  */
        source =       queue -> qu_read;
        destination =  (UNSIGNED_PTR) message;

        /* Process according to the type of message supported by the queue. */
        if (queue -> qu_fixed_size)
        {

            /* Queue supports fixed-size messages.  */

            /* Copy the message from the queue area into the destination.  */
            i =  (INT) size;
            do
            {
                *(destination) =  *(source++);
                if ((--i) == 0)
                    break;
                destination++;
            } while (1);
        }
        else
        {

            /* Queue supports variable-size messages.  */

            /* Variable length message size is actually in the queue area. */
            size =  *(source++);

            /* Check for a wrap-around condition on the queue.  */
            if (source >= queue -> qu_end)

                /* Wrap the read pointer back to the top of the queue
                   area.  */
                source =  queue -> qu_start;

            /* Increment the number of available words in the queue.  */
            queue -> qu_available++;

            /* Calculate the number of words remaining from the read pointer
               to the bottom of the queue.  */
            copy_size =  queue -> qu_end - source;

            /* Determine if the message needs to be wrapped around the
               edge of the queue area.  */
            if (copy_size >= size)
            {

                /* Copy the whole message at once.  */
                i =  (INT) size;
                do
                {
                    *(destination) =  *(source++);
                    if ((--i) == 0)
                        break;
                    destination++;
                } while (1);
            }
            else
            {

                /* Copy the first half of the message.  */
                i =  (INT) copy_size;
                do
                {
                    *(destination++) =  *(source);
                    if ((--i) == 0)
                        break;
                    source++;
                } while (1);

                /* Copy the second half of the message.  */
                source =  queue -> qu_start;
                i =  (INT) (size - copy_size);
                do
                {
                    *(destination) =  *(source++);
                    if ((--i) == 0)
                        break;
                    destination++;
                } while (1);
            }
        }

        /* Check again for wrap-around condition on the read pointer. */
        if (source >= queue -> qu_end)

            /* Move the read pointer to the top of the queue area.  */
            queue -> qu_read =  queue -> qu_start;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美影院一区二区| 久久99久久久欧美国产| 久久青草欧美一区二区三区| 欧美羞羞免费网站| 欧美日韩高清一区| 色成年激情久久综合| 欧美色男人天堂| 一区二区在线看| 樱桃视频在线观看一区| 舔着乳尖日韩一区| 成人黄色综合网站| 欧美日韩中文国产| 26uuu精品一区二区在线观看| 国产婷婷色一区二区三区四区 | 91色九色蝌蚪| 欧美一区二区三区免费在线看| 2021中文字幕一区亚洲| 亚洲狠狠丁香婷婷综合久久久| 青青草原综合久久大伊人精品优势| 国产a视频精品免费观看| 欧美日韩亚洲高清一区二区| 亚洲国产精品t66y| 蜜桃久久久久久| 97精品久久久久中文字幕| 欧美一级黄色大片| 亚洲国产成人高清精品| 六月丁香婷婷色狠狠久久| 日本道在线观看一区二区| 一区二区三区欧美在线观看| 欧美色成人综合| 美女久久久精品| 久久九九99视频| 日本韩国一区二区三区视频| 亚洲成人1区2区| 久久午夜国产精品| 97se亚洲国产综合自在线| 中文字幕一区日韩精品欧美| 国产精品1024| 曰韩精品一区二区| 91麻豆福利精品推荐| 亚洲人成电影网站色mp4| 欧美性一二三区| 九九视频精品免费| 中文字幕永久在线不卡| 欧洲国产伦久久久久久久| 日本中文字幕一区| 国产拍揄自揄精品视频麻豆| 在线视频一区二区三| 美脚の诱脚舐め脚责91| 国产精品另类一区| 欧美中文字幕一区二区三区亚洲| 麻豆91精品视频| 亚洲摸摸操操av| 久久久久久久久97黄色工厂| 在线观看91视频| 成人免费看视频| 久久国产精品99精品国产| 国产精品国产馆在线真实露脸| 日韩一级黄色大片| 在线亚洲一区观看| 99视频精品免费视频| 精品一区二区影视| 美女一区二区视频| 亚洲激情自拍视频| 自拍视频在线观看一区二区| 精品国产1区二区| 777久久久精品| 91麻豆视频网站| www.亚洲国产| 成人短视频下载| 不卡一区中文字幕| 国产乱码精品一区二区三区五月婷 | 久久麻豆一区二区| 欧美精品免费视频| 欧美日韩中字一区| 91电影在线观看| 欧美精品久久久久久久多人混战 | 极品少妇xxxx偷拍精品少妇| 日本va欧美va精品发布| 青青草97国产精品免费观看无弹窗版| 一区二区三区四区乱视频| 亚洲永久精品国产| 奇米综合一区二区三区精品视频| 免费看欧美美女黄的网站| 久久国产夜色精品鲁鲁99| 国产原创一区二区三区| 国产成人免费av在线| 99亚偷拍自图区亚洲| 欧美特级限制片免费在线观看| 欧美浪妇xxxx高跟鞋交| 2欧美一区二区三区在线观看视频 337p粉嫩大胆噜噜噜噜噜91av | 日韩一区二区三免费高清| 久久夜色精品一区| 亚洲人成人一区二区在线观看| 亚洲精选视频免费看| 日韩激情在线观看| 国产乱子轮精品视频| 91久久精品一区二区三区| 欧美变态tickle挠乳网站| 成人免费在线视频观看| 日本不卡123| av激情亚洲男人天堂| 欧美成人一区二区| 伊人婷婷欧美激情| 国产精品一品二品| 成人欧美一区二区三区小说| 亚洲一区二区免费视频| av午夜精品一区二区三区| 精品裸体舞一区二区三区| 亚洲一区中文日韩| 91在线小视频| 国产农村妇女毛片精品久久麻豆| 五月天一区二区三区| 9i在线看片成人免费| 国产视频视频一区| 国产成人av电影在线| 久久伊人中文字幕| 久久国产尿小便嘘嘘尿| 欧美刺激午夜性久久久久久久| 午夜精品福利视频网站| 欧美日韩久久久| 日韩精品一级中文字幕精品视频免费观看| av在线播放成人| 亚洲人成网站色在线观看| 99在线精品视频| 亚洲精品乱码久久久久| 色94色欧美sute亚洲线路一久| 国产精品国产a| 欧美在线免费观看亚洲| 婷婷综合久久一区二区三区| 日韩一级欧美一级| 成人午夜激情影院| 亚洲黄色在线视频| 日韩欧美一区在线观看| 国产黑丝在线一区二区三区| 日韩美女精品在线| 69堂成人精品免费视频| 欧美日韩中文字幕一区| 紧缚奴在线一区二区三区| 亚洲欧美怡红院| 欧美变态tickle挠乳网站| av电影一区二区| 老司机午夜精品99久久| 综合欧美亚洲日本| 欧美日韩一区二区不卡| 成人性生交大片| 奇米精品一区二区三区在线观看| 国产欧美视频一区二区| 成人免费在线视频| 91浏览器入口在线观看| 国产婷婷色一区二区三区| 免费一级片91| 亚洲国产成人一区二区三区| 这里只有精品视频在线观看| 日韩小视频在线观看专区| 精品久久久久久久久久久院品网 | 欧美一级精品在线| 欧美日韩一区不卡| 3d动漫精品啪啪一区二区竹菊| 色综合久久99| 欧美色大人视频| 欧美一区二区三区视频在线| 日韩一二三四区| 久久日一线二线三线suv| 久久夜色精品一区| 亚洲人成精品久久久久久| 亚洲黄色免费电影| 日韩国产欧美一区二区三区| 免费一区二区视频| 成人综合在线网站| 欧美中文字幕一区二区三区| 欧美日本乱大交xxxxx| 精品国产伦一区二区三区观看体验| 日韩精品中文字幕一区二区三区| 欧美精品一区二区在线播放| 亚洲国产精品传媒在线观看| 亚洲h在线观看| 精品在线一区二区三区| 国产久卡久卡久卡久卡视频精品| www.亚洲国产| 日韩免费电影一区| 亚洲自拍偷拍麻豆| 国产美女一区二区三区| 欧美片网站yy| 亚洲男人天堂av网| 国产成人av影院| 欧美一区二区三区性视频| 亚洲美女在线国产| 国产成人av网站| 久久久久久久国产精品影院| 懂色av中文字幕一区二区三区| 一本色道久久综合狠狠躁的推荐| 欧美va天堂va视频va在线| 亚洲高清在线视频| 欧美性做爰猛烈叫床潮| **欧美大码日韩| 国产福利91精品一区二区三区| 欧美成人午夜电影| 麻豆精品一区二区三区| 日韩手机在线导航|