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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? quc.c

?? 基于OMAP1510的Nucleus移植代碼
?? C
?? 第 1 頁(yè) / 共 5 頁(yè)
字號(hào):

            /* 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;

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品一区二区久激情瑜伽| 国产精品国产自产拍高清av| 亚洲国产欧美在线| 在线亚洲精品福利网址导航| 亚洲另类在线视频| 日本高清不卡视频| 亚洲福利一区二区三区| 欧美日韩mp4| 一本色道久久综合狠狠躁的推荐| 中文在线资源观看网站视频免费不卡| 国产成人小视频| 亚洲视频在线一区二区| 99视频一区二区| 亚洲国产成人高清精品| 欧美日韩国产一级二级| 久久精品国产亚洲高清剧情介绍 | 91麻豆精品国产综合久久久久久| 日本强好片久久久久久aaa| 91精品国产乱码久久蜜臀| 久久精品国产精品青草| 国产日产欧美一区二区三区| 波多野结衣一区二区三区| 亚洲乱码日产精品bd| 欧美日韩在线观看一区二区| 另类小说综合欧美亚洲| 日本一区二区三区四区| 欧美三区在线观看| 国产在线观看免费一区| 一区在线中文字幕| 91精品欧美福利在线观看| 国产在线不卡一区| 亚洲三级电影网站| 日韩欧美一级片| 99视频精品全部免费在线| 肉色丝袜一区二区| 日本一二三四高清不卡| 欧美日本免费一区二区三区| 懂色一区二区三区免费观看 | 亚洲综合色自拍一区| 欧美日韩国产区一| 国产成人免费视频网站高清观看视频 | 91色婷婷久久久久合中文| 日本成人在线不卡视频| 国产精品福利电影一区二区三区四区| 欧美日韩国产免费| 99精品黄色片免费大全| 老司机午夜精品| 亚洲一区二区在线免费观看视频| 亚洲精品在线观看视频| 精品视频在线看| eeuss国产一区二区三区| 日本大胆欧美人术艺术动态| 亚洲免费av高清| 日本一区二区三区电影| 91精品国产综合久久久久久久久久| 成人免费毛片app| 国内成+人亚洲+欧美+综合在线| 亚洲国产精品人人做人人爽| 久久女同互慰一区二区三区| 欧美一区二区视频在线观看| 欧美性三三影院| 91色porny在线视频| 国产99久久久精品| 狠狠色狠狠色综合| 毛片一区二区三区| 丝袜美腿亚洲一区| 日韩美女精品在线| 国产精品久久精品日日| 国产欧美视频在线观看| 欧美一级日韩免费不卡| 精品视频全国免费看| 欧美亚洲图片小说| 色乱码一区二区三区88| 色婷婷国产精品久久包臀 | 国产suv一区二区三区88区| 日本色综合中文字幕| 性久久久久久久| 午夜精品久久久久久不卡8050| 亚洲视频资源在线| 亚洲精品一卡二卡| 亚洲男人天堂av网| 亚洲免费在线电影| 亚洲尤物视频在线| 尤物在线观看一区| 亚洲综合色婷婷| 亚洲午夜电影网| 亚洲国产成人av网| 免费精品视频在线| 免费人成网站在线观看欧美高清| 蜜臀av性久久久久蜜臀aⅴ四虎 | 亚洲激情一二三区| 亚洲精品视频在线观看免费| 一区二区国产视频| 亚洲国产成人porn| 毛片一区二区三区| 国产曰批免费观看久久久| 精品一区二区三区不卡| 国产剧情一区在线| 99视频热这里只有精品免费| 在线观看亚洲成人| 欧美一区二区三区四区五区 | 日韩一级视频免费观看在线| 欧美一区二区私人影院日本| 久久嫩草精品久久久精品一| 日本一区二区三区免费乱视频| 亚洲天堂2016| 午夜精品福利一区二区蜜股av| 裸体歌舞表演一区二区| 国产一区二区三区四区在线观看| 成人一二三区视频| 欧美日韩一区久久| 久久久久久久久久久黄色| 成人欧美一区二区三区视频网页| 亚洲国产成人tv| 国产美女久久久久| 在线视频综合导航| 久久亚洲精精品中文字幕早川悠里 | 国产精品性做久久久久久| 99久久精品国产网站| 欧美猛男男办公室激情| 国产日韩欧美综合在线| 亚洲国产成人av| 91精品国产91热久久久做人人| 久久久久国产成人精品亚洲午夜| 亚洲黄色免费电影| 久久成人18免费观看| 99麻豆久久久国产精品免费| 7777精品伊人久久久大香线蕉超级流畅| 亚洲精品一区在线观看| 一区二区三区产品免费精品久久75| 精品亚洲成a人在线观看 | 国产成人亚洲综合色影视| 在线免费视频一区二区| 国产亚洲欧美一级| 香蕉av福利精品导航| 成人精品免费网站| 日韩欧美中文字幕一区| 一区二区三区视频在线看| 国产福利精品导航| 日韩视频一区二区三区在线播放 | 国产欧美视频一区二区| 日本人妖一区二区| 欧美在线影院一区二区| 欧美高清一级片在线观看| 日韩精品1区2区3区| 色八戒一区二区三区| 国产午夜精品理论片a级大结局 | 国产a久久麻豆| 日韩精品在线一区| 午夜精品久久久久久久久久| 91片黄在线观看| 欧美国产日韩一二三区| 韩国三级电影一区二区| 69p69国产精品| 亚洲大型综合色站| 在线观看不卡视频| 亚洲视频免费在线| 不卡免费追剧大全电视剧网站| 久久久综合九色合综国产精品| 免费高清视频精品| 91精品国产综合久久久蜜臀粉嫩| 亚洲福利电影网| 欧美日本在线看| 偷拍日韩校园综合在线| 国产嫩草影院久久久久| 国产一区二区免费在线| 2021中文字幕一区亚洲| 国产一本一道久久香蕉| 精品国内二区三区| 国产一区二区在线视频| 亚洲精品在线免费播放| 国产成人午夜视频| 日本一区二区不卡视频| 成人99免费视频| 亚洲视频电影在线| 色综合久久99| 亚洲与欧洲av电影| 欧美日韩午夜在线视频| 日韩av网站免费在线| 91精品国产综合久久久久久漫画| 免费av网站大全久久| www国产亚洲精品久久麻豆| 国产乱码精品一区二区三区av| 国产日韩欧美精品在线| 成人av网址在线| 亚洲欧美二区三区| 在线播放国产精品二区一二区四区| 爽爽淫人综合网网站| 欧美sm美女调教| 国产精品白丝jk黑袜喷水| 中文字幕电影一区| 欧洲av在线精品| 久久99热这里只有精品| 国产欧美中文在线| 91日韩精品一区| 麻豆精品新av中文字幕| 国产视频视频一区| 一本久久精品一区二区| 天涯成人国产亚洲精品一区av| 日韩欧美国产综合|