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

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

?? pis.c

?? 基于OMAP1510的Nucleus移植代碼
?? C
?? 第 1 頁 / 共 4 頁
字號:
            /* Suspension is requested.   */

            /* Increment the number of tasks waiting.  */
            pipe -> pi_tasks_waiting++;

#ifdef INCLUDE_PROVIEW
            _RTProf_DumpPipe(RT_PROF_BROADCAST_TO_PIPE,pipe,RT_PROF_WAIT);
#endif /* INCLUDE_PROVIEW */

            /* Setup the suspend block and suspend the calling task.  */
            suspend_ptr =  &suspend_block;
            suspend_ptr -> pi_pipe =                     pipe;
            suspend_ptr -> pi_suspend_link.cs_next =     NU_NULL;
            suspend_ptr -> pi_suspend_link.cs_previous = NU_NULL;
            suspend_ptr -> pi_message_area =             (BYTE_PTR) message;
            suspend_ptr -> pi_message_size =             size;
            task =                            (TC_TCB *) TCT_Current_Thread();
            suspend_ptr -> pi_suspended_task =           task;

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

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

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

                CSC_Priority_Place_On_List((CS_NODE **)
                                &(pipe -> pi_suspension_list),
                                        &(suspend_ptr -> pi_suspend_link));
            }

            /* Finally, suspend the calling task. Note that the suspension call
               automatically clears the protection on the pipe.  */
            TCC_Suspend_Task((NU_TASK *) task, NU_PIPE_SUSPEND,
                                        PIC_Cleanup, suspend_ptr, suspend);

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

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


#ifdef INCLUDE_PROVIEW
            _RTProf_DumpPipe(RT_PROF_BROADCAST_TO_PIPE,pipe,RT_PROF_FAIL);
#endif /* INCLUDE_PROVIEW */

        }
    }
    else
    {

#ifdef INCLUDE_PROVIEW
        _RTProf_DumpPipe(RT_PROF_BROADCAST_TO_PIPE,pipe,RT_PROF_OK);
#endif /* INCLUDE_PROVIEW */

        /* Determine if a task is waiting on an empty pipe.  */
        if ((pipe -> pi_suspension_list) && (pipe -> pi_messages == 0))
        {

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

                /* Decrement the number of tasks waiting on pipe.  */
                pipe -> pi_tasks_waiting--;

                /* Remove the first suspended block from the list.  */
                suspend_ptr =  pipe -> pi_suspension_list;
                CSC_Remove_From_List((CS_NODE **)
                                &(pipe -> pi_suspension_list),
                                          &(suspend_ptr -> pi_suspend_link));

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

                /* Initialize the return status.  */
                suspend_ptr -> pi_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 -> pi_actual_size =  size;

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

                /* Move the suspend pointer to the next node, which is now
                   at the head of the list.  */
                suspend_ptr =  pipe -> pi_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 pipe and no task is waiting.  */

            /* Setup the source pointer.  */
            source =       (BYTE_PTR) message;
            destination =  pipe -> pi_write;

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

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

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

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

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

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

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

                /* Decrement the number of bytes remaining for this
                   extra word of overhead.  */
                pipe -> pi_available =  pipe -> pi_available -
                                                        sizeof(UNSIGNED);

                /* Calculate the number of bytes remaining from the write
                   pointer to the bottom of the pipe.  */
                copy_size =  pipe -> pi_end - destination;

                /* Determine if the message needs to be wrapped around the
                   edge of the pipe 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 =  pipe -> pi_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 >= pipe -> pi_end)

                /* Move the write pointer to the top of the pipe area.  */
                destination =  pipe -> pi_start;

            /* Determine if the pipe supports variable-length messages.  If
               so, pad bytes are needed to keep UNSIGNED alignment.  */
            if (pad)
            {

                /* Variable-size message.  Add pad bytes to the write
                   pointer.  */

                /* Calculate the number of bytes remaining from the write
                   pointer to the bottom of the pipe.  */
                copy_size =  pipe -> pi_end - destination;

                /* If there is not enough room at the bottom of the pipe, the
                   pad bytes must be wrapped around to the top.  */
                if (copy_size <= pad)

                    /* Move write pointer to the top of the pipe and make the
                       necessary adjustment.  */
                    destination =  pipe -> pi_start + (pad - copy_size);
                else

                    /* There is enough room in the pipe to simply add the
                       the pad bytes to the write pointer.  */
                    destination =  destination + pad;

                /* Decrement the number of available bytes.  */
                pipe -> pi_available =  pipe -> pi_available - pad;
            }

            /* Update the actual write pointer.  */
            pipe -> pi_write =  destination;

            /* Decrement the number of available bytes.  */
            pipe -> pi_available =  pipe -> pi_available - size;

            /* Increment the number of messages in the pipe.  */
            pipe -> pi_messages++;
        }
    }

    /* Release protection against access to the pipe.  */
    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一区二区三区免费野_久草精品视频
色综合久久天天| 99在线精品免费| 亚洲男同性恋视频| 国产亲近乱来精品视频| 久久夜色精品一区| 国产午夜精品美女毛片视频| 精品99久久久久久| 欧美xxxxx牲另类人与| 欧美精品一二三| 亚洲成人tv网| 美国毛片一区二区| 黄色成人免费在线| 国产成人在线影院| 色婷婷综合久色| 欧美精品久久99| 欧美不卡视频一区| 欧美成人r级一区二区三区| ww久久中文字幕| 欧美激情在线观看视频免费| 国产精品久久久久久久久久久免费看| 国产精品乱子久久久久| 亚洲欧美日韩国产一区二区三区 | 精品国精品自拍自在线| 精品国产91乱码一区二区三区| 久久精品夜夜夜夜久久| 亚洲免费视频成人| 美女视频黄久久| 成人污污视频在线观看| 91在线无精精品入口| 在线精品亚洲一区二区不卡| 制服丝袜成人动漫| 国产精品蜜臀av| 爽爽淫人综合网网站| 久久国产精品一区二区| 99久久精品一区二区| 777奇米四色成人影色区| 久久九九99视频| 亚洲成人午夜电影| 精品一区二区三区欧美| 97久久超碰国产精品电影| 欧美一区日本一区韩国一区| 久久久精品人体av艺术| 五月婷婷色综合| 成人激情小说网站| 欧美午夜在线观看| 国产欧美日韩精品a在线观看| 91免费国产在线观看| 精品理论电影在线| 一区二区三区视频在线观看| 国产露脸91国语对白| 亚洲伦理在线免费看| 狠狠色伊人亚洲综合成人| 欧美写真视频网站| 日本一区二区三区视频视频| 爽爽淫人综合网网站| 日本乱码高清不卡字幕| 久久综合久久鬼色| 麻豆精品蜜桃视频网站| 91.com视频| 天天爽夜夜爽夜夜爽精品视频| 国产欧美一区二区三区在线老狼| 婷婷一区二区三区| 91视频免费播放| 亚洲视频在线一区观看| 国产毛片精品国产一区二区三区| 欧美性生活影院| 亚洲一区二区影院| 欧美日韩综合在线免费观看| 亚洲另类在线视频| 在线影院国内精品| 亚洲精选视频免费看| 99re视频精品| 99精品一区二区| 亚洲同性gay激情无套| 91在线观看高清| 亚洲激情中文1区| 欧美性生活一区| 亚洲123区在线观看| 欧美精品在线一区二区三区| 亚洲成人自拍网| 欧美一级黄色大片| 国产一区三区三区| 欧美激情一区二区三区| 北条麻妃一区二区三区| 日韩码欧中文字| 欧美亚洲自拍偷拍| 免费xxxx性欧美18vr| 精品99一区二区| 丰满岳乱妇一区二区三区| 中文字幕日韩一区二区| 色一区在线观看| 丝袜亚洲另类欧美综合| 久久久久久久久久久久久女国产乱| 国产精品一区二区三区四区| 国产精品久久久久久久久免费相片 | 91蜜桃在线观看| 亚洲人成电影网站色mp4| 欧美日韩国产成人在线91| 免费一区二区视频| 中文字幕精品综合| 欧美性大战久久久久久久| 美女诱惑一区二区| 国产精品蜜臀在线观看| 欧美日韩国产首页| 国产成人啪免费观看软件| 一区二区三区欧美亚洲| 精品欧美乱码久久久久久| 99久久国产综合精品女不卡| 亚洲午夜精品一区二区三区他趣| 精品黑人一区二区三区久久| 91在线视频免费观看| 99综合影院在线| 亚洲特级片在线| 奇米四色…亚洲| 亚洲国产精品二十页| 欧美伊人精品成人久久综合97| 久久精品国产亚洲一区二区三区| 综合自拍亚洲综合图不卡区| 欧美性大战久久久| 成人免费毛片aaaaa**| 亚洲mv在线观看| 国产99一区视频免费| 丝袜美腿亚洲色图| 中文字幕日韩欧美一区二区三区| 日韩精品在线看片z| 色综合天天天天做夜夜夜夜做| 日韩一级片网址| 在线精品视频小说1| 成人av先锋影音| 国产在线精品免费av| 调教+趴+乳夹+国产+精品| 亚洲人成影院在线观看| 久久久久久久久久久久久女国产乱| 欧美日韩免费不卡视频一区二区三区| 成人免费毛片片v| 国产成人久久精品77777最新版本| 五月婷婷综合在线| 亚洲国产精品麻豆| 亚洲精品一二三四区| 中文字幕中文字幕在线一区 | 视频一区欧美日韩| 亚洲一区二区三区免费视频| 国产精品国产精品国产专区不蜜| 欧美精品一区二区三区在线 | 国产一区高清在线| 日本不卡一区二区三区高清视频| 亚洲午夜电影在线| 亚洲最新在线观看| 亚洲一区二区视频在线观看| 亚洲欧美一区二区不卡| 亚洲欧美日韩人成在线播放| 自拍偷拍亚洲欧美日韩| 成人欧美一区二区三区黑人麻豆 | 亚洲成va人在线观看| 一区二区三区精品| 樱花草国产18久久久久| 亚洲一二三四区不卡| 亚洲在线免费播放| 日韩一区精品字幕| 久久精品国产精品青草| 国内一区二区视频| 风间由美一区二区三区在线观看| 成人黄色免费短视频| 91天堂素人约啪| 欧美日韩一区二区三区四区| 91精选在线观看| 亚洲精品一区二区三区影院| 久久婷婷成人综合色| 国产精品免费丝袜| 亚洲综合免费观看高清完整版在线 | 99re这里都是精品| 欧美色综合久久| 精品国产乱码久久久久久图片| 久久久久久久久久久黄色| 亚洲婷婷国产精品电影人久久| 一区二区三区四区视频精品免费| 视频精品一区二区| 国产尤物一区二区| 日本高清无吗v一区| 日韩欧美中文字幕制服| 国产精品欧美一级免费| 亚洲一区二区三区不卡国产欧美| 美女视频黄频大全不卡视频在线播放| 懂色av一区二区三区免费观看| 色婷婷综合激情| 精品国产成人系列| 亚洲欧美成人一区二区三区| 视频一区二区三区中文字幕| 成人免费视频视频在线观看免费| 在线观看国产精品网站| 久久亚洲综合色| 亚洲国产你懂的| 成人动漫一区二区在线| 欧美一区二区三区男人的天堂| 中文字幕乱码日本亚洲一区二区| 偷拍一区二区三区四区| 白白色 亚洲乱淫| 精品国产一区久久| 五月综合激情网| 色老汉一区二区三区|