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

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

?? pis.c

?? nucleas source code
?? C
?? 第 1 頁 / 共 4 頁
字號:
                    if ((--i) == 0)
                        break;
                    source++;
                } while (1);
            }
            else
            {

                /* Variable-length message pipe.  */

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

                /* Determine if part of the message needs to be placed at the
                   bottom of the pipe area.  */
                if (copy_size < (size + i))

                    /* Compute the starting location for the message.  */
                    destination =  pipe -> pi_end - ((size + i) - copy_size);
                else

                    /* Compute the starting location for the message.  */
                    destination =  destination - (size + i);

                /* Adjust the actual pipe read pointer also.  */
                pipe -> pi_read =  destination;

                /* 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 + pad))
                {

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

                    /* Determine if there is anything left to copy.  */
                    if (size > copy_size)
                    {
                        /* Yes, there is something to copy.  */
                        i =  (INT) (size - copy_size);
                        do
                        {
                            *(destination++) =  *(source);
                            if ((--i) == 0)
                                break;
                            source++;
                        } while (1);
                    }
                }
                /* Decrement the number of available bytes.  */
                pipe -> pi_available =  pipe -> pi_available - pad;
            }

            /* 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_FRONT_OF_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                                                              */
/*                                                                       */
/*      PIS_Broadcast_To_Pipe                                            */
/*                                                                       */
/* DESCRIPTION                                                           */
/*                                                                       */
/*      This function sends a message to all tasks waiting for a message */
/*      from the specified pipe.  If there are no tasks waiting for a    */
/*      message the service performs like a standard send request.       */
/*                                                                       */
/* CALLED BY                                                             */
/*                                                                       */
/*      Application                                                      */
/*      PISE_Broadcast_To_Pipe              Error checking shell         */
/*                                                                       */
/* CALLS                                                                 */
/*                                                                       */
/*      CSC_Place_On_List                   Place on suspend list        */
/*      CSC_Priority_Place_On_List          Place on priority 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 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_Broadcast_To_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         */
UNSIGNED        pad =  0;                   /* Number of pad bytes       */
R4 INT          i;                          /* Working counter           */
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_BROADCAST_TO_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)
        {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲久本草在线中文字幕| 波多野结衣欧美| 精品少妇一区二区三区在线播放| 午夜婷婷国产麻豆精品| 中文字幕亚洲区| 91影视在线播放| 亚洲综合在线第一页| 欧美日韩精品福利| 麻豆91在线观看| 国产无人区一区二区三区| 成人黄页毛片网站| 亚洲精品成人少妇| 欧美一区三区二区| 国产成人在线观看| 一区二区三区四区视频精品免费 | 91精品国产综合久久久久久| 蜜臀av一区二区三区| 国产欧美日韩一区二区三区在线观看| 99久久精品免费精品国产| 午夜精品久久久久久久| 精品粉嫩超白一线天av| 99re6这里只有精品视频在线观看| 亚洲一区二区免费视频| 欧美成人精精品一区二区频| 波多野结衣在线一区| 无吗不卡中文字幕| 日本一区二区三区在线不卡| 在线视频国内自拍亚洲视频| 久久精品国内一区二区三区| 国产精品成人免费在线| 欧美一区二区免费| 99re热这里只有精品视频| 麻豆国产一区二区| 亚洲免费在线视频一区 二区| 日韩午夜激情电影| 91在线免费看| 国产一区二区中文字幕| 一个色综合网站| 国产欧美精品一区| 欧美高清www午色夜在线视频| 精品视频在线免费观看| 国产成人综合在线播放| 亚洲另类中文字| ww久久中文字幕| 欧美日韩电影一区| 91色乱码一区二区三区| 国产精品影视在线| 日韩成人精品在线观看| 亚洲精品国产无天堂网2021 | 国产一区二区在线免费观看| 一级日本不卡的影视| 中文字幕免费不卡| 精品日韩一区二区三区| 欧美精品123区| 在线看日本不卡| kk眼镜猥琐国模调教系列一区二区| 精品中文字幕一区二区小辣椒| 亚洲国产精品天堂| 亚洲一级在线观看| 亚洲欧美另类在线| 欧美国产精品v| 久久精品人人爽人人爽| 欧美成人三级电影在线| 欧美一区二区在线看| 欧美日韩精品一区二区三区四区| 91小视频在线| 不卡的电视剧免费网站有什么| 国产精品99久久久久久久女警 | 欧美日韩一区视频| 91高清在线观看| 一本色道久久综合亚洲aⅴ蜜桃| 盗摄精品av一区二区三区| 国产不卡视频在线播放| 国产一区二区三区观看| 国产中文字幕精品| 国产不卡一区视频| 成人国产精品免费观看视频| 成人a免费在线看| 99久久精品免费| 色综合激情久久| 精品黑人一区二区三区久久| 欧美tickling网站挠脚心| 精品处破学生在线二十三| 久久久久99精品国产片| 久久久久九九视频| 中文字幕精品三区| 亚洲欧美日韩国产手机在线| 亚洲一区视频在线| 图片区日韩欧美亚洲| 日本中文一区二区三区| 九九国产精品视频| 国产99久久久国产精品| 色婷婷精品大在线视频| 欧美日韩一区二区在线观看视频| 日韩一区和二区| 久久亚洲影视婷婷| 国产精品久久久久久久第一福利 | 日韩欧美国产三级| 国产三区在线成人av| **性色生活片久久毛片| 亚洲高清免费观看 | 丁香激情综合五月| 色婷婷一区二区三区四区| 欧美精选在线播放| 欧美大胆人体bbbb| 中文字幕一区在线| 五月激情六月综合| 高清成人免费视频| 欧美色爱综合网| 欧美电影免费观看完整版| 国产精品不卡一区| 日韩福利电影在线观看| 国产成人精品免费| 欧美丝袜第三区| 热久久免费视频| 国产盗摄精品一区二区三区在线| 不卡一区二区三区四区| 欧美精品久久99久久在免费线| 欧美videos中文字幕| 亚洲三级小视频| 麻豆91在线播放| 91日韩一区二区三区| 欧美精品一区男女天堂| 一区二区三区加勒比av| 国产精品一区二区久久不卡| 色噜噜狠狠色综合欧洲selulu| 欧美成va人片在线观看| 亚洲码国产岛国毛片在线| 日本成人在线看| 91网上在线视频| 久久久www免费人成精品| 午夜欧美在线一二页| eeuss国产一区二区三区| 精品少妇一区二区三区在线播放| 亚洲精品国产视频| 岛国一区二区三区| wwwwww.欧美系列| 午夜精品福利一区二区三区蜜桃| 成人动漫中文字幕| 欧美精品一区二| 亚洲国产精品影院| 91片在线免费观看| 欧美国产精品劲爆| 国产精品一线二线三线| 日韩欧美色综合网站| 日韩高清在线一区| 欧美性受极品xxxx喷水| 亚洲欧美激情插| eeuss鲁一区二区三区| 久久久久久久久久电影| 国内精品视频666| 宅男噜噜噜66一区二区66| 亚洲成人激情社区| 在线视频一区二区免费| 国产精品麻豆久久久| 奇米一区二区三区av| 欧美群妇大交群中文字幕| 亚洲人成网站色在线观看| eeuss影院一区二区三区| 欧美国产视频在线| 国产91丝袜在线观看| 日韩国产欧美三级| 欧美日本在线播放| 日韩av在线发布| 制服丝袜亚洲精品中文字幕| 天天综合日日夜夜精品| 7777精品伊人久久久大香线蕉经典版下载 | 欧美日韩高清一区二区| 亚洲国产日韩综合久久精品| 在线观看视频一区| 亚洲高清免费视频| 91精品国产综合久久香蕉麻豆| 香蕉久久一区二区不卡无毒影院| 欧美午夜电影一区| 天天操天天色综合| 日韩免费在线观看| 国产一区二区不卡| 国产精品进线69影院| 色综合一区二区| 亚洲一区在线观看视频| 欧美系列在线观看| 日本最新不卡在线| 26uuu亚洲综合色欧美| 成人午夜在线视频| 亚洲精品国产第一综合99久久| 欧美美女直播网站| 精品一区二区日韩| 国产精品美日韩| 欧美三级午夜理伦三级中视频| 日日骚欧美日韩| 2023国产一二三区日本精品2022| 成人av一区二区三区| 亚洲最快最全在线视频| 日韩亚洲欧美高清| 国产成人精品亚洲日本在线桃色 | 成人午夜在线视频| 亚洲图片自拍偷拍| 欧美精品一区二区三区高清aⅴ| 成人黄色小视频| 日韩精品乱码免费|