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

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

?? pis.c

?? nucleas source code
?? 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一区二区三区免费野_久草精品视频
日韩欧美一级二级三级久久久| 国产亚洲女人久久久久毛片| 日韩欧美一二三| 国产三级一区二区| 午夜久久久久久久久久一区二区| 国产高清久久久| 51精品秘密在线观看| 亚洲欧美日韩久久| 国产一区二区导航在线播放| 欧美日韩夫妻久久| 亚洲天堂中文字幕| 岛国精品一区二区| 亚洲精品在线观| 青青草视频一区| 欧美三级日韩在线| 一区二区日韩电影| 色综合久久88色综合天天免费| www成人在线观看| 日本成人中文字幕| 欧美高清激情brazzers| 五月婷婷激情综合| 在线看日本不卡| 一区二区高清在线| 色婷婷激情久久| 亚洲一线二线三线视频| 在线看国产日韩| 亚洲成人一二三| 欧美色视频在线| 丝袜亚洲另类欧美综合| 欧美日韩日本视频| 日日夜夜一区二区| 欧美一区二区三区四区在线观看| 日韩成人精品在线| 日韩一区二区视频在线观看| 视频一区二区中文字幕| 日韩一级免费一区| 国产九色精品成人porny| 久久蜜桃av一区精品变态类天堂| 韩日欧美一区二区三区| 欧美极品aⅴ影院| 99久久精品一区二区| 一区二区三区小说| 欧美日韩亚洲国产综合| 免费成人深夜小野草| 久久精品一二三| 91丨porny丨户外露出| 亚洲一区二区精品久久av| 欧美蜜桃一区二区三区| 精品写真视频在线观看| 久久久精品人体av艺术| 99视频一区二区| 婷婷久久综合九色国产成人 | 椎名由奈av一区二区三区| 色综合天天天天做夜夜夜夜做| 亚洲一区二区偷拍精品| 91精品国产麻豆国产自产在线| 国产一区二区三区四| 亚洲人成精品久久久久| 欧美人牲a欧美精品| 国产一区二区三区蝌蚪| 亚洲精品第一国产综合野| 91精品国产综合久久精品app| 九九**精品视频免费播放| 中文一区二区完整视频在线观看| 91精品91久久久中77777| 久久国产麻豆精品| 日韩美女久久久| 欧美mv和日韩mv国产网站| 99久久伊人精品| 久久国产精品99精品国产| 亚洲男人都懂的| 久久综合久久99| 欧美美女直播网站| 成人高清免费观看| 美美哒免费高清在线观看视频一区二区 | 午夜欧美一区二区三区在线播放| 欧美成人a∨高清免费观看| 色综合中文字幕国产| 日韩电影一二三区| 综合自拍亚洲综合图不卡区| 日韩精品一区二区在线观看| 在线亚洲+欧美+日本专区| 国产精品18久久久久久久久 | 中文av字幕一区| 欧美福利一区二区| 91浏览器入口在线观看| 精品系列免费在线观看| 国内成人精品2018免费看| 亚洲黄网站在线观看| 国产嫩草影院久久久久| 日韩欧美在线123| 欧美唯美清纯偷拍| thepron国产精品| 成人午夜大片免费观看| 日本不卡不码高清免费观看| 亚洲国产精品久久久久婷婷884| 中文字幕精品三区| 久久久久国产精品麻豆ai换脸| 日韩欧美在线影院| 欧美日韩国产综合视频在线观看| 91在线看国产| 色噜噜狠狠色综合中国| 成人国产精品免费观看视频| 国产91精品欧美| 国产传媒欧美日韩成人| 国产麻豆视频一区| 国产乱色国产精品免费视频| 精品制服美女丁香| 久久99精品国产.久久久久| 日日欢夜夜爽一区| 三级精品在线观看| 免费日本视频一区| 老司机精品视频在线| 久久精品国产99国产精品| 久久99国产精品久久99| 精品在线免费观看| 国产精品18久久久久久久久久久久 | 色综合久久久久久久久久久| 99在线视频精品| 色悠悠久久综合| 欧美在线免费观看视频| 欧美区一区二区三区| 欧美一区二区在线免费观看| 精品免费日韩av| 国产网红主播福利一区二区| 国产精品久久久久久久午夜片| 国产精品激情偷乱一区二区∴| 综合久久综合久久| 亚洲观看高清完整版在线观看| 爽好久久久欧美精品| 韩国欧美国产一区| 成人性生交大合| 欧美日韩精品三区| 精品欧美一区二区在线观看| 国产精品每日更新| 午夜精品一区在线观看| 久久99精品久久久久久国产越南 | 久久综合色婷婷| 中文无字幕一区二区三区| 亚洲自拍另类综合| 蜜臀av一级做a爰片久久| 国产成人在线网站| 91成人在线免费观看| 日韩一级片网址| 亚洲国产激情av| 亚洲国产精品天堂| 国产一区二区在线影院| 一本色道久久综合亚洲91 | 国产精品麻豆视频| 香蕉加勒比综合久久| 成人午夜在线视频| 777亚洲妇女| 亚洲视频一二区| 国模套图日韩精品一区二区 | 成熟亚洲日本毛茸茸凸凹| 91丨九色porny丨蝌蚪| 欧美电视剧免费观看| ...xxx性欧美| 九一九一国产精品| 9i在线看片成人免费| 日韩精品一区二区在线| 亚洲青青青在线视频| 国产乱对白刺激视频不卡| 91福利资源站| 国产精品国产三级国产有无不卡 | 亚洲综合久久久久| 国产精品自产自拍| 欧美一区二区三区影视| 亚洲欧美另类图片小说| 国产精品一区免费视频| 欧美精品一二三| 亚洲视频一区二区在线观看| 日本精品免费观看高清观看| 日韩精品一区二区三区swag| 亚洲成a人在线观看| jlzzjlzz亚洲日本少妇| 久久久久久久久久久黄色| 日韩av二区在线播放| 在线亚洲人成电影网站色www| 欧美激情综合五月色丁香| 激情偷乱视频一区二区三区| 91精品国产91久久综合桃花| 亚洲小少妇裸体bbw| 99久久精品国产网站| 日本一区二区三区国色天香 | 国产欧美一区二区三区沐欲| 日本不卡123| 在线成人高清不卡| 丝袜诱惑制服诱惑色一区在线观看| 色国产综合视频| 一区二区久久久| 欧美在线观看18| 亚洲影院在线观看| 欧美日韩视频第一区| 亚洲午夜视频在线观看| 欧美日韩一二区| 秋霞电影一区二区| 精品乱码亚洲一区二区不卡| 国产综合一区二区| 国产亚洲制服色|