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

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

?? quc.c

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

            /* Move the read pointer to where the copy left off.  */
            queue -> qu_read =  source;

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

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

        /* Return the number of words received.  */
        *actual_size =  size;

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

        /* Determine if any tasks suspended on a full queue can be woken
           up.  */
        if (queue -> qu_suspension_list)
        {

            /* Overhead of each queue message.  */
            if (!queue -> qu_fixed_size)

                i =  1;
            else

                i =  0;

            /* Pickup the suspension list and examine suspension blocks
               to see if the message could now fit in the queue.  */
            suspend_ptr =  queue -> qu_suspension_list;
            preempt =      NU_FALSE;
            while ((suspend_ptr) &&
              ((suspend_ptr -> qu_message_size + i) <= queue -> qu_available))
            {

                /* Place the suspended task's message into the queue.  */

                /* Setup the source and destination pointers.  */
                source =        suspend_ptr -> qu_message_area;
                destination =   queue -> qu_write;
                size =          suspend_ptr -> qu_message_size;

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

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

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

                /* Return a successful status.  */
                suspend_ptr -> qu_return_status =  NU_SUCCESS;

                /* Resume the suspended task.  */
                preempt =  preempt |
                  TCC_Resume_Task((NU_TASK *) suspend_ptr -> qu_suspended_task,
                                                       NU_QUEUE_SUSPEND);

                /* Setup suspend pointer to the head of the list.  */
                suspend_ptr =  queue -> qu_suspension_list;

                /* Overhead of each queue message.  */
                if (!queue -> qu_fixed_size)

                    i =  1;
                else

                    i =  0;
            }

            /* Determine if a preempt condition is present.  */
            if (preempt)

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

        /* Queue is empty.  Determine if the task wants to suspend.  */
        if (suspend)
        {

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

#ifdef INCLUDE_PROVIEW
            _RTProf_DumpQueue(RT_PROF_RECEIVE_FROM_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 status of the request.  */
            status =  suspend_ptr -> qu_return_status;
            *actual_size =  suspend_ptr -> qu_actual_size;
        }
        else
        {

            /* Return a status of NU_QUEUE_EMPTY because there are no
               messages in the queue.  */
            status =  NU_QUEUE_EMPTY;

#ifdef INCLUDE_PROVIEW
            _RTProf_DumpQueue(RT_PROF_RECEIVE_FROM_QUEUE,queue,RT_PROF_FAIL);
#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_Cleanup                                                      */
/*                                                                       */
/* DESCRIPTION                                                           */
/*                                                                       */
/*      This function is responsible for removing a suspension block     */
/*      from a queue.  It is not called unless a timeout or a task       */
/*      terminate is in progress.  Note that protection is already in    */
/*      effect - the same protection at suspension time.  This routine   */
/*      must be called from Supervisor mode in Supervisor/User mode      */
/*      switching kernels.                                               */
/*                                                                       */
/* CALLED BY                                                             */
/*                                                                       */
/*      TCC_Timeout                         Task timeout                 */
/*      TCC_Terminate                       Task terminate               */
/*                                                                       */
/* CALLS                                                                 */
/*                                                                       */
/*      CSC_Remove_From_List                Remove suspend block from    */

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩一区二区三区av| 日韩高清不卡一区二区三区| 国产精品理论在线观看| 成人aaaa免费全部观看| 日韩电影在线一区二区三区| 99精品一区二区三区| 日韩av一区二| 亚洲国产你懂的| 男男gaygay亚洲| 一本一本大道香蕉久在线精品 | 99久久亚洲一区二区三区青草| 欧美色精品天天在线观看视频| 日韩一区和二区| 亚洲人成网站影音先锋播放| 日韩高清一区在线| 欧美三级资源在线| 17c精品麻豆一区二区免费| 精品一区二区三区蜜桃| 欧美日韩一区二区不卡| 亚洲天堂免费看| www.66久久| 国产精品久久久久久久久久久免费看| 亚洲高清在线精品| 91女人视频在线观看| 欧美激情艳妇裸体舞| 国产精品亚洲第一区在线暖暖韩国| 日韩女优av电影| 久久精品国产第一区二区三区| 7777女厕盗摄久久久| 三级不卡在线观看| 欧美一区二区高清| 久久er精品视频| 欧美成人三级在线| 国产精品91一区二区| 久久精品日产第一区二区三区高清版| 麻豆91在线播放| 欧美日韩国产系列| 日韩和欧美的一区| 欧美大度的电影原声| 激情综合色播激情啊| 国产人成一区二区三区影院| 国产精品18久久久久久久久久久久| 国产亚洲一区二区在线观看| 国产精华液一区二区三区| 久久精品一区二区| 成人教育av在线| 欧美经典一区二区三区| 99精品欧美一区二区蜜桃免费| 亚洲永久精品国产| 日韩欧美在线影院| 不卡视频一二三四| 一区二区三区四区亚洲| 日韩精品专区在线影院观看| 国产91丝袜在线播放九色| 亚洲免费电影在线| 欧美亚洲综合久久| 精品系列免费在线观看| 亚洲欧洲日韩一区二区三区| 欧美日韩一级二级| av福利精品导航| 蜜桃视频在线一区| 亚洲免费av网站| 日韩欧美高清一区| 99久久99精品久久久久久| 日本不卡视频一二三区| 亚洲欧洲精品一区二区精品久久久 | 欧美日韩aaaaa| 五月婷婷另类国产| 中文字幕乱码一区二区免费| 欧美电影在哪看比较好| 色www精品视频在线观看| 国产在线视视频有精品| 亚洲一区免费观看| 亚洲欧洲日韩在线| 国产人久久人人人人爽| 精品精品国产高清一毛片一天堂| 欧美日韩mp4| 欧美色精品在线视频| 91精品福利视频| 色综合咪咪久久| 久久精品久久99精品久久| 欧美国产日韩精品免费观看| 91麻豆精品秘密| 美女爽到高潮91| 亚洲一区二区精品久久av| 亚洲人妖av一区二区| 国产精品久久久久久久久久久免费看 | 成人av动漫在线| 国产盗摄视频一区二区三区| 久久aⅴ国产欧美74aaa| 青青草原综合久久大伊人精品 | 日韩高清一区在线| 青青草视频一区| 免费观看一级特黄欧美大片| 偷窥少妇高潮呻吟av久久免费| 亚洲成a人片综合在线| 一区二区三区成人| 亚洲不卡av一区二区三区| 亚洲精品国产成人久久av盗摄| 夜夜揉揉日日人人青青一国产精品| 亚洲一二三区在线观看| 亚洲444eee在线观看| 免费在线看成人av| 大陆成人av片| 欧美性色综合网| 欧美三级日韩在线| 精品日韩一区二区三区| 久久精品男人天堂av| 亚洲欧美日韩精品久久久久| 亚洲国产欧美另类丝袜| 精品一区二区在线播放| 99精品国产视频| 91猫先生在线| 日韩欧美电影在线| 亚洲美女屁股眼交3| 美腿丝袜亚洲三区| 99re亚洲国产精品| 欧美一区二区三区四区高清| 91精品国产色综合久久不卡蜜臀| 久久久精品国产免大香伊| 亚洲成av人片在www色猫咪| 成人开心网精品视频| 日韩一区二区在线观看视频| 91精品黄色片免费大全| 国产精品福利一区| 久久国产综合精品| 欧美三片在线视频观看| 国产精品久久久久国产精品日日| 国产精品一二三| 国产精品久久久久久久午夜片 | 欧美不卡123| 成人97人人超碰人人99| 性做久久久久久| 日本一区二区三区久久久久久久久不| 色哟哟国产精品| 久久国产福利国产秒拍| 日韩午夜在线播放| 成人黄色软件下载| 日本女优在线视频一区二区| 亚洲精品日韩综合观看成人91| 欧美人与z0zoxxxx视频| 高清不卡在线观看av| 日韩精品亚洲专区| 国产精品高潮呻吟久久| 精品欧美一区二区久久| 成人丝袜视频网| 久久精品久久综合| 午夜视频一区二区三区| 国产精品国产三级国产aⅴ入口| 欧美在线观看一区二区| av在线综合网| 黄页视频在线91| 日精品一区二区三区| 一区二区免费在线播放| 国产精品天干天干在观线| 2020国产精品| 欧美一级搡bbbb搡bbbb| 欧美亚洲一区二区在线观看| 欧美色网一区二区| 欧美乱熟臀69xxxxxx| 日韩一区和二区| 91精品国产一区二区三区蜜臀| 国产精一区二区三区| 成人蜜臀av电影| 在线观看亚洲精品| 欧美群妇大交群的观看方式| 91精品国产欧美日韩| 日韩午夜电影av| 国产三级精品视频| 综合在线观看色| 亚洲大片精品永久免费| 午夜精品久久久久久久| 日韩和欧美一区二区| 国产一区二三区| 99热精品国产| 在线电影院国产精品| 久久久蜜桃精品| 亚洲色图都市小说| 视频精品一区二区| 国产精品18久久久久久vr| 欧美中文字幕不卡| 欧美mv日韩mv国产网站app| 中文字幕精品三区| 日韩国产精品久久久久久亚洲| 国产麻豆欧美日韩一区| 欧美艳星brazzers| 久久久久久久久久久久电影 | 91精品国产欧美一区二区18| 久久久亚洲精品一区二区三区| 亚洲激情五月婷婷| 国产一区二区福利| 欧美日韩午夜影院| 欧美成人a∨高清免费观看| 欧洲一区二区三区免费视频| 久久婷婷综合激情| 亚洲一二三专区| 91在线视频在线| 久久久av毛片精品| 麻豆视频观看网址久久| 国产精品一区专区|