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

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

?? qus.c

?? 基于OMAP1510的Nucleus移植代碼
?? C
?? 第 1 頁 / 共 4 頁
字號:
                    destination =  queue -> qu_end - size;
                else

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

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

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

                /* Variable-size message queue.  */

                /* Calculate the number of words remaining at the top of the
                   queue.  */
                copy_size =  destination - queue -> qu_start;

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

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

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

                /* Adjust the actual queue read pointer also.  */
                queue -> qu_read =  destination;

                /* Place message size in first location.  */
                *(destination++) =  size;

                /* Check for a wrap-around condition on the queue.  */
                if (destination >= queue -> qu_end)

                    /* Wrap the write pointer back to the top of the queue
                       area.  */
                    destination =  queue -> qu_start;

                /* Decrement the number of words remaining by 1 for this
                   extra word of overhead.  */
                queue -> qu_available--;

                /* Calculate the number of words remaining from the
                   destination pointer to the bottom of the queue.  */
                copy_size =  queue -> qu_end - destination;

                /* Determine if the message needs to be wrapped around the
                   edge of the queue 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 =  queue -> qu_start;
                    i =  (INT) (size - copy_size);
                    do
                    {
                        *(destination++) =  *(source);
                        if ((--i) == 0)
                            break;
                        source++;
                    } while (1);
                }
            }

            /* Decrement the number of available words.  */
            queue -> qu_available =  queue -> qu_available - size;

            /* Increment the number of messages in the queue.  */
            queue -> qu_messages++;

#ifdef INCLUDE_PROVIEW
            _RTProf_DumpQueue(RT_PROF_SEND_TO_FRONT_OF_QUEUE,queue,RT_PROF_OK);
#endif

        }
    }

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

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

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


/*************************************************************************/
/*                                                                       */
/* FUNCTION                                                              */
/*                                                                       */
/*      QUS_Broadcast_To_Queue                                           */
/*                                                                       */
/* DESCRIPTION                                                           */
/*                                                                       */
/*      This function sends a message to all tasks waiting for a message */
/*      from the specified queue.  If there are no tasks waiting for a   */
/*      message the service performs like a standard send request.       */
/*                                                                       */
/* CALLED BY                                                             */
/*                                                                       */
/*      Application                                                      */
/*      QUSE_Broadcast_To_Queue             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 queue                */
/*      TCT_Unprotect                       Release protection           */
/*                                                                       */
/* INPUTS                                                                */
/*                                                                       */
/*      queue_ptr                           Queue 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_QUEUE_FULL                       If queue is currently full   */
/*      NU_TIMEOUT                          If timeout on service expires*/
/*      NU_QUEUE_DELETED                    If queue was deleted during  */
/*                                            suspension                 */
/*      NU_QUEUE_RESET                      If queue 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  QUS_Broadcast_To_Queue(NU_QUEUE *queue_ptr, VOID *message,
                                        UNSIGNED size, UNSIGNED suspend)
{

R1 QU_QCB      *queue;                      /* Queue control block ptr   */
QU_SUSPEND      suspend_block;              /* Allocate suspension block */
QU_SUSPEND     *suspend_ptr;                /* Pointer to suspend block  */
R3 UNSIGNED_PTR source;                     /* Pointer to source         */
R4 UNSIGNED_PTR destination;                /* Pointer to destination    */
UNSIGNED        copy_size;                  /* Partial copy size         */
R2 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 queue pointer into internal pointer.  */
    queue =  (QU_QCB *) queue_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_QUEUE_ID, (UNSIGNED) queue,
                                        (UNSIGNED) message, (UNSIGNED) size);

#endif

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

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

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

        /* No overhead.  */
        i =  0;
    else
    {
        /* Variable messages have one additional word of overhead.  */
        i =  1;

        /* Make special check to see if a suspension needs to be
           forced for a variable length message.  */
        if ((queue -> qu_suspension_list) && (queue -> qu_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 ((queue -> qu_fifo_suspend) ||
                (suspend == NU_NO_SUSPEND) ||
                ((queue -> qu_suspension_list) -> qu_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) queue -> qu_available;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲国产精品高清| 欧美日韩国产另类一区| 日本一道高清亚洲日美韩| 欧美精品vⅰdeose4hd| 九九国产精品视频| 亚洲色图欧洲色图| 国产女人18毛片水真多成人如厕| 在线视频亚洲一区| caoporn国产一区二区| 日本成人超碰在线观看| 国产欧美一区二区精品久导航| 99久久久精品| 久久97超碰国产精品超碰| 亚洲欧美日韩一区| 中文字幕欧美国产| 久久这里只有精品首页| 2023国产精品自拍| 久久夜色精品一区| 日韩一区二区在线观看视频播放| 91麻豆免费在线观看| av色综合久久天堂av综合| 国产精品538一区二区在线| 看片的网站亚洲| 欧美a级一区二区| 国产一区二区伦理片| 免费观看30秒视频久久| 老司机精品视频在线| 久久精品国产色蜜蜜麻豆| 日韩福利视频导航| 蜜臀av性久久久久av蜜臀妖精| 亚洲美女视频在线观看| 久久精品国产一区二区| 激情成人综合网| 国产福利一区二区三区视频在线| 99国产一区二区三精品乱码| 91视视频在线观看入口直接观看www | 麻豆高清免费国产一区| 宅男噜噜噜66一区二区66| 欧美日韩高清在线播放| 欧美在线free| 91麻豆精品国产91久久久久久| 国产主播一区二区| 一区二区三区美女视频| 秋霞影院一区二区| 91精品国产综合久久香蕉的特点 | 日韩高清不卡一区| 成人av综合一区| 日韩三级视频在线看| 中文字幕亚洲欧美在线不卡| 亚洲6080在线| 成人在线一区二区三区| 91精品国产欧美一区二区| 国产精品污污网站在线观看| 午夜精品久久久久影视| 99精品久久99久久久久| 精品国产伦一区二区三区观看方式 | 色婷婷久久99综合精品jk白丝| 欧美mv日韩mv亚洲| 亚洲国产综合91精品麻豆| 成人白浆超碰人人人人| 日韩欧美不卡一区| 午夜成人免费电影| 91浏览器在线视频| 国产精品素人视频| 成人精品视频网站| 久久久久综合网| 国产成人在线免费观看| 久久综合久色欧美综合狠狠| 免费在线观看成人| 日韩亚洲欧美一区| 亚洲国产中文字幕| 精品欧美一区二区三区精品久久| 日韩成人一级大片| 久久婷婷国产综合精品青草| 国产91丝袜在线观看| 亚洲女与黑人做爰| 91精品国产色综合久久久蜜香臀| 国产91精品免费| 丝瓜av网站精品一区二区 | 久久综合给合久久狠狠狠97色69| 久久精品国产秦先生| 久久久一区二区| 91在线视频在线| 亚洲成人av福利| 一区精品在线播放| 欧美午夜在线一二页| 久久aⅴ国产欧美74aaa| 中文字幕一区二区三区在线播放| 精品婷婷伊人一区三区三| 国产一区二区女| 日韩精品一二三四| 国产精品久久三| 精品国产精品网麻豆系列| 欧洲一区二区三区在线| 国产69精品久久777的优势| 亚洲一区二区精品视频| 国产亚洲欧美日韩日本| 欧美日产国产精品| 不卡的av电影在线观看| 看电影不卡的网站| 亚洲一区精品在线| 一区二区中文字幕在线| 国产亚洲午夜高清国产拍精品| 欧美日韩一级黄| 欧美色网站导航| 91在线视频观看| 色婷婷久久久久swag精品| 国产成人精品免费视频网站| 蜜臀精品一区二区三区在线观看 | 中文字幕乱码一区二区免费| 日韩女优电影在线观看| 欧美嫩在线观看| 欧美一区二区三区不卡| 精品国产亚洲一区二区三区在线观看| 制服丝袜国产精品| 欧美一级日韩一级| 欧美一激情一区二区三区| 欧美美女网站色| 日韩美女视频一区二区在线观看| 日韩视频在线永久播放| 国产无一区二区| 亚洲天堂网中文字| 亚洲国产成人高清精品| 国内精品免费**视频| 波多野结衣精品在线| 欧美三区在线观看| 精品动漫一区二区三区在线观看| 欧美国产日本韩| 日本不卡一区二区三区高清视频| 精品一区二区久久| 成人av电影免费观看| 91麻豆精品国产91久久久久 | 欧美日韩国产美| 国产精品国产三级国产三级人妇 | 亚洲男人天堂av| 精品亚洲成av人在线观看| 欧美亚一区二区| 国产精品电影院| 国产一区二区不卡| 欧美三级在线看| 老司机午夜精品| 欧美一区二区大片| 亚洲综合丝袜美腿| 91免费视频网| 一区二区中文字幕在线| 玖玖九九国产精品| 91精品国产91热久久久做人人| 亚洲美女视频在线| 成人免费视频app| 国产午夜亚洲精品羞羞网站| 精品一区二区三区久久| 日韩一区二区三区在线视频| 亚洲愉拍自拍另类高清精品| 色哟哟一区二区在线观看| 成人免费视频在线观看| 国产激情视频一区二区在线观看| 久久丝袜美腿综合| 成人av在线资源网| 亚洲欧美一区二区久久| 欧洲国内综合视频| 欧美aaa在线| 亚洲自拍偷拍av| 国产福利不卡视频| 在线综合视频播放| 一区二区不卡在线播放| 欧美色图激情小说| 天天综合色天天| 国产网站一区二区| 欧美大白屁股肥臀xxxxxx| 国产成人av影院| 午夜欧美大尺度福利影院在线看| 日韩精品最新网址| caoporn国产一区二区| 蜜桃精品视频在线| 国产精品久久久久久久久久免费看| 在线视频你懂得一区二区三区| 偷拍一区二区三区四区| 久久嫩草精品久久久精品| 欧美亚洲国产bt| 成人免费看视频| 天天色天天爱天天射综合| 欧洲另类一二三四区| 粉嫩高潮美女一区二区三区| 亚洲午夜久久久| 国产精品免费免费| 久久久精品国产免费观看同学| 欧美日韩一级片网站| 成人免费高清视频在线观看| 蜜臀久久久久久久| 亚洲一区在线视频| 国产精品不卡一区| 精品国产一区二区三区忘忧草| 欧美日韩精品一区二区三区| 欧美自拍丝袜亚洲| 色婷婷av一区二区| 色婷婷综合久久久久中文一区二区| 国产999精品久久久久久绿帽| 国内精品免费在线观看| 久久成人久久爱| 国产一区久久久|