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

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

?? mbc.c

?? nucleas source code
?? C
?? 第 1 頁 / 共 4 頁
字號:
    /* Protect against simultaneous access to the mailbox.  */
    TCT_System_Protect();

    /* Determine if the mailbox is empty or full.  */
    if (mailbox -> mb_message_present)
    {

        /* Mailbox already has a message.  Determine if suspension is
           required.  */
        if (suspend)
        {

            /* Suspension is requested.   */

            /* Increment the number of tasks waiting.  */
            mailbox -> mb_tasks_waiting++;

#ifdef INCLUDE_PROVIEW
    _RTProf_DumpMailBox(RT_PROF_SEND_TO_MAILBOX,mailbox,RT_PROF_WAIT);
#endif /* INCLUDE_PROVIEW */

            /* Setup the suspend block and suspend the calling task.  */
            suspend_ptr =  &suspend_block;
            suspend_ptr -> mb_mailbox =                  mailbox;
            suspend_ptr -> mb_suspend_link.cs_next =     NU_NULL;
            suspend_ptr -> mb_suspend_link.cs_previous = NU_NULL;
            suspend_ptr -> mb_message_area =             (UNSIGNED *) message;
            task =                           (TC_TCB *)  TCT_Current_Thread();
            suspend_ptr -> mb_suspended_task =           task;

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

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

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

                CSC_Priority_Place_On_List((CS_NODE **)
                        &(mailbox -> mb_suspension_list),
                                        &(suspend_ptr -> mb_suspend_link));
            }

            /* Finally, suspend the calling task. Note that the suspension call
               automatically clears the protection on the mailbox.  */
            TCC_Suspend_Task((NU_TASK *) task, NU_MAILBOX_SUSPEND,
                                MBC_Cleanup, suspend_ptr, suspend);

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

            /* Return a status of NU_MAILBOX_FULL because there is no
               room in the mailbox for the message.  */
            status =  NU_MAILBOX_FULL;
#ifdef INCLUDE_PROVIEW
            _RTProf_DumpMailBox(RT_PROF_SEND_TO_MAILBOX,mailbox,RT_PROF_FAIL);
#endif /* INCLUDE_PROVIEW */

        }
    }
    else
    {

        /* Determine if a task is waiting on the mailbox.  */
        if (mailbox -> mb_suspension_list)
        {

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

            /* Decrement the number of tasks waiting on mailbox.  */
            mailbox -> mb_tasks_waiting--;

#ifdef INCLUDE_PROVIEW
            _RTProf_DumpMailBox(RT_PROF_SEND_TO_MAILBOX,mailbox,RT_PROF_OK);
#endif /* INCLUDE_PROVIEW */

            /* Remove the first suspended block from the list.  */
            suspend_ptr =  mailbox -> mb_suspension_list;
            CSC_Remove_From_List((CS_NODE **)
                &(mailbox -> mb_suspension_list),
                                &(suspend_ptr -> mb_suspend_link));

            /* Setup the source and destination pointers.  */
            source_ptr =       (UNSIGNED *) message;
            destination_ptr =  suspend_ptr -> mb_message_area;

            /* Copy the message directly into the waiting task's
               destination.  */
            *destination_ptr       =  *source_ptr;
            *(destination_ptr + 1) =  *(source_ptr + 1);
            *(destination_ptr + 2) =  *(source_ptr + 2);
            *(destination_ptr + 3) =  *(source_ptr + 3);

            /* Setup the appropriate return value.  */
            suspend_ptr -> mb_return_status =  NU_SUCCESS;

            /* Wakeup the waiting task and check for preemption.  */
            preempt =
               TCC_Resume_Task((NU_TASK *) suspend_ptr -> mb_suspended_task,
                                                NU_MAILBOX_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
        {

            /* Mailbox is empty and no task is waiting.  */

            /* Setup the source and destination pointers.  */
            source_ptr =       (UNSIGNED *) message;
            destination_ptr =  &(mailbox -> mb_message_area[0]);

            /* Place the message in the mailbox. */
            *destination_ptr =        *source_ptr;
            *(destination_ptr + 1) =  *(source_ptr + 1);
            *(destination_ptr + 2) =  *(source_ptr + 2);
            *(destination_ptr + 3) =  *(source_ptr + 3);

            /* Indicate that the mailbox has a message.  */
            mailbox -> mb_message_present =  NU_TRUE;

#ifdef INCLUDE_PROVIEW
            _RTProf_DumpMailBox(RT_PROF_SEND_TO_MAILBOX,mailbox,RT_PROF_OK);
#endif /* INCLUDE_PROVIEW */
        }
    }

    /* Release protection.  */
    TCT_Unprotect();

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

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


/*************************************************************************/
/*                                                                       */
/* FUNCTION                                                              */
/*                                                                       */
/*      MBC_Receive_From_Mailbox                                         */
/*                                                                       */
/* DESCRIPTION                                                           */
/*                                                                       */
/*      This function receives a message from the specified mailbox.     */
/*      If there is a message currently in the mailbox, the message is   */
/*      removed from the mailbox and placed in the caller's area.        */
/*      Otherwise, if no message is present in the mailbox, suspension   */
/*      of the calling task is possible.                                 */
/*                                                                       */
/* CALLED BY                                                             */
/*                                                                       */
/*      Application                                                      */
/*      MBCE_Receive_From_Mailbox           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 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 mailbox              */
/*      TCT_Unprotect                       Release protection           */
/*                                                                       */
/* INPUTS                                                                */
/*                                                                       */
/*      mailbox_ptr                         Mailbox control block pointer*/
/*      message                             Pointer to message to send   */
/*      suspend                             Suspension option if empty   */
/*                                                                       */
/* OUTPUTS                                                               */
/*                                                                       */
/*      NU_SUCCESS                          If service is successful     */
/*      NU_MAILBOX_EMPTY                    If mailbox is currently empty*/
/*      NU_TIMEOUT                          If timeout on service expires*/
/*      NU_MAILBOX_DELETED                  If mailbox is deleted during */
/*                                            suspension                 */
/*      NU_MAILBOX_RESET                    If mailbox is deleted 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 interface to                    */
/*                        match the prototype, added                     */
/*                        register variable logic,                       */
/*                        optimized protection logic,                    */
/*                        resulting in version 1.1                       */
/*                                                                       */
/*      03-18-1994      Verified version 1.1                             */
/*                                                                       */
/*************************************************************************/
STATUS  MBC_Receive_From_Mailbox(NU_MAILBOX *mailbox_ptr, VOID *message,
                                                        UNSIGNED suspend)
{

R1 MB_MCB      *mailbox;                    /* Mailbox control block ptr */
MB_SUSPEND      suspend_block;              /* Allocate suspension block */
R2 MB_SUSPEND  *suspend_ptr;                /* Pointer to suspend block  */
R3 UNSIGNED    *source_ptr;                 /* Pointer to source         */
R4 UNSIGNED    *destination_ptr;            /* Pointer to destination    */
TC_TCB         *task;                       /* Task pointer              */
STATUS          preempt;                    /* Preemption flag           */
STATUS          status;                     /* Completion status         */
NU_SUPERV_USER_VARIABLES

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

    /* Move input mailbox pointer into internal pointer.  */
    mailbox =  (MB_MCB *) mailbox_ptr;

#ifdef  NU_ENABLE_STACK_CHECK

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

#endif

#ifdef  NU_ENABLE_HISTORY

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线观看国产一区二区| 欧美日韩国产电影| 丝袜美腿成人在线| 国产亚洲精品7777| 欧美高清hd18日本| 99国产精品久| 国产中文字幕一区| 五月婷婷激情综合网| 国产精品久久久久久久久久免费看 | 青青草91视频| 亚洲免费观看高清完整| 久久九九久精品国产免费直播| 91精品国产综合久久久久久| 色一情一伦一子一伦一区| 国产精品一区二区在线看| 免费成人在线播放| 香蕉加勒比综合久久| 一区二区三区久久| 最新热久久免费视频| 欧美极品xxx| 精品成人佐山爱一区二区| 91精品麻豆日日躁夜夜躁| 欧美视频精品在线观看| 日本精品裸体写真集在线观看| 99精品视频中文字幕| 成人免费av网站| 成人一道本在线| 国产成人鲁色资源国产91色综| 加勒比av一区二区| 久久国产免费看| 捆绑调教美女网站视频一区| 日本美女一区二区三区视频| 亚洲国产毛片aaaaa无费看| 一区二区在线观看不卡| 亚洲精品乱码久久久久久黑人 | 国产一区二区调教| 精品一区二区三区在线播放视频| 蜜臀a∨国产成人精品| 美国三级日本三级久久99| 青青草97国产精品免费观看 | 国产一区二区调教| 韩国女主播成人在线观看| 久久精品国产999大香线蕉| 久色婷婷小香蕉久久| 久久狠狠亚洲综合| 韩国在线一区二区| 国产原创一区二区三区| 国产一区二区不卡在线| 国产大陆精品国产| 99久久99久久精品免费观看| 99久久国产综合精品女不卡| 91黄色免费版| 在线播放91灌醉迷j高跟美女| 欧美一区二区三区在线| 欧美v国产在线一区二区三区| 久久久噜噜噜久噜久久综合| 欧美韩国日本一区| 一区二区三区免费在线观看| 亚洲国产裸拍裸体视频在线观看乱了| 日韩影院在线观看| 精品一区二区综合| 91影视在线播放| 欧美日精品一区视频| 日韩欧美在线1卡| 久久久精品人体av艺术| 亚洲色图20p| 日本伊人午夜精品| 国产真实乱子伦精品视频| 成人免费视频播放| 欧美亚洲一区二区在线观看| 日韩三级中文字幕| 国产精品久久久久久妇女6080| 亚洲女爱视频在线| 日本视频一区二区三区| 国产91丝袜在线观看| 欧美在线|欧美| 久久综合狠狠综合久久综合88 | 精品一区二区日韩| 成人午夜视频网站| 欧美久久免费观看| 国产欧美一区二区三区在线看蜜臀 | 国产一区91精品张津瑜| 97精品久久久午夜一区二区三区| 欧美三级蜜桃2在线观看| 欧美成人a视频| 一区二区三区av电影| 精品一区二区国语对白| 99久久免费视频.com| 欧美高清视频一二三区 | 丝袜美腿亚洲色图| 成人av集中营| 日韩丝袜情趣美女图片| 最新日韩在线视频| 国产一区在线不卡| 欧美精品久久99久久在免费线 | 久久福利视频一区二区| 色女孩综合影院| 中文一区二区在线观看| 蜜臀久久99精品久久久画质超高清 | 中文字幕成人av| 免费在线欧美视频| 欧美羞羞免费网站| 久久精品视频一区| 美女视频一区二区| 欧美视频一区二区三区四区 | 日本精品免费观看高清观看| 久久蜜桃av一区精品变态类天堂 | 一区二区三区四区蜜桃| 国产伦精品一区二区三区在线观看| 欧美日韩免费一区二区三区视频 | 久久97超碰色| 欧美丰满一区二区免费视频| 一区二区三区四区五区视频在线观看| 国产高清久久久久| 精品国产伦一区二区三区观看体验| 亚洲午夜视频在线| 91国产精品成人| 最新日韩av在线| 成人app网站| 国产婷婷一区二区| 国产一区二区三区国产| 视频一区在线播放| 久久精品免费观看| 日韩一级片在线播放| 五月婷婷综合网| 欧美美女网站色| 亚洲国产精品久久人人爱| 欧美亚洲一区三区| 亚洲午夜av在线| 欧美色电影在线| 亚洲午夜在线视频| 欧美日韩大陆一区二区| 亚洲国产精品尤物yw在线观看| 欧美唯美清纯偷拍| 天天综合色天天综合色h| 欧美人狂配大交3d怪物一区| 亚洲电影在线播放| 欧美日韩视频在线第一区| 亚洲成人av中文| 日韩一区二区影院| 麻豆国产91在线播放| 久久亚洲二区三区| 丁香六月综合激情| 国产精品国产馆在线真实露脸| 不卡欧美aaaaa| 亚洲激情图片一区| 欧美色图片你懂的| 日韩国产精品久久| 精品久久人人做人人爰| 国产麻豆成人精品| 一色桃子久久精品亚洲| 色老头久久综合| 午夜久久久影院| 26uuu亚洲综合色欧美| 大尺度一区二区| 亚洲欧美精品午睡沙发| 欧美三级午夜理伦三级中视频| 婷婷丁香激情综合| 久久综合视频网| 99久久伊人网影院| 亚洲午夜久久久久久久久久久 | 国产成人综合视频| 国产精品久久一级| 欧美四级电影网| 蜜臂av日日欢夜夜爽一区| 国产欧美日本一区二区三区| 99久久婷婷国产综合精品 | 成人激情动漫在线观看| 一区二区三区小说| 日韩欧美国产成人一区二区| 国产91精品一区二区麻豆网站| 亚洲精品国产一区二区精华液| 51精品久久久久久久蜜臀| 大桥未久av一区二区三区中文| 亚洲一区二区在线免费观看视频| 日韩一区二区三区高清免费看看| 高清av一区二区| 天堂蜜桃91精品| 亚洲国产电影在线观看| 宅男在线国产精品| 成人免费黄色大片| 毛片一区二区三区| 夜夜嗨av一区二区三区中文字幕| 精品久久一二三区| 欧美日韩亚洲另类| 北条麻妃一区二区三区| 麻豆精品在线播放| 亚洲精品视频在线看| 久久日韩精品一区二区五区| 日本韩国欧美在线| 国产一本一道久久香蕉| 亚洲v日本v欧美v久久精品| 国产午夜精品一区二区| 91.成人天堂一区| 91国产免费观看| 成人网在线免费视频| 极品少妇一区二区三区精品视频| 亚洲大片精品永久免费| 国产精品短视频| 久久日韩精品一区二区五区|