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

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

?? pic.c

?? nucleas source code
?? C
?? 第 1 頁 / 共 5 頁
字號:
            /* 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++;

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

    /* Release protection against access to the pipe.  */
    TCT_Unprotect();

    /* Return to user mode */
    NU_USER_MODE();

    /* Return the completion status.  */
    return(status);
}


/*************************************************************************/
/*                                                                       */
/* FUNCTION                                                              */
/*                                                                       */
/*      PIC_Receive_From_Pipe                                            */
/*                                                                       */
/* DESCRIPTION                                                           */
/*                                                                       */
/*      This function receives a message from the specified pipe.  The   */
/*      size of the message is specified by the caller.  If there is a   */
/*      message currently in the pipe, the message is removed from the   */
/*      pipe and placed in the caller's area.  Suspension is possible    */
/*      if the request cannot be satisfied.                              */
/*                                                                       */
/* CALLED BY                                                             */
/*                                                                       */
/*      Application                                                      */
/*      PICE_Receive_From_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         */
/*      TCC_Task_Priority                   Pickup task's priority       */
/*      [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 the message          */
/*      actual_size                         Size of message received     */
/*      suspend                             Suspension option if empty   */
/*                                                                       */
/* OUTPUTS                                                               */
/*                                                                       */
/*      NU_SUCCESS                          If service is successful     */
/*      NU_PIPE_EMPTY                       If pipe is currently empty   */
/*      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  PIC_Receive_From_Pipe(NU_PIPE *pipe_ptr, VOID *message,
                UNSIGNED size, UNSIGNED *actual_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    */
TC_TCB         *task;                       /* Task pointer              */
UNSIGNED        copy_size;                  /* Number of bytes to copy   */
UNSIGNED        pad =  0;                   /* Number of pad bytes       */
R4 INT          i;                          /* Working counter           */
STATUS          preempt;                    /* Preemption 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_RECEIVE_FROM_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 urgent message request is currently suspended.  */
    if (pipe -> pi_urgent_list)
    {

        /* If so, copy the message from the suspended request block and
           resume the associated task.  */

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

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

        /* Setup the source and destination pointers.  */
        destination =   (BYTE_PTR) message;
        source =        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.  */
        *actual_size =  suspend_ptr -> pi_message_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();
    }

    /* Determine if there are messages in the pipe.  */
    else if (pipe -> pi_messages)
    {

        /* Copy message from pipe into the caller's area.  */

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

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

            /* Pipe supports fixed-size messages.  */

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

            /* Pipe supports variable-size messages.  */

            /* Variable length message size is actually in the pipe area. */
            size =  *((UNSIGNED *) source);
            source =  source + sizeof(UNSIGNED);

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

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

            /* Increment the number of available bytes in the pipe.  */
            pipe -> pi_available =  pipe -> pi_available + sizeof(UNSIGNED);

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

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

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

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品久久久三级丝袜| 蜜桃视频一区二区三区| 亚洲观看高清完整版在线观看| 亚洲综合色噜噜狠狠| 激情欧美日韩一区二区| 91色porny在线视频| 亚洲精品一区二区三区精华液| 中文字幕一区二区三区四区不卡| 全国精品久久少妇| 91官网在线观看| 国产精品色呦呦| 久久国产尿小便嘘嘘尿| 欧美日韩大陆在线| 亚洲摸摸操操av| 丁香五精品蜜臀久久久久99网站 | 中文字幕一区日韩精品欧美| 蜜桃在线一区二区三区| 欧美日韩综合不卡| 亚洲精品日韩一| 99久久99久久精品免费看蜜桃| 精品国产91乱码一区二区三区| 亚洲一区二区三区四区在线观看 | 激情综合五月婷婷| 欧美电影在哪看比较好| 亚洲一区二区中文在线| 96av麻豆蜜桃一区二区| 国产精品久久毛片av大全日韩| 精品在线一区二区三区| 日韩午夜激情av| 日韩精品福利网| 欧美日韩亚洲高清一区二区| 夜夜嗨av一区二区三区中文字幕| 成人免费视频网站在线观看| 国产欧美日韩三区| 国产69精品久久777的优势| 久久蜜桃av一区精品变态类天堂| 麻豆精品国产传媒mv男同| 91精品视频网| 日本在线不卡视频| 日韩一区二区三区电影在线观看| 亚洲v日本v欧美v久久精品| 高清国产一区二区三区| 久久精品视频免费观看| 国产成人自拍网| 国产精品麻豆久久久| av一区二区三区在线| 最新成人av在线| 91国偷自产一区二区三区观看| 艳妇臀荡乳欲伦亚洲一区| 99视频精品在线| 久久久国产午夜精品| 国产a精品视频| 亚洲欧美在线视频观看| 在线观看国产精品网站| 亚洲国产一二三| 日韩欧美第一区| 国产剧情一区二区三区| 亚洲人吸女人奶水| 欧美视频在线观看一区二区| 日本女优在线视频一区二区| 日韩美女一区二区三区| 福利一区二区在线| 亚洲综合偷拍欧美一区色| 69堂成人精品免费视频| 激情亚洲综合在线| 亚洲女人的天堂| 日韩一区二区三区视频在线观看| 国产成人精品免费在线| 亚洲精品成a人| 欧美不卡在线视频| 91丨九色丨尤物| 免费看欧美美女黄的网站| 久久久久久97三级| 欧美人妖巨大在线| 东方aⅴ免费观看久久av| 水野朝阳av一区二区三区| 国产视频一区二区三区在线观看| 91视频xxxx| 久草中文综合在线| 国产精品情趣视频| 欧美一区国产二区| 91年精品国产| 国产一区二区三区综合| 午夜精品aaa| 椎名由奈av一区二区三区| 欧美日本在线播放| aaa亚洲精品| 精品亚洲免费视频| 舔着乳尖日韩一区| 中文字幕亚洲综合久久菠萝蜜| 欧美日韩精品综合在线| 成人av在线播放网站| 蜜桃视频一区二区三区 | 精品国产污网站| 在线国产电影不卡| 国产福利一区二区三区视频在线| 亚洲午夜三级在线| 亚洲蜜臀av乱码久久精品| 久久久久久99精品| 欧美电影免费观看高清完整版在线 | 捆绑紧缚一区二区三区视频 | 91视频观看视频| jlzzjlzz欧美大全| 国产乱色国产精品免费视频| 日本欧美在线观看| 亚洲第一二三四区| 亚洲午夜电影网| 一区二区免费看| 亚洲欧美激情插| 亚洲欧洲av另类| 中文字幕一区二区三区在线播放 | 亚洲电影在线播放| 亚洲黄色小视频| 日韩一区在线看| 最新热久久免费视频| 综合婷婷亚洲小说| 亚洲精品精品亚洲| 亚洲一区二区偷拍精品| 亚洲一区二区三区四区在线免费观看| 亚洲视频1区2区| 亚洲欧美日韩国产中文在线| 亚洲三级在线看| 亚洲一区在线观看网站| 一区二区三区在线观看视频| 综合久久久久久| 亚洲国产你懂的| 日本中文字幕一区| 狠狠色丁香久久婷婷综| 国产美女在线精品| av男人天堂一区| 欧美亚洲动漫精品| 欧美精品在线观看播放| 精品女同一区二区| 中文字幕国产一区| 亚洲理论在线观看| 亚洲成人动漫精品| 另类中文字幕网| 成人国产精品免费网站| 色婷婷亚洲精品| 欧美乱妇15p| 久久嫩草精品久久久精品一| 中文字幕制服丝袜一区二区三区 | 国产精品久久久久久亚洲伦| 亚洲视频一二三| 午夜在线成人av| 韩国视频一区二区| 91伊人久久大香线蕉| 欧美乱妇23p| 中文字幕欧美日韩一区| 亚洲夂夂婷婷色拍ww47| 老汉av免费一区二区三区 | 中文字幕一区二区日韩精品绯色 | 国产精品高潮呻吟久久| 亚洲精品视频自拍| 久久99精品久久久| 色综合久久88色综合天天| 精品少妇一区二区三区在线播放| 国产精品色哟哟网站| 琪琪久久久久日韩精品| 9久草视频在线视频精品| 91精品欧美久久久久久动漫 | 麻豆中文一区二区| 99久久精品免费看| 欧美大尺度电影在线| 亚洲精选一二三| 美国十次了思思久久精品导航| 93久久精品日日躁夜夜躁欧美| 欧美成人高清电影在线| 怡红院av一区二区三区| 国产在线日韩欧美| 3751色影院一区二区三区| 欧美极品aⅴ影院| 美女视频黄免费的久久| 91丨porny丨在线| 国产夜色精品一区二区av| 日韩国产欧美在线播放| 日本国产一区二区| 中文字幕av一区 二区| 久热成人在线视频| 678五月天丁香亚洲综合网| 成人免费在线播放视频| 国产一区二区精品久久91| 777色狠狠一区二区三区| 亚洲人成在线观看一区二区| 国产精品一区二区x88av| 91精品中文字幕一区二区三区| 亚洲美女偷拍久久| 成人福利电影精品一区二区在线观看 | 色综合天天视频在线观看| 国产日产精品一区| 久久国产精品露脸对白| 欧美日韩综合一区| 亚洲bt欧美bt精品777| 91黄色激情网站| 亚洲一区二区三区免费视频| 在线观看av不卡| 亚洲一区欧美一区| 欧美三级电影精品| 日韩精品一区第一页| 91麻豆精品国产91久久久久久久久 |