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

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

?? os_time.c

?? ucos-II在S3C44BO下的移植
?? C
字號:
/*
*********************************************************************************************************
*                                                uC/OS-II
*                                          The Real-Time Kernel
*                                             TIME MANAGEMENT
*
*                        (c) Copyright 1992-1998, Jean J. Labrosse, Plantation, FL
*                                           All Rights Reserved
*
*                                                  V2.00
*
* 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 (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();
        OSSched();                                                        /* 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.
*********************************************************************************************************
*/

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 = ticks / 65536L;                  /* Compute the integral number of 65536 tick delays   */
        ticks = ticks % 65536L;                  /* Obtain  the fractional number of ticks             */
        OSTimeDly(ticks);
        while (loops > 0) {
            OSTimeDly(32768);
            OSTimeDly(32768);
            loops--;
        }
        return (OS_NO_ERR);
    } else {
        return (OS_TIME_ZERO_DLY);
    }
}
/*$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
*********************************************************************************************************
*/

INT8U OSTimeDlyResume (INT8U prio)
{
    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)) {    /* See if task is ready to run              */
                OSRdyGrp               |= ptcb->OSTCBBitY; /* Make task ready to run                   */
                OSRdyTbl[ptcb->OSTCBY] |= ptcb->OSTCBBitX;
                OS_EXIT_CRITICAL();
                OSSched();                                 /* 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       */
        }
    } else {
        OS_EXIT_CRITICAL();
        return (OS_TASK_NOT_EXIST);                        /* The task does not exist                  */
    }
}
/*$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
*********************************************************************************************************
*/

INT32U OSTimeGet (void)
{
    INT32U ticks;


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

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

void OSTimeSet (INT32U ticks)
{
    OS_ENTER_CRITICAL();
    OSTime = ticks;
    OS_EXIT_CRITICAL();
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
青青草97国产精品免费观看 | 亚洲精品日韩一| 国产ts人妖一区二区| 中文字幕av一区二区三区免费看| 成人毛片视频在线观看| 亚洲女女做受ⅹxx高潮| 欧美天堂亚洲电影院在线播放 | 天堂va蜜桃一区二区三区漫画版| 欧美美女直播网站| 精品一区二区三区免费毛片爱| 久久免费偷拍视频| av不卡在线播放| 亚洲第四色夜色| 精品国产麻豆免费人成网站| 成人理论电影网| 91丨porny丨首页| 日本一区二区三区久久久久久久久不| 丁香五精品蜜臀久久久久99网站 | 亚洲欧美日本韩国| 欧美性生活一区| 男人的天堂亚洲一区| 欧美国产精品中文字幕| 精品视频1区2区3区| 狠狠色丁香婷综合久久| 亚洲欧美日韩国产中文在线| 欧美一卡二卡三卡四卡| hitomi一区二区三区精品| 中文字幕中文字幕在线一区| 在线精品亚洲一区二区不卡| 免费视频最近日韩| 国产精品无码永久免费888| 欧美精品tushy高清| 成人免费高清在线| 免费高清不卡av| 亚洲欧美偷拍另类a∨色屁股| 日韩视频一区二区在线观看| 色一情一乱一乱一91av| 国产毛片一区二区| 亚洲国产精品视频| 中文字幕在线不卡视频| 欧美不卡一区二区| 欧洲精品在线观看| 99久久精品免费看| 精品一区二区三区不卡| 亚洲激情自拍偷拍| 欧美激情一区在线| 精品国产乱码久久久久久浪潮| 日本韩国精品在线| 成人高清视频在线| 国内成人精品2018免费看| 亚洲成人免费在线观看| 亚洲欧美日韩人成在线播放| 国产午夜亚洲精品理论片色戒| 欧美一区二区不卡视频| 欧美日韩中文字幕一区| 色综合久久88色综合天天| 成人黄色免费短视频| 国模冰冰炮一区二区| 蜜臀精品一区二区三区在线观看| 亚洲国产裸拍裸体视频在线观看乱了 | 欧美视频自拍偷拍| 91免费观看视频在线| av电影天堂一区二区在线观看| 国产精品77777| 韩国欧美国产一区| 久久国产欧美日韩精品| 蜜臀91精品一区二区三区 | 国产.欧美.日韩| 国产麻豆精品95视频| 久久超碰97中文字幕| 久久av中文字幕片| 精品一区二区免费| 韩国av一区二区三区| 国内精品国产成人国产三级粉色 | 欧美成人女星排行榜| 日韩一区和二区| 欧美成人精品二区三区99精品| 91精品国产综合久久福利软件| 欧美精品日日鲁夜夜添| 欧美肥胖老妇做爰| 欧美电影免费提供在线观看| 日韩精品一区二区三区视频在线观看 | 国产高清精品在线| 国产成人精品三级| 99国产精品视频免费观看| 91在线国产福利| 在线观看网站黄不卡| 欧美伦理电影网| 日韩免费观看2025年上映的电影 | 亚洲男同性视频| 亚洲男同性恋视频| 亚洲高清免费在线| 美女视频网站久久| 国产盗摄女厕一区二区三区| aaa欧美大片| 欧美日韩一区在线| 日韩免费在线观看| 国产精品美女一区二区三区| 亚洲精品视频自拍| 天天色综合成人网| 久久69国产一区二区蜜臀| 国产一区二区三区美女| www.性欧美| 91麻豆精品91久久久久久清纯| 日韩欧美一区在线| 国产精品视频yy9299一区| 亚洲激情在线播放| 久久se精品一区二区| 91热门视频在线观看| 91精品免费在线观看| 中文字幕乱码久久午夜不卡| 亚洲成人免费在线| 国产99久久久久久免费看农村| 欧美又粗又大又爽| 26uuu另类欧美亚洲曰本| 亚洲你懂的在线视频| 精品中文av资源站在线观看| 91丨porny丨首页| 欧美成人精品1314www| 一区二区国产盗摄色噜噜| 精品中文字幕一区二区| 日本乱人伦一区| 国产亚洲成年网址在线观看| 亚洲一区影音先锋| 国产成人精品免费一区二区| 欧美理论片在线| 综合精品久久久| 精品一区二区三区av| 欧美日韩在线综合| 亚洲欧洲色图综合| 狠狠色丁香久久婷婷综| 欧美日韩精品一区二区三区四区 | 欧美另类久久久品| 亚洲欧美日韩中文播放| 国产一区二区在线影院| 7777女厕盗摄久久久| 亚洲欧美国产77777| 国产一区二区三区四| 69p69国产精品| 一区二区三区高清| caoporm超碰国产精品| 久久久久久毛片| 蜜乳av一区二区| 欧美日韩国产经典色站一区二区三区| 中文字幕在线观看不卡视频| 国产原创一区二区| 精品久久一二三区| 日本中文字幕不卡| 欧美日韩一区二区三区不卡| 日韩毛片在线免费观看| 成人久久18免费网站麻豆| 久久久久久久久久电影| 精品一区二区三区香蕉蜜桃 | 国产精品热久久久久夜色精品三区| 日韩精品午夜视频| 欧美三级在线视频| 亚洲国产精品久久久久婷婷884| 91麻豆精品秘密| 亚洲欧美激情在线| 91欧美一区二区| 伊人色综合久久天天人手人婷| av亚洲精华国产精华精华| 国产精品看片你懂得| av高清久久久| 亚洲欧美区自拍先锋| 色先锋资源久久综合| 最新国产精品久久精品| av一本久道久久综合久久鬼色| 中文字幕一区二区三区视频| www.欧美色图| 亚洲视频每日更新| 欧美专区亚洲专区| 婷婷丁香久久五月婷婷| 欧美一区二区在线不卡| 精品夜夜嗨av一区二区三区| 久久精品一级爱片| 成人精品视频.| 亚洲精品视频在线看| 欧美日韩一级黄| 久久99精品一区二区三区| 2023国产一二三区日本精品2022| 国产69精品一区二区亚洲孕妇| 中文字幕在线不卡一区二区三区| 91黄色免费版| 日本特黄久久久高潮| 久久日韩粉嫩一区二区三区 | 免费在线观看不卡| 2023国产精华国产精品| 成人黄色电影在线| 一区二区三区国产| 日韩一区二区在线观看视频| 国内精品伊人久久久久影院对白| 国产精品色哟哟| 欧美日韩三级在线| 国产在线播放一区| 亚洲免费三区一区二区| 日韩一区二区三区三四区视频在线观看| 狠狠色丁香久久婷婷综合丁香| 国产精品传媒视频| 6080午夜不卡|