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

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

?? quc.c

?? nucleas source code
?? C
?? 第 1 頁(yè) / 共 5 頁(yè)
字號(hào):
        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    */

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美va亚洲va在线观看蝴蝶网| 激情六月婷婷综合| 91精品国产全国免费观看| 国产二区国产一区在线观看| 亚洲图片自拍偷拍| 国产精品情趣视频| 亚洲一区二区视频| 久久伊人中文字幕| 欧美乱熟臀69xxxxxx| 99亚偷拍自图区亚洲| 美女一区二区三区| 亚洲高清在线精品| 一区在线中文字幕| 国产欧美一区二区精品性色| 日韩午夜在线影院| 欧美视频在线播放| 在线观看三级视频欧美| 99热99精品| 国产大片一区二区| 国产乱理伦片在线观看夜一区| 日韩中文字幕区一区有砖一区| 亚洲欧美一区二区三区国产精品 | 一本久久精品一区二区| 国产伦精品一区二区三区视频青涩 | 自拍偷自拍亚洲精品播放| 久久久久久影视| 日韩欧美国产一区二区三区| 精品视频免费在线| 欧美视频一区二区三区四区| 91毛片在线观看| jiyouzz国产精品久久| 国产福利精品一区| 成人一级片网址| 成人性生交大合| 成人aaaa免费全部观看| 成人爱爱电影网址| www.亚洲精品| 99麻豆久久久国产精品免费| 成人美女在线观看| av在线免费不卡| av一区二区久久| 99精品视频一区二区三区| av一区二区三区在线| 91视频在线看| 欧美在线|欧美| 666欧美在线视频| 欧美一级艳片视频免费观看| 日韩视频免费观看高清在线视频| 91精品国产综合久久久久| 日韩欧美亚洲国产另类| 欧美一级高清片在线观看| 日韩免费观看高清完整版| 日韩精品在线一区二区| 亚洲精品一区二区三区四区高清 | 欧美网站一区二区| 在线观看成人小视频| 欧美午夜电影网| 91麻豆精品国产91久久久资源速度 | 久久精品男人的天堂| 国产女同性恋一区二区| 亚洲乱码中文字幕| 亚洲电影中文字幕在线观看| 奇米亚洲午夜久久精品| 国产精品一二三在| 色综合久久88色综合天天| 欧美日韩国产影片| 精品国产精品网麻豆系列| 国产精品卡一卡二| 午夜欧美2019年伦理 | 日本精品一区二区三区高清| 欧美男同性恋视频网站| 精品国产欧美一区二区| 中文字幕在线观看不卡视频| 亚洲一区二区欧美激情| 国产一区二区三区四| 色久优优欧美色久优优| 日韩丝袜美女视频| **网站欧美大片在线观看| 亚洲成人在线观看视频| 国产乱码字幕精品高清av| 色老综合老女人久久久| 久久综合资源网| 亚洲精品乱码久久久久久黑人| 麻豆精品精品国产自在97香蕉| aaa亚洲精品| 欧美一级淫片007| 亚洲婷婷综合色高清在线| 美洲天堂一区二卡三卡四卡视频| 成人精品gif动图一区| 欧美精品xxxxbbbb| 国产精品欧美一级免费| 日韩中文字幕一区二区三区| av午夜精品一区二区三区| 欧美一区二区三区在线看| 国产精品的网站| 久久精品久久99精品久久| 色综合久久久久| 国产欧美一区二区精品性色超碰 | 精品三级在线观看| 一区二区不卡在线播放 | 精品人在线二区三区| 亚洲永久精品大片| 成人网页在线观看| 日韩女优视频免费观看| 香港成人在线视频| 91在线观看成人| 久久久综合激的五月天| 美国十次综合导航| 欧美视频一区二区三区四区 | 在线电影欧美成精品| 成人黄动漫网站免费app| 欧美一区二区美女| 亚洲综合偷拍欧美一区色| 成人午夜视频在线观看| 精品国产伦一区二区三区免费| 亚洲电影在线免费观看| 在线看日本不卡| 亚洲欧美色图小说| 99精品欧美一区二区三区小说| 国产午夜精品一区二区三区视频 | 亚洲一区二区三区四区在线观看 | 亚洲激情av在线| yourporn久久国产精品| 国产日本欧洲亚洲| 国产伦理精品不卡| 精品福利在线导航| 精品一区二区三区在线播放视频| 欧美另类videos死尸| 亚洲成人在线免费| 欧美日韩在线播放三区| 亚洲一卡二卡三卡四卡| 色噜噜狠狠色综合中国| 亚洲一二三区视频在线观看| 91天堂素人约啪| 亚洲女人小视频在线观看| 97久久精品人人澡人人爽| 亚洲女同女同女同女同女同69| 97久久超碰国产精品电影| 中文字幕亚洲在| 色综合天天综合给合国产| 国产精品传媒入口麻豆| 97精品国产露脸对白| 一区二区三区在线视频播放| 欧洲中文字幕精品| 日韩va欧美va亚洲va久久| 欧美一区二区日韩| 激情六月婷婷久久| 国产婷婷一区二区| 波多野结衣在线一区| 亚洲乱码国产乱码精品精的特点 | 午夜精品久久久久久久99樱桃| 在线观看视频一区二区欧美日韩| 亚洲永久免费视频| 欧美一级二级三级蜜桃| 精品亚洲欧美一区| 国产精品久久久久久久久免费桃花| 国产一区二区在线看| 欧美探花视频资源| 亚洲大片一区二区三区| 精品国产免费久久| 亚洲高清免费观看| 精品一区免费av| 91麻豆精品国产91久久久资源速度 | 麻豆精品在线看| 欧美sm极限捆绑bd| 国产美女精品在线| 亚洲免费在线播放| 在线综合视频播放| 成人免费毛片app| 亚洲成va人在线观看| 欧美xxxx在线观看| 97久久人人超碰| 免播放器亚洲一区| 国产精品色呦呦| 欧美一区二区三区小说| 成人午夜视频福利| 亚洲成人一区二区| 精品国产电影一区二区 | 日韩一区二区在线观看视频| 成人性生交大片免费看视频在线 | 国产一区二区看久久| 伊人色综合久久天天| 日韩一区二区免费高清| 成人精品在线视频观看| 亚洲一区二区三区四区五区黄| 精品日韩在线一区| 色菇凉天天综合网| 精品亚洲成av人在线观看| 一区二区三区四区五区视频在线观看| 日韩一区二区电影网| 波多野结衣一区二区三区| 日av在线不卡| 一区二区三区欧美日| 久久久久久久久免费| 欧美欧美欧美欧美首页| 成人免费精品视频| 久久精品av麻豆的观看方式| 亚洲激情在线激情| 国产网站一区二区| 日韩一二三区不卡|