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

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

?? os_time.c

?? tcp/ip 協議棧
?? C
字號:
/*
*********************************************************************************************************
*                                                uC/OS-II
*                                          The Real-Time Kernel
*                                             TIME MANAGEMENT
*
*                          (c) Copyright 1992-2002, Jean J. Labrosse, Weston, FL
*                                           All Rights Reserved
*
* File : OS_TIME.C
* By   : Jean J. Labrosse
*********************************************************************************************************
*/

#ifndef  OS_MASTER_FILE
#include "includes.h"
#endif

/*
*********************************************************************************************************
*                                DELAY TASK 'n' TICKS   (n from 0 to 65535)
*
* Description: This function is called to delay execution of the currently running task until the
*              specified number of system ticks expires.  This, of course, directly equates to delaying
*              the current task for some time to expire.  No delay will result If the specified delay is
*              0.  If the specified delay is greater than 0 then, a context switch will result.
*
* Arguments  : ticks     is the time delay that the task will be suspended in number of clock 'ticks'.
*                        Note that by specifying 0, the task will not be delayed.
*
* Returns    : none
*********************************************************************************************************
*/

void  OSTimeDly (INT16U ticks)
{
#if OS_CRITICAL_METHOD == 3                      /* Allocate storage for CPU status register           */
    OS_CPU_SR  cpu_sr;
#endif    


    if (ticks > 0) {                                                      /* 0 means no delay!         */
        OS_ENTER_CRITICAL();
        if ((OSRdyTbl[OSTCBCur->OSTCBY] &= ~OSTCBCur->OSTCBBitX) == 0) {  /* Delay current task        */
            OSRdyGrp &= ~OSTCBCur->OSTCBBitY;
        }
        OSTCBCur->OSTCBDly = ticks;                                       /* Load ticks in TCB         */
        OS_EXIT_CRITICAL();
        OS_Sched();                                                       /* Find next task to run!    */
    }
}
/*$PAGE*/
/*
*********************************************************************************************************
*                                     DELAY TASK FOR SPECIFIED TIME
*
* Description: This function is called to delay execution of the currently running task until some time
*              expires.  This call allows you to specify the delay time in HOURS, MINUTES, SECONDS and
*              MILLISECONDS instead of ticks.
*
* Arguments  : hours     specifies the number of hours that the task will be delayed (max. is 255)
*              minutes   specifies the number of minutes (max. 59)
*              seconds   specifies the number of seconds (max. 59)
*              milli     specifies the number of milliseconds (max. 999)
*
* Returns    : OS_NO_ERR
*              OS_TIME_INVALID_MINUTES
*              OS_TIME_INVALID_SECONDS
*              OS_TIME_INVALID_MS
*              OS_TIME_ZERO_DLY
*
* Note(s)    : The resolution on the milliseconds depends on the tick rate.  For example, you can't do
*              a 10 mS delay if the ticker interrupts every 100 mS.  In this case, the delay would be
*              set to 0.  The actual delay is rounded to the nearest tick.
*********************************************************************************************************
*/

#if OS_TIME_DLY_HMSM_EN > 0
INT8U  OSTimeDlyHMSM (INT8U hours, INT8U minutes, INT8U seconds, INT16U milli)
{
    INT32U ticks;
    INT16U loops;


    if (hours > 0 || minutes > 0 || seconds > 0 || milli > 0) {
        if (minutes > 59) {
            return (OS_TIME_INVALID_MINUTES);    /* Validate arguments to be within range              */
        }
        if (seconds > 59) {
            return (OS_TIME_INVALID_SECONDS);
        }
        if (milli > 999) {
            return (OS_TIME_INVALID_MILLI);
        }
                                                 /* Compute the total number of clock ticks required.. */
                                                 /* .. (rounded to the nearest tick)                   */
        ticks = ((INT32U)hours * 3600L + (INT32U)minutes * 60L + (INT32U)seconds) * OS_TICKS_PER_SEC
              + OS_TICKS_PER_SEC * ((INT32U)milli + 500L / OS_TICKS_PER_SEC) / 1000L;
        loops = (INT16U)(ticks / 65536L);        /* Compute the integral number of 65536 tick delays   */
        ticks = ticks % 65536L;                  /* Obtain  the fractional number of ticks             */
        OSTimeDly((INT16U)ticks);
        while (loops > 0) {
            OSTimeDly(32768);
            OSTimeDly(32768);
            loops--;
        }
        return (OS_NO_ERR);
    }
    return (OS_TIME_ZERO_DLY);
}
#endif
/*$PAGE*/
/*
*********************************************************************************************************
*                                         RESUME A DELAYED TASK
*
* Description: This function is used resume a task that has been delayed through a call to either
*              OSTimeDly() or OSTimeDlyHMSM().  Note that you MUST NOT call this function to resume a
*              task that is waiting for an event with timeout.  This situation would make the task look
*              like a timeout occurred (unless you desire this effect).  Also, you cannot resume a task
*              that has called OSTimeDlyHMSM() with a combined time that exceeds 65535 clock ticks.  In
*              other words, if the clock tick runs at 100 Hz then, you will not be able to resume a
*              delayed task that called OSTimeDlyHMSM(0, 10, 55, 350) or higher.
*
*                  (10 Minutes * 60 + 55 Seconds + 0.35) * 100 ticks/second.
*
* Arguments  : prio      specifies the priority of the task to resume
*
* Returns    : OS_NO_ERR                 Task has been resumed
*              OS_PRIO_INVALID           if the priority you specify is higher that the maximum allowed
*                                        (i.e. >= OS_LOWEST_PRIO)
*              OS_TIME_NOT_DLY           Task is not waiting for time to expire
*              OS_TASK_NOT_EXIST         The desired task has not been created
*********************************************************************************************************
*/

#if OS_TIME_DLY_RESUME_EN > 0
INT8U  OSTimeDlyResume (INT8U prio)
{
#if OS_CRITICAL_METHOD == 3                      /* Allocate storage for CPU status register           */
    OS_CPU_SR  cpu_sr;
#endif    
    OS_TCB    *ptcb;


    if (prio >= OS_LOWEST_PRIO) {
        return (OS_PRIO_INVALID);
    }
    OS_ENTER_CRITICAL();
    ptcb = (OS_TCB *)OSTCBPrioTbl[prio];                   /* Make sure that task exist                */
    if (ptcb != (OS_TCB *)0) {
        if (ptcb->OSTCBDly != 0) {                         /* See if task is delayed                   */
            ptcb->OSTCBDly  = 0;                           /* Clear the time delay                     */
            if ((ptcb->OSTCBStat & OS_STAT_SUSPEND) == OS_STAT_RDY) {  /* See if task is ready to run  */
                OSRdyGrp               |= ptcb->OSTCBBitY;             /* Make task ready to run       */
                OSRdyTbl[ptcb->OSTCBY] |= ptcb->OSTCBBitX;
                OS_EXIT_CRITICAL();
                OS_Sched();                                /* See if this is new highest priority      */
            } else {
                OS_EXIT_CRITICAL();                        /* Task may be suspended                    */
            }
            return (OS_NO_ERR);
        } else {
            OS_EXIT_CRITICAL();
            return (OS_TIME_NOT_DLY);                      /* Indicate that task was not delayed       */
        }
    }
    OS_EXIT_CRITICAL();
    return (OS_TASK_NOT_EXIST);                            /* The task does not exist                  */
}
#endif    
/*$PAGE*/
/*
*********************************************************************************************************
*                                         GET CURRENT SYSTEM TIME
*
* Description: This function is used by your application to obtain the current value of the 32-bit
*              counter which keeps track of the number of clock ticks.
*
* Arguments  : none
*
* Returns    : The current value of OSTime
*********************************************************************************************************
*/

#if OS_TIME_GET_SET_EN > 0
INT32U  OSTimeGet (void)
{
#if OS_CRITICAL_METHOD == 3                      /* Allocate storage for CPU status register           */
    OS_CPU_SR  cpu_sr;
#endif    
    INT32U     ticks;


    OS_ENTER_CRITICAL();
    ticks = OSTime;
    OS_EXIT_CRITICAL();
    return (ticks);
}
#endif    

/*
*********************************************************************************************************
*                                            SET SYSTEM CLOCK
*
* Description: This function sets the 32-bit counter which keeps track of the number of clock ticks.
*
* Arguments  : ticks      specifies the new value that OSTime needs to take.
*
* Returns    : none
*********************************************************************************************************
*/

#if OS_TIME_GET_SET_EN > 0
void  OSTimeSet (INT32U ticks)
{
#if OS_CRITICAL_METHOD == 3                      /* Allocate storage for CPU status register           */
    OS_CPU_SR  cpu_sr;
#endif    


    OS_ENTER_CRITICAL();
    OSTime = ticks;
    OS_EXIT_CRITICAL();
}
#endif    

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99久久伊人久久99| 精品亚洲porn| 亚洲欧洲99久久| 亚洲精品一区二区三区影院| 欧美三片在线视频观看| 色婷婷av一区二区三区大白胸| 国产成人免费av在线| 国产精品888| 精品一区中文字幕| 精油按摩中文字幕久久| 久久福利资源站| 精品一区二区三区在线播放| 久久99精品国产麻豆不卡| 激情综合色综合久久| 国产精品自拍在线| 国产露脸91国语对白| 懂色av一区二区夜夜嗨| 暴力调教一区二区三区| 91视频免费观看| 欧美最猛性xxxxx直播| 欧美精品vⅰdeose4hd| 欧美日本国产视频| 日韩精品综合一本久道在线视频| 欧美大片拔萝卜| 国产精品色婷婷| 一区二区三区欧美日| 亚洲v日本v欧美v久久精品| 毛片不卡一区二区| 成人性生交大片免费| 在线观看视频一区二区 | 欧美视频第二页| 在线播放91灌醉迷j高跟美女| 欧美一级午夜免费电影| 亚洲国产激情av| 亚洲一区二区三区四区在线 | 经典三级在线一区| 成人性色生活片| 欧美日本一区二区| 久久网站热最新地址| 一区二区三区在线视频播放 | 国内成人自拍视频| 91浏览器在线视频| 精品国产一区二区亚洲人成毛片| 国产精品无码永久免费888| 亚洲国产一区二区a毛片| 国产风韵犹存在线视精品| 欧美综合一区二区三区| 专区另类欧美日韩| 香港成人在线视频| 99久久精品国产一区| 日韩欧美中文字幕公布| 亚洲精品高清视频在线观看| 国模娜娜一区二区三区| 欧美老肥妇做.爰bbww| 《视频一区视频二区| 国产原创一区二区| 欧美一二三在线| 一区二区在线观看视频| 成人黄色电影在线| www成人在线观看| 亚洲成av人影院| 色88888久久久久久影院野外| 久久久久久久久久电影| 免费的成人av| 欧美久久久一区| 亚洲一区二区三区四区的| 成人手机在线视频| 精品国产免费久久| 玖玖九九国产精品| 欧美一级视频精品观看| 婷婷六月综合网| 欧美性大战久久久久久久| 亚洲欧美日韩精品久久久久| 成人免费黄色在线| 欧美激情中文不卡| 国产电影精品久久禁18| 久久精品亚洲国产奇米99| 日韩精品91亚洲二区在线观看| 欧美日韩一区二区欧美激情 | 欧美日韩中文字幕一区| 亚洲情趣在线观看| 色久综合一二码| 一区二区三区在线看| 欧美伊人久久久久久久久影院| 亚洲精品久久7777| 精品美女一区二区三区| 午夜不卡在线视频| 91精品国产综合久久国产大片| 午夜精品久久久久| 欧美一级免费观看| 精品一区二区三区在线视频| 久久久三级国产网站| 国产成人午夜视频| 国产精品久久久久久妇女6080| 99精品视频免费在线观看| 亚洲黄一区二区三区| 欧美电影一区二区| 国产在线视频一区二区三区| 久久九九久久九九| 色综合视频在线观看| 午夜影院久久久| 26uuu亚洲综合色欧美| 97久久精品人人爽人人爽蜜臀| 亚洲一区二区三区四区五区黄| 欧美另类高清zo欧美| 国产麻豆精品久久一二三| 国产精品美女久久久久久久网站| 色综合久久综合网| 美腿丝袜在线亚洲一区| 亚洲精品一区二区精华| 91丨porny丨国产入口| 日韩精品一二区| 国产精品乱码一区二区三区软件| 日本精品一区二区三区高清| 精品一区二区三区欧美| 亚洲欧洲av在线| 日韩一级欧美一级| 丁香五精品蜜臀久久久久99网站| 亚洲一级不卡视频| 久久久久久久久岛国免费| 欧美色精品在线视频| 国产一区二区看久久| 亚洲国产美女搞黄色| 国产女人18毛片水真多成人如厕| 欧美在线影院一区二区| 国产成人午夜视频| 日本不卡1234视频| 亚洲精品免费在线观看| 久久综合国产精品| 欧美亚洲禁片免费| 成人黄色国产精品网站大全在线免费观看| 午夜久久久久久| 亚洲图片你懂的| 精品国产一区二区三区四区四| 91行情网站电视在线观看高清版| 国产一区二区三区黄视频| 石原莉奈在线亚洲二区| 中文字幕亚洲视频| 久久在线观看免费| 91精品国产一区二区人妖| 色综合久久天天综合网| 99视频有精品| 不卡一区二区在线| 国产一区 二区| 激情文学综合插| 蜜桃视频第一区免费观看| 亚洲成人精品影院| 亚洲一卡二卡三卡四卡| 最新国产精品久久精品| 中文字幕av在线一区二区三区| 日韩你懂的电影在线观看| 91麻豆精品国产91久久久久| 欧美手机在线视频| 欧美久久久久久久久中文字幕| 欧洲一区在线观看| 欧美日韩电影在线播放| 欧美日本一区二区在线观看| 欧美精品日韩精品| 宅男噜噜噜66一区二区66| 欧美一区二区播放| 欧美mv日韩mv亚洲| 久久嫩草精品久久久久| 久久久99精品久久| 国产精品卡一卡二卡三| 亚洲嫩草精品久久| 亚洲国产日日夜夜| 日韩制服丝袜先锋影音| 日韩不卡在线观看日韩不卡视频| 琪琪久久久久日韩精品| 久久国产人妖系列| 国产精品911| 91色.com| 在线播放视频一区| 日韩精品一区二区三区视频| 久久精品欧美一区二区三区不卡| 国产欧美一区二区精品婷婷| 亚洲丝袜精品丝袜在线| 亚洲国产精品精华液网站| 日本麻豆一区二区三区视频| 国产自产视频一区二区三区| 国产福利91精品| 欧美怡红院视频| 日韩一级欧美一级| 国产精品三级在线观看| 一区二区免费在线| 久久精品国产亚洲a| 成人午夜电影网站| 欧美三区在线视频| 国产女人18水真多18精品一级做| 一区二区不卡在线播放 | 成人app网站| 欧美日韩精品综合在线| 久久天天做天天爱综合色| 国产精品不卡在线| 美女视频第一区二区三区免费观看网站| 国产麻豆精品视频| 91麻豆精品国产91久久久久| 中文av一区二区| 美女被吸乳得到大胸91| 91浏览器打开|