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

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

?? pis.c

?? 基于OMAP1510的Nucleus移植代碼
?? C
?? 第 1 頁 / 共 4 頁
字號:
/*      PISE_Send_To_Front_Of_Pipe          Error checking shell         */
/*                                                                       */
/* CALLS                                                                 */
/*                                                                       */
/*      CSC_Place_On_List                   Place on suspend list        */
/*      CSC_Remove_From_List                Remove from suspend list     */
/*      [HIC_Make_History_Entry]            Make entry in history log    */
/*      TCC_Resume_Task                     Resume a suspended task      */
/*      TCC_Suspend_Task                    Suspend calling task         */
/*      [TCT_Check_Stack]                   Stack checking function      */
/*      TCT_Control_To_System               Transfer control to system   */
/*      TCT_Current_Thread                  Pickup current thread pointer*/
/*      TCT_System_Protect                  Protect pipe                 */
/*      TCT_Unprotect                       Release protection           */
/*                                                                       */
/* INPUTS                                                                */
/*                                                                       */
/*      pipe_ptr                            Pipe control block pointer   */
/*      message                             Pointer to message to send   */
/*      size                                Size of message to send      */
/*      suspend                             Suspension option if full    */
/*                                                                       */
/* OUTPUTS                                                               */
/*                                                                       */
/*      NU_SUCCESS                          If service is successful     */
/*      NU_PIPE_FULL                        If pipe is currently full    */
/*      NU_TIMEOUT                          If timeout on service expires*/
/*      NU_PIPE_DELETED                     If pipe was deleted during   */
/*                                            suspension                 */
/*      NU_PIPE_RESET                       If pipe was reset during     */
/*                                            suspension                 */
/*                                                                       */
/* HISTORY                                                               */
/*                                                                       */
/*        DATE                    REMARKS                                */
/*                                                                       */
/*      03-01-1993      Created initial version 1.0                      */
/*      04-19-1993      Verified version 1.0                             */
/*      03-01-1994      Changed function interfaces to                   */
/*                      match those in prototype,                        */
/*                      added register options, changed                  */
/*                      protection logic to reduce                       */
/*                      overhead, optimized copy loop,                   */
/*                      resulting in version 1.1                         */
/*                                                                       */
/*      03-18-1994      Verified version 1.1                             */
/*                                                                       */
/*************************************************************************/
STATUS  PIS_Send_To_Front_Of_Pipe(NU_PIPE *pipe_ptr, VOID *message,
                                        UNSIGNED size, UNSIGNED suspend)
{

R1 PI_PCB      *pipe;                       /* Pipe control block ptr    */
PI_SUSPEND      suspend_block;              /* Allocate suspension block */
PI_SUSPEND     *suspend_ptr;                /* Pointer to suspend block  */
R2 BYTE_PTR     source;                     /* Pointer to source         */
R3 BYTE_PTR     destination;                /* Pointer to destination    */
UNSIGNED        copy_size;                  /* Partial copy size         */
R4 INT          i;                          /* Working counter           */
UNSIGNED        pad = 0;                    /* Number of pad bytes       */
TC_TCB         *task;                       /* Task pointer              */
STATUS          preempt;                    /* Preempt flag              */
STATUS          status;                     /* Completion status         */
NU_SUPERV_USER_VARIABLES

    /* Switch to supervisor mode */
    NU_SUPERVISOR_MODE();

    /* Move input pipe pointer into internal pointer.  */
    pipe =  (PI_PCB *) pipe_ptr;


#ifdef  NU_ENABLE_STACK_CHECK

    /* Call stack checking function to check for an overflow condition.  */
    TCT_Check_Stack();

#endif

#ifdef  NU_ENABLE_HISTORY

    /* Make an entry that corresponds to this function in the system history
       log.  */
    HIC_Make_History_Entry(NU_SEND_TO_FRONT_OF_PIPE_ID, (UNSIGNED) pipe,
                                        (UNSIGNED) message, (UNSIGNED) size);

#endif

    /* Initialize the status as successful.  */
    status =  NU_SUCCESS;

    /* Protect against simultaneous access to the pipe.  */
    TCT_System_Protect();

    /* Determine if an extra word of overhead needs to be added to the
       calculation.  */
    if (pipe -> pi_fixed_size)

        /* No overhead.  */
        i =  0;
    else
    {

        /* Variable messages have one additional word of overhead.  */
        i =  sizeof(UNSIGNED);

        /* Calculate the number of pad bytes necessary to keep the pipe
           write pointer on an UNSIGNED data element alignment.  */
        pad =  (((size + sizeof(UNSIGNED) - 1)/sizeof(UNSIGNED)) *
                        sizeof(UNSIGNED)) - size;

        /* Insure that padding is included in the overhead.  */
        i =  i + ((INT) pad);

        /* Make special check to see if a suspension needs to be
           forced for a variable length message.  */
        if ((pipe -> pi_suspension_list) && (pipe -> pi_messages))
        {

            /* Pickup task control block pointer.  */
            task =  (TC_TCB *) TCT_Current_Thread();

            /* Now we know that there are other task(s) are suspended trying
               to send a variable length message.  Determine whether or not
               a suspension should be forced.  */
            if ((pipe -> pi_fifo_suspend) ||
                (suspend == NU_NO_SUSPEND) ||
                ((pipe -> pi_suspension_list) -> pi_suspend_link.cs_priority <=
                                                    TCC_Task_Priority(task)))

                /* Bump the computed size to avoid placing the new variable
                   length message ahead of the suspended tasks.  */
                i =  (INT) pipe -> pi_available;
        }
    }

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

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

            /* Suspension is requested.   */

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

#ifdef INCLUDE_PROVIEW
            _RTProf_DumpPipe(RT_PROF_SEND_TO_FRONT_OF_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;

            /* Place the task on the urgent message suspension list.  */
            CSC_Place_On_List((CS_NODE **) &(pipe -> pi_urgent_list),
                                        &(suspend_ptr -> pi_suspend_link));

            /* Move the head pointer of the list to make this suspension the
               first in the list.  */
            pipe -> pi_urgent_list =  (PI_SUSPEND *)
                (pipe -> pi_urgent_list) -> pi_suspend_link.cs_previous;

            /* 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_SEND_TO_FRONT_OF_PIPE,pipe,RT_PROF_FAIL);
#endif /* INCLUDE_PROVIEW */

        }
    }
    else
    {

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

            /* Task is waiting on pipe for a message.  */

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

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

            /* 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 =
                TCC_Resume_Task((NU_TASK *) suspend_ptr -> pi_suspended_task,
                                                     NU_PIPE_SUSPEND);

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

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

                /* Fixed-size message pipe.  */

                /* Determine if the read pointer is at the top of the pipe
                   area.  */
                if (destination == pipe -> pi_start)

                    /* Prepare to place the message in the lower part of the
                       pipe area.  */
                    destination =  pipe -> pi_end - size;
                else

                    /* Backup the length of the message from the current
                       read pointer.  */
                    destination =  destination - size;

                /* Adjust the actual read pointer before the copy is done.  */
                pipe -> pi_read =  destination;

                /* Copy the message into the pipe area.  */
                i =  (INT) size;
                do
                {
                    *(destination++) =  *(source);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产麻豆视频一区| 亚洲在线视频网站| 2024国产精品| 日韩精品一区二区在线| 欧美日韩一区久久| 欧美性大战久久久久久久蜜臀| 972aa.com艺术欧美| 99视频超级精品| 91在线国内视频| 在线精品视频一区二区| 91激情五月电影| 欧美日韩国产小视频在线观看| 欧美性xxxxx极品少妇| 欧美三级中文字幕在线观看| 欧美精品免费视频| 欧美成人乱码一区二区三区| 国产精品一区二区久久精品爱涩| 国产精品911| 99久久精品免费| 欧美午夜影院一区| 日韩一区二区三区视频| 久久伊人蜜桃av一区二区| 国产欧美日韩在线视频| 亚洲丝袜制服诱惑| 亚洲成人自拍一区| 韩国v欧美v亚洲v日本v| 成人网在线免费视频| 一本久道中文字幕精品亚洲嫩| 国产成人精品aa毛片| 国产一区二三区| 99久久er热在这里只有精品66| 色综合一区二区| 在线综合视频播放| 26uuu亚洲婷婷狠狠天堂| 国产精品免费视频网站| 一区二区三区美女视频| 看片网站欧美日韩| 丝袜美腿亚洲综合| 欧美日本韩国一区| 国产日韩欧美精品电影三级在线| 国产精品丝袜一区| 亚洲一区二区高清| 青青草97国产精品免费观看无弹窗版| 久久精品国产一区二区| 国产91精品精华液一区二区三区 | va亚洲va日韩不卡在线观看| 制服丝袜中文字幕亚洲| 亚洲精品国产第一综合99久久| 国产成人免费视频网站高清观看视频| 3d动漫精品啪啪一区二区竹菊 | 欧美三级日韩三级国产三级| 国产精品日韩成人| 国产成人综合精品三级| 欧美成人国产一区二区| 视频一区中文字幕| 欧美日韩中文字幕精品| 亚洲日本在线a| 波多野结衣在线一区| 26uuu亚洲综合色| 免费精品视频在线| 制服丝袜成人动漫| 无码av中文一区二区三区桃花岛| 在线观看日韩精品| 一区二区三区精品在线观看| 色综合天天综合狠狠| 亚洲丝袜精品丝袜在线| 99久久久无码国产精品| 国产精品白丝在线| 91热门视频在线观看| 亚洲少妇最新在线视频| 99久久国产综合色|国产精品| 国产精品色噜噜| caoporn国产一区二区| 国产精品剧情在线亚洲| 99久精品国产| 欧美一级理论性理论a| 蜜桃视频免费观看一区| 日韩三级视频在线看| 久久99精品久久久久久久久久久久 | 欧美日本精品一区二区三区| 亚洲国产视频直播| 欧美精品色综合| 精品一区二区在线免费观看| 久久老女人爱爱| 国产成人夜色高潮福利影视| 欧美日韩mp4| 美女被吸乳得到大胸91| 久久夜色精品国产噜噜av| 国内精品自线一区二区三区视频| 久久精品在这里| 成人av网站在线| 亚洲精品视频免费看| 欧美日韩视频一区二区| 免费成人av在线播放| 精品999在线播放| 成人午夜大片免费观看| 国产精品欧美一区二区三区| 91美女片黄在线| 亚洲不卡av一区二区三区| 欧美一级免费大片| 国产成人免费视频精品含羞草妖精| 国产精品人成在线观看免费| 91福利视频在线| 蜜臀av一区二区在线免费观看| 精品sm在线观看| 99久久精品费精品国产一区二区| 亚洲成av人**亚洲成av**| 久久综合中文字幕| 91亚洲精品久久久蜜桃| 婷婷综合五月天| 久久久www免费人成精品| 色综合视频在线观看| 免费久久99精品国产| 国产精品理论片| 8v天堂国产在线一区二区| 国产精华液一区二区三区| 亚洲激情六月丁香| 精品少妇一区二区三区在线视频| av日韩在线网站| 亚洲国产乱码最新视频| 久久久亚洲精品石原莉奈| 日本韩国精品一区二区在线观看| 日韩av一区二| 综合亚洲深深色噜噜狠狠网站| 69成人精品免费视频| 成人av第一页| 裸体健美xxxx欧美裸体表演| 国产精品久久国产精麻豆99网站| 91麻豆精品国产自产在线| 不卡的电视剧免费网站有什么| 欧美bbbbb| 亚洲精品久久久久久国产精华液| 日韩精品一区二区三区视频播放 | 精品国产91洋老外米糕| 日韩一区二区免费电影| 91.xcao| 亚洲综合一区在线| 久久色在线观看| 欧美日韩成人高清| a级精品国产片在线观看| 久99久精品视频免费观看| 亚洲午夜私人影院| 国产精品美女久久久久久久网站| 日韩欧美国产三级| 欧美三级视频在线播放| 不卡视频在线看| 国产一区久久久| 国产精品久久久久精k8| 精品少妇一区二区三区视频免付费 | 久久综合九色综合97婷婷女人| 欧美在线观看18| 国产高清亚洲一区| 另类人妖一区二区av| 一区二区欧美精品| 综合激情成人伊人| 国产欧美精品一区aⅴ影院| 日韩欧美一级片| 9191成人精品久久| 国产精品一区二区无线| 日本成人在线视频网站| 亚洲国产精品精华液网站| 亚洲欧美日韩系列| 中文字幕色av一区二区三区| 国产亚洲一区字幕| 久久综合九色综合97_久久久| 宅男在线国产精品| 欧美精品在线一区二区三区| 在线亚洲免费视频| 色域天天综合网| 一本一本久久a久久精品综合麻豆| 成人晚上爱看视频| 国产福利精品一区二区| 国产精品影视天天线| 国产毛片精品国产一区二区三区| 激情久久五月天| 成人网在线播放| 99国内精品久久| 国产精品一卡二| 洋洋成人永久网站入口| 国产精品不卡一区二区三区| 久久久美女毛片| 日本在线不卡视频| 午夜精品久久久久久不卡8050 | av电影天堂一区二区在线观看| 国产91综合一区在线观看| 国产激情91久久精品导航| 国产成人午夜精品影院观看视频| 国产麻豆视频精品| 成人网在线播放| 91在线无精精品入口| 91久久免费观看| 欧美日韩亚洲综合| 欧美一二三四在线| 精品欧美一区二区久久| 久久久久久麻豆| 国产精品久久午夜夜伦鲁鲁| 亚洲少妇30p| 亚洲国产精品久久人人爱| 首页综合国产亚洲丝袜| 极品尤物av久久免费看|