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

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

?? qus.c

?? 基于OMAP1510的Nucleus移植代碼
?? C
?? 第 1 頁 / 共 4 頁
字號:
        }
    }

    /* Determine if there is enough room in the queue for the message.  */
    if (queue -> qu_available < (size + i))
    {

        /* Queue does not have room for the message.  Determine if
           suspension is required.  */
        if (suspend)
        {

            /* Suspension is requested.   */

            /* Increment the number of tasks waiting.  */
            queue -> qu_tasks_waiting++;

#ifdef INCLUDE_PROVIEW
            _RTProf_DumpQueue(RT_PROF_BROADCAST_TO_QUEUE,queue,RT_PROF_WAIT);
#endif

            /* Setup the suspend block and suspend the calling task.  */
            suspend_ptr = &suspend_block;
            suspend_ptr -> qu_queue =                    queue;
            suspend_ptr -> qu_suspend_link.cs_next =     NU_NULL;
            suspend_ptr -> qu_suspend_link.cs_previous = NU_NULL;
            suspend_ptr -> qu_message_area =           (UNSIGNED_PTR) message;
            suspend_ptr -> qu_message_size =             size;
            task =                            (TC_TCB *) TCT_Current_Thread();
            suspend_ptr -> qu_suspended_task =           task;

            /* Determine if priority or FIFO suspension is associated with the
               queue.  */
            if (queue -> qu_fifo_suspend)
            {

                /* FIFO suspension is required.  Link the suspend block into
                   the list of suspended tasks on this queue.  */
                CSC_Place_On_List((CS_NODE **) &(queue -> qu_suspension_list),
                                        &(suspend_ptr -> qu_suspend_link));
            }
            else
            {

                /* Get the priority of the current thread so the suspend block
                   can be placed in the appropriate place.  */
                suspend_ptr -> qu_suspend_link.cs_priority =
                                                      TCC_Task_Priority(task);

                CSC_Priority_Place_On_List((CS_NODE **)
                                &(queue -> qu_suspension_list),
                                        &(suspend_ptr -> qu_suspend_link));
            }

            /* Finally, suspend the calling task. Note that the suspension call
               automatically clears the protection on the queue.  */
            TCC_Suspend_Task((NU_TASK *) task, NU_QUEUE_SUSPEND,
                                        QUC_Cleanup, suspend_ptr, suspend);

            /* Pickup the return status.  */
            status =  suspend_ptr -> qu_return_status;
        }
        else
        {

            /* Return a status of NU_QUEUE_FULL because there is no
               room in the queue for the message.  */
            status =  NU_QUEUE_FULL;

#ifdef INCLUDE_PROVIEW
            _RTProf_DumpQueue(RT_PROF_BROADCAST_TO_QUEUE,queue,RT_PROF_FAIL);
#endif

        }
    }
    else
    {

        /* Determine if a task is waiting on an empty queue.  */
        if ((queue -> qu_suspension_list) && (queue -> qu_messages == 0))
        {

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

            /* Yes, one or more tasks are waiting for a message from this
               queue.  */
            preempt =  0;
            do
            {

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

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

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

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

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

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

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

                /* Move the suspend pointer to the next node, which is now
                   at the head of the list.  */
                suspend_ptr =  queue -> qu_suspension_list;
            } while (suspend_ptr);

            /* 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();
        }
        else
        {

            /* There is enough room in the queue and no task is waiting.  */

            /* Setup the source pointer.  */
            source =       (UNSIGNED_PTR) message;
            destination =  queue -> qu_write;

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

                /* Fixed-size messages are supported by this queue.  */

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

                /* Variable-size messages are supported.  Processing must
                   check for queue wrap-around conditions.  */

                /* Place message size in first location.  */
                *(destination++) =  size;

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

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

                /* Decrement the number of words remaining by 1 for this
                   extra word of overhead.  */
                queue -> qu_available--;

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

                /* 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;
                        source++;
                    } while(1);
                }
                else
                {

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

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

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

                /* Move the write pointer to the top of the queue area.  */
                queue -> qu_write =  queue -> qu_start;
            else

                /* Simply copy the last position of the destination pointer
                   into the write pointer.  */
                queue -> qu_write =  destination;

            /* 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_BROADCAST_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);
}




?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩制服丝袜先锋影音| 日韩av电影天堂| 欧美一区二区三区播放老司机| 国产精品一区二区免费不卡 | 国产精品一二三区在线| 一区二区免费在线| 久久久久久久av麻豆果冻| 欧美日韩国产高清一区二区 | 26uuu国产日韩综合| 91理论电影在线观看| 国模大尺度一区二区三区| 偷拍一区二区三区四区| 亚洲欧美在线视频观看| 久久影音资源网| 欧美一区二区成人| 欧美区在线观看| 在线视频欧美精品| 欧美一级夜夜爽| 色中色一区二区| 成人免费视频一区二区| 精品综合久久久久久8888| 午夜视频久久久久久| 亚洲人成小说网站色在线| 国产欧美精品一区| 欧美不卡一区二区三区| 欧美一级生活片| 欧美人妇做爰xxxⅹ性高电影 | 91精品免费观看| 久久精品日韩一区二区三区| 日韩免费电影一区| 欧美精品欧美精品系列| 欧洲中文字幕精品| 欧美中文字幕一区| 在线精品观看国产| 在线日韩av片| 欧美午夜电影网| 欧美在线小视频| 在线观看国产日韩| 在线视频中文字幕一区二区| 欧美最新大片在线看| 色综合一个色综合亚洲| 三级不卡在线观看| 亚洲综合成人在线| 亚洲在线视频免费观看| 亚洲一区二区在线免费看| 亚洲图片有声小说| 日一区二区三区| 免费黄网站欧美| 国产综合久久久久久久久久久久| 九九在线精品视频| 国产一区二区三区四区五区入口| 国产毛片精品一区| 成人一区二区三区中文字幕| 91免费观看视频在线| 在线日韩一区二区| 欧美一区二区三区在线观看视频| 欧美哺乳videos| 久久精品欧美日韩| 亚洲免费观看高清完整| 亚洲国产精品久久人人爱| 日本午夜精品一区二区三区电影| 美女国产一区二区| 国产成人免费av在线| 99久久综合国产精品| 欧美艳星brazzers| 精品福利一区二区三区免费视频| 日本欧美大码aⅴ在线播放| 美女脱光内衣内裤视频久久影院| 国产一区二区伦理| 91蝌蚪porny成人天涯| 欧美精品乱码久久久久久| 久久日一线二线三线suv| 中文字幕中文字幕一区| 亚洲电影激情视频网站| 捆绑紧缚一区二区三区视频| 国产盗摄精品一区二区三区在线| 97aⅴ精品视频一二三区| 欧美区一区二区三区| 欧美—级在线免费片| 一区二区在线免费| 久久69国产一区二区蜜臀| 91免费版pro下载短视频| 欧美精品123区| 国产三级精品三级| 亚洲成人精品影院| 国产福利不卡视频| 欧美日韩国产一级片| 国产三级精品三级在线专区| 亚洲第四色夜色| av一区二区三区在线| 日韩一区二区电影网| 中文字幕一区二区在线观看| 美国十次综合导航| 色综合天天综合色综合av| 精品欧美黑人一区二区三区| 一区二区三区中文字幕| 国产精品自产自拍| 欧美日韩精品福利| 中文字幕永久在线不卡| 麻豆精品久久精品色综合| 色婷婷精品久久二区二区蜜臀av| 精品久久免费看| 亚洲成人一区二区| 99精品欧美一区二区三区小说| 日韩欧美久久久| 亚洲一区二区欧美| 99久久精品国产网站| 久久综合九色欧美综合狠狠| 日本中文一区二区三区| 欧美专区日韩专区| 18欧美乱大交hd1984| 国产福利不卡视频| 久久众筹精品私拍模特| 美女一区二区三区| 亚洲黄色片在线观看| 国产福利电影一区二区三区| 日韩欧美一级精品久久| 午夜精品123| 91麻豆精东视频| 国产精品嫩草影院com| 国产一区二区在线免费观看| 欧美一区二区美女| 日本色综合中文字幕| 欧美日韩亚洲综合在线 | 久久精品欧美日韩精品| 精品综合免费视频观看| 日韩一区二区中文字幕| 青草av.久久免费一区| 欧美精品第1页| 日韩专区一卡二卡| 91 com成人网| 视频一区中文字幕| 欧美日韩精品一区二区三区| 亚洲国产欧美在线| 欧美情侣在线播放| 奇米亚洲午夜久久精品| 日韩一二三四区| 麻豆91精品视频| 精品国精品自拍自在线| 国内精品不卡在线| 国产欧美一区二区精品性色超碰| 国产精品正在播放| 亚洲国产精品ⅴa在线观看| 国产一区二区三区香蕉 | 亚洲欧美日韩中文播放| 91网站最新网址| 亚洲一区二区三区视频在线播放 | 欧美不卡一二三| 国产老女人精品毛片久久| 蜜臀av一区二区| 精品国产一区久久| 国产成人综合亚洲网站| 国产精品亲子伦对白| 色乱码一区二区三区88| 午夜影院在线观看欧美| 91精品国产综合久久久蜜臀粉嫩| 青娱乐精品视频| 久久久久国产免费免费| av一区二区三区| 亚洲国产成人porn| 欧美一区永久视频免费观看| 精品一区二区三区香蕉蜜桃| 国产女人18毛片水真多成人如厕| 97久久人人超碰| 午夜精品久久久久久久99水蜜桃| 欧美tk—视频vk| 不卡高清视频专区| 亚洲成人一区在线| 久久久久久久综合色一本| 99麻豆久久久国产精品免费 | 精品成人私密视频| 99久久婷婷国产综合精品| 亚洲国产日韩一级| 国产午夜精品福利| 欧美性videosxxxxx| 精品一区二区精品| 亚洲色图第一区| 精品少妇一区二区三区在线播放 | 久久久91精品国产一区二区精品 | 欧美亚洲丝袜传媒另类| 欧美日韩国产123区| 国内外成人在线视频| 亚洲免费观看在线视频| 欧美r级电影在线观看| 91在线播放网址| 美女性感视频久久| 一区二区三区久久| 精品福利一区二区三区免费视频| 91丨porny丨户外露出| 免费观看成人鲁鲁鲁鲁鲁视频| 国产嫩草影院久久久久| 欧美久久高跟鞋激| jiyouzz国产精品久久| 麻豆免费精品视频| 亚洲精品自拍动漫在线| 精品国产91久久久久久久妲己| 欧美在线一区二区| 成人av网址在线观看| 激情深爱一区二区| 午夜精品爽啪视频|