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

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

?? wallclock.cxx

?? eCos操作系統源碼
?? CXX
字號:
//==========================================================================////        wallclock.cxx////        WallClock test////==========================================================================//####ECOSGPLCOPYRIGHTBEGIN####// -------------------------------------------// This file is part of eCos, the Embedded Configurable Operating System.// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.// Copyright (C) 2003 Gary Thomas//// eCos is free software; you can redistribute it and/or modify it under// the terms of the GNU General Public License as published by the Free// Software Foundation; either version 2 or (at your option) any later version.//// eCos is distributed in the hope that it will be useful, but WITHOUT ANY// WARRANTY; without even the implied warranty of MERCHANTABILITY or// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License// for more details.//// You should have received a copy of the GNU General Public License along// with eCos; if not, write to the Free Software Foundation, Inc.,// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.//// As a special exception, if other files instantiate templates or use macros// or inline functions from this file, or you compile this file and link it// with other works to produce a work based on this file, this file does not// by itself cause the resulting work to be covered by the GNU General Public// License. However the source code for this file must still be made available// in accordance with section (3) of the GNU General Public License.//// This exception does not invalidate any other reasons why a work based on// this file might be covered by the GNU General Public License.//// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.// at http://sources.redhat.com/ecos/ecos-license/// -------------------------------------------//####ECOSGPLCOPYRIGHTEND####//==========================================================================//#####DESCRIPTIONBEGIN####//// Author(s):     nickg// Contributors:    nickg// Date:          1998-07-20// Description:   Tests the Kernel Wall Clock//                This test exercises the WallClock class and checks that it//                keeps time correctly.//####DESCRIPTIONEND####// -------------------------------------------------------------------------#include <pkgconf/hal.h>#include <pkgconf/kernel.h>#include <cyg/kernel/thread.hxx>#include <cyg/kernel/thread.inl>#include <cyg/kernel/sched.hxx>#include <cyg/kernel/mutex.hxx>#include <cyg/kernel/sema.hxx>#include <cyg/kernel/clock.hxx>#include <cyg/kernel/diag.h>#include <cyg/io/wallclock.hxx>         // The WallClock API#include <cyg/infra/testcase.h>#if defined(CYGFUN_KERNEL_THREADS_TIMER) && \    defined(CYGVAR_KERNEL_COUNTERS_CLOCK)#include <cyg/kernel/sched.inl>// -------------------------------------------------------------------------// Data for the test#ifdef CYGNUM_HAL_STACK_SIZE_TYPICAL#define STACKSIZE CYGNUM_HAL_STACK_SIZE_TYPICAL#else#define STACKSIZE       (2*1024)        // size of thread stack#endifchar thread_stack[STACKSIZE];inline void *operator new(size_t size, void *ptr) { return ptr; };// array of threads.char thread[sizeof(Cyg_Thread)];Cyg_Thread *th;// MN10300 sim takes 1min15secs to do one loop on 300MHz PII.#define LOOPS_SIM       2#define LOOPS_HW        10cyg_int32 loops = LOOPS_HW;cyg_tick_count one_sec;// -------------------------------------------------------------------------// Thread bodyvoid wallclock_thread( CYG_ADDRWORD id ){    cyg_uint32 base;    cyg_uint32 wtime;    cyg_tick_count ticks;    cyg_bool ok = true;    CYG_TEST_INFO("Testing accuracy of wallclock (10 seconds silence)");    // Check clock only every other second since the call itself may    // take about a second.    // Start by synchronizing to next wallclock increment, then wait for    // a bit to get away from the exact time of the increment (or minor    // inaccuracies in the HW clock will cause failures).    wtime = Cyg_WallClock::wallclock->get_current_time();    do {        base = Cyg_WallClock::wallclock->get_current_time();    } while (base == wtime);    th->delay( one_sec/10 );    for( int i = 0; i < loops; i += 2 )    {        // Make a note of the time        ticks = Cyg_Clock::real_time_clock->current_value();        wtime = Cyg_WallClock::wallclock->get_current_time();        if(wtime != base+i)        {            diag_printf("offset %d, read %d, expected %d\n", i, wtime, base+i);            ok = false;        }        // then calculate how much the above took so the delay        // below can be made accurate.        ticks = Cyg_Clock::real_time_clock->current_value() - ticks;        th->delay( 2*one_sec - ticks );    }    if ( ! cyg_test_is_simulator ) {        CYG_TEST_INFO("Tick output. Two seconds between each output.");        // Start by synchronizing to next wallclock increment, then        // wait for a bit to get away from the exact time of the        // increment (or minor inaccuracies in the HW clock will cause        // failures).        wtime = Cyg_WallClock::wallclock->get_current_time();        do {            base = Cyg_WallClock::wallclock->get_current_time();        } while (base == wtime);        th->delay( one_sec/10 );        for( int i = 0; i < loops; i += 2 )        {            // Make a note of the time            ticks = Cyg_Clock::real_time_clock->current_value();                        wtime = Cyg_WallClock::wallclock->get_current_time();            if(wtime != base+i)            {                diag_printf("wallclock drift: saw %d expected %d\n",                             wtime, base+i);            }            CYG_TEST_STILL_ALIVE(i, "2xtick...");                        // then calculate how much the above took so the delay            // below can be made accurate.            ticks = Cyg_Clock::real_time_clock->current_value() - ticks;                        th->delay( 2*one_sec - ticks );        }    }    if (ok)        CYG_TEST_PASS_FINISH("Wallclock OK");    else        CYG_TEST_FAIL_FINISH( "Clock out of sync" );    }// -------------------------------------------------------------------------#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAGexternC voidcyg_hal_invoke_constructors();#endifexternC voidcyg_start( void ){#ifdef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG    cyg_hal_invoke_constructors();#endif    CYG_TEST_INIT();    // Dont run this test if we are in a simulator, it just takes far too long.    if( cyg_test_is_simulator )        CYG_TEST_NA("Wallclock test takes too long in simulators");        CYG_TEST_INFO("Starting wallclock test");    Cyg_Clock::cyg_resolution res = Cyg_Clock::real_time_clock->get_resolution();        one_sec = ( res.divisor * 1000000000LL ) / res.dividend ;        th = new((void *)&thread) Cyg_Thread(CYG_SCHED_DEFAULT_INFO,                                         wallclock_thread,                                         0,                                         "wallclock_thread",                                         (CYG_ADDRESS)thread_stack,                                         STACKSIZE        );    th->resume();    // Get the world going    Cyg_Scheduler::scheduler.start();}#else // if defined(CYGFUN_KERNEL_THREADS_TIMER) etc...externC voidcyg_start( void ){    CYG_TEST_INIT();    CYG_TEST_NA("Kernel real-time clock/threads timer disabled");}#endif // if defined(CYGFUN_KERNEL_THREADS_TIMER) etc...// -------------------------------------------------------------------------// EOF wallclock.cxx

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人综合亚洲网站| 8x8x8国产精品| 欧美精品aⅴ在线视频| 国产亚洲欧美色| 日日摸夜夜添夜夜添国产精品| 韩国精品一区二区| 欧美日韩一卡二卡三卡| 欧美激情综合在线| 蜜桃视频一区二区三区| 成人免费精品视频| 久久久一区二区| 日韩av电影免费观看高清完整版| 9人人澡人人爽人人精品| 久久网站最新地址| 美国三级日本三级久久99| 欧美色倩网站大全免费| 日韩一区欧美小说| 丁香亚洲综合激情啪啪综合| 精品久久一区二区三区| 麻豆成人av在线| 欧美精品在线观看一区二区| 亚洲综合色区另类av| 91在线小视频| 中文字幕综合网| 99久久精品国产一区| 国产精品萝li| 成人动漫视频在线| 亚洲国产精品av| 成人短视频下载| 亚洲欧美色图小说| 91蜜桃在线观看| 亚洲精品伦理在线| 欧美午夜电影在线播放| 亚洲一区二区四区蜜桃| 欧美午夜免费电影| 亚洲国产综合91精品麻豆| 在线观看日韩精品| 亚洲高清视频在线| 欧美一区二区三区四区在线观看 | 美脚の诱脚舐め脚责91 | 97se亚洲国产综合自在线不卡| 欧美日韩一级二级| 亚洲第一福利视频在线| 欧美日韩国产首页| 捆绑变态av一区二区三区| 精品国产一区二区三区四区四| 精品在线播放免费| 国产精品天干天干在线综合| 91同城在线观看| 日日摸夜夜添夜夜添亚洲女人| 日韩一卡二卡三卡国产欧美| 精品午夜一区二区三区在线观看| 26uuuu精品一区二区| 99视频精品在线| 亚洲影院免费观看| 欧美成人a在线| eeuss鲁一区二区三区| 亚洲午夜在线电影| 欧美一区二区三区免费在线看| 精品一区二区三区影院在线午夜| 国产日韩综合av| 国产.精品.日韩.另类.中文.在线.播放 | 99精品欧美一区| 婷婷国产v国产偷v亚洲高清| 26uuu国产电影一区二区| 91免费在线看| 久久99精品久久久久久国产越南| 18成人在线视频| 欧美一区二区三区不卡| 本田岬高潮一区二区三区| 亚洲福利视频一区| 久久久精品免费观看| 精品视频123区在线观看| 国产精品一区二区三区乱码| 亚洲风情在线资源站| 国产喷白浆一区二区三区| 欧美日韩一区在线| 不卡视频免费播放| 免费在线观看不卡| 亚洲一区中文在线| 国产欧美精品一区aⅴ影院| 欧美一区二区三区四区在线观看| 97久久精品人人爽人人爽蜜臀 | 一二三四区精品视频| 26uuu国产电影一区二区| 欧美日韩一区中文字幕| av欧美精品.com| 久久精品二区亚洲w码| 一区二区理论电影在线观看| 国产日韩av一区二区| 欧美一级电影网站| 欧美日韩一区二区在线视频| thepron国产精品| 国产精品一线二线三线精华| 图片区小说区国产精品视频| 亚洲欧美日韩国产中文在线| 国产日韩欧美在线一区| 精品国产凹凸成av人导航| 在线电影国产精品| 欧美日韩在线观看一区二区 | 成人午夜激情片| 国产真实乱偷精品视频免| 免费国产亚洲视频| 日本不卡123| 免费欧美日韩国产三级电影| 日产国产欧美视频一区精品| 日韩成人一级片| 日本中文字幕一区二区有限公司| 亚洲成人免费看| 亚洲va欧美va人人爽午夜| 亚洲第一激情av| 视频在线在亚洲| 青青草国产成人av片免费| 日韩电影免费一区| 久久精品国产免费| 国产精品一区2区| 成人午夜免费电影| 色综合久久综合网97色综合| 一本久久a久久精品亚洲| 在线免费观看日本欧美| 欧美性猛交xxxxxx富婆| 欧美日韩中文一区| 欧美乱妇23p| 精品第一国产综合精品aⅴ| 精品va天堂亚洲国产| 国产亚洲短视频| 亚洲欧洲成人自拍| 亚洲在线中文字幕| 免费久久精品视频| 国产成人午夜片在线观看高清观看| 丁香另类激情小说| 一本久道久久综合中文字幕 | 美女视频一区在线观看| 国内成+人亚洲+欧美+综合在线| 国产精品18久久久久久久久久久久| 盗摄精品av一区二区三区| 91亚洲精品一区二区乱码| 欧美精品自拍偷拍动漫精品| 精品国偷自产国产一区| 日韩伦理av电影| 日日摸夜夜添夜夜添精品视频 | 色婷婷av一区二区| 欧美一级高清片| 中文字幕一区在线| 天堂av在线一区| 国产精品亚洲а∨天堂免在线| 91亚洲永久精品| 精品三级在线看| 亚洲日本丝袜连裤袜办公室| 日本亚洲最大的色成网站www| 国产 日韩 欧美大片| 欧美午夜视频网站| 国产日韩欧美一区二区三区综合| 亚洲精品国产视频| 国产精品一区三区| 欧美日韩免费在线视频| 久久综合成人精品亚洲另类欧美 | 国产精品乱码妇女bbbb| 亚洲成av人片观看| 成人午夜电影久久影院| 欧美日本一道本在线视频| 中文字幕一区日韩精品欧美| 日韩和欧美的一区| 成人激情黄色小说| 欧美va天堂va视频va在线| 亚洲综合在线第一页| 国产成人一级电影| 欧美一区二区三区不卡| 亚洲综合丁香婷婷六月香| 国产成+人+日韩+欧美+亚洲| 日韩午夜三级在线| 亚洲aⅴ怡春院| 99视频精品在线| 中文字幕av一区二区三区免费看| 日本不卡不码高清免费观看| 欧美视频一区二区三区| 国产精品乱码妇女bbbb| 国产精品888| 精品国产一区二区三区忘忧草 | 亚洲一区二区在线视频| 99久久婷婷国产综合精品 | 99久久久国产精品免费蜜臀| 久久免费国产精品 | 日本v片在线高清不卡在线观看| 91在线精品一区二区| 国产日韩欧美精品综合| 国产一区二区三区免费在线观看| 6080国产精品一区二区| 天天影视色香欲综合网老头| 欧美性淫爽ww久久久久无| 最新日韩av在线| 91视频国产资源| 亚洲免费在线电影| 色综合久久久久综合99| 亚洲激情图片一区| 日本精品视频一区二区三区| 亚洲综合免费观看高清完整版| 91丨porny丨国产入口| 五月激情丁香一区二区三区| 777久久久精品|