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

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

?? bsp_file.c

?? 量子編程源代碼 量子編程源代碼
?? C
字號:
/****************************************************************************** Product: QDPP example, 80x86, Win32, Visual C++ 6.0* Last Updated for Version: 3.4.00* Date of the Last Update:  Sep 03, 2007**                    Q u a n t u m     L e a P s*                    ---------------------------*                    innovating embedded systems** Copyright (C) 2002-2007 Quantum Leaps, LLC. All rights reserved.** This software may be distributed and modified under the terms of the GNU* General Public License version 2 (GPL) as published by the Free Software* Foundation and appearing in the file GPL.TXT included in the packaging of* this file. Please note that GPL Section 2[b] requires that all works based* on this software must also be made publicly available under the terms of* the GPL ("Copyleft").** Alternatively, this software may be distributed and modified under the* terms of Quantum Leaps commercial licenses, which expressly supersede* the GPL and are specifically designed for licensees interested in* retaining the proprietary status of their code.** Contact information:* Quantum Leaps Web site:  http://www.quantum-leaps.com* e-mail:                  info@quantum-leaps.com*****************************************************************************/#include "qf_port.h"#include "qs_port.h"#include "qassert.h"#include "qdpp.h"#include <stdlib.h>#include <stdio.h>#include <sys/select.h>#include <termios.h>#include <unistd.h>Q_DEFINE_THIS_FILE/*--------------------------------------------------------------------------*/#ifdef Q_SPYstatic FILE *l_qsFile;enum QSQHsmTstRecords {    QS_QDPP_DISPLAY = QS_USER};uint8_t QS_init(void const *arg) {    static uint8_t qsBuf[1024];                /* 1K buffer for Quantum Spy */    QS_initBuf(qsBuf, sizeof(qsBuf));    l_qsFile = fopen((char const *)arg, "wb");              /* write binary */    return (uint8_t)(l_qsFile != (FILE *)0);}/*..........................................................................*/void QS_exit(void) {    if (l_qsFile != (FILE *)0) {        fclose(l_qsFile);    }}/*..........................................................................*/#define QS_DUMP() do { \    uint16_t nBytes = 1000; \    uint8_t const *block = QS_getBlock(&nBytes); \    if (block != (uint8_t *)0) { \        fwrite(block, 1, nBytes, l_qsFile); \    } \} while (0)/*..........................................................................*/void QS_flush(void) {    uint32_t nBytes = 1000;    uint8_t const *block;    while ((block = QS_getBlock(&nBytes)) != (uint8_t *)0) {        fwrite(block, 1, nBytes, l_qsFile);        nBytes = 1000;    }}/*..........................................................................*/QSTimeCtr QS_getTime(void) {    return (QSTimeCtr)QF_getTime();}#endif                                                             /* Q_SPY *//*--------------------------------------------------------------------------*/static void *idleThread(void *me) {      /* the expected P-Thread signature */    struct timeval timeout = { 0 };                 /* timeout for select() */    struct termios tio;                     /* modified terminal attributes */    tcgetattr(0, &tio);           /* obtain the current terminal attributes */    tio.c_lflag &= ~(ICANON | ECHO);   /* disable the canonical mode & echo */    tcsetattr(0, TCSANOW, &tio);                  /* set the new attributes */    while (QF_running_) {        fd_set con;                      /* FD set representing the console */        FD_ZERO(&con);        FD_SET(0, &con);        timeout.tv_usec = 8000;        /* sleep for the full tick or until a console input arrives, NOTE01 */        if (0 != select(1, &con, 0, 0, &timeout)) {  /* any descriptor set? */            char ch;            read(0, &ch, 1);            if (ch == '\33') {                              /* ESC pressed? */                QF_publish(Q_NEW(QEvent, TERMINATE_SIG));            }        }        QS_DUMP();                         /* dump a chunk of QS trace data */    }    return (void *)0;                                     /* return success */}/*..........................................................................*/void BSP_init(int argc, char *argv[]) {    pthread_attr_t attr;    struct sched_param param;    pthread_t idle;    char const *hostAndPort = "qs.bin";    if (argc > 1) {                                      /* port specified? */        hostAndPort = argv[1];    }    if (!QS_INIT(hostAndPort)) {        printf("\nUnable to open QSpy socket\n");        exit(-1);    }    pthread_attr_init(&attr);    /* SCHED_FIFO corresponds to real-time preemptive priority-based scheduler    * NOTE: This scheduling policy requires the superuser priviledges    */    pthread_attr_setschedpolicy(&attr, SCHED_FIFO);    param.sched_priority = sched_get_priority_min(SCHED_FIFO);    pthread_attr_setschedparam(&attr, &param);    pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);    if (pthread_create(&idle, &attr, &idleThread, 0) != 0) {               /* Creating the p-thread with the SCHED_FIFO policy failed.               * Most probably this application has no superuser privileges,               * so we just fall back to the default SCHED_OTHER policy               * and priority 0.               */        pthread_attr_setschedpolicy(&attr, SCHED_OTHER);        param.sched_priority = 0;        pthread_attr_setschedparam(&attr, &param);        Q_ALLEGE(pthread_create(&idle, &attr, &idleThread, 0) == 0);    }    pthread_attr_destroy(&attr);}/*..........................................................................*/void displyPhilStat(uint8_t n, char const *stat) {    printf("Philosopher %2d is %s\n", (int)n, stat);    QS_BEGIN(QS_QDPP_DISPLAY, QS_apObj_);        QS_U8(1, n);        QS_STR(stat);    QS_END();}/*..........................................................................*/void Q_assert_handler(char const *file, int line) {    fprintf(stderr, "Assertion failed in %s, line %d", file, line);    QF_exit();}/******************************************************************************* NOTE01:* The select() system call seems to deliver the finest time granularity of* 1 clock tick. The timeout value passed to select() is rounded up to the* nearest tick (10 ms on desktop Linux). The timeout cannot be too short,* because the system might choose to busy-wait for very short timeouts.* An alternative, POSIX nanosleep() system call seems to deliver only 20ms* granularity.** Here the select() call is used not just as a fairly portable way to sleep* with subsecond precision. The select() call is also used to detect any* characters typed on the console.** Also according to man pages, on Linux, the function select() modifies* timeout to reflect the amount of time not slept; most other implementations* do not do this. This causes problems both when Linux code which reads* timeout is ported to other operating systems, and when code is ported to* Linux that reuses a struct timeval for multiple selects in a loop without* reinitializing it. Here the microsecond part of the structure is re-* initialized before each select() call.*/

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲国产成人自拍| 久久er精品视频| 91精品国产综合久久久久久| 色综合天天视频在线观看| 国产乱子伦视频一区二区三区 | 欧美日韩一二三区| 97se亚洲国产综合自在线观| 成人视屏免费看| 91福利小视频| 日韩亚洲欧美一区| 国产免费成人在线视频| 亚洲少妇30p| 热久久国产精品| 国产精一区二区三区| 成人国产在线观看| 欧美日韩成人一区| 国产亚洲欧美在线| 国产精品久久久久久久久免费樱桃| 中文字幕第一区| 久久av中文字幕片| 欧美日韩国产美| 欧美国产一区二区| 麻豆国产欧美日韩综合精品二区| 国产成人一级电影| 久久久久久**毛片大全| 一区二区免费看| 91国偷自产一区二区三区观看| 欧美一级日韩不卡播放免费| 亚洲男人天堂av网| 99久久伊人精品| 国产精品久久久久久久久动漫| 久久精品二区亚洲w码| 91精品一区二区三区在线观看| 亚洲欧美另类小说| 欧美午夜影院一区| 午夜在线成人av| 日韩欧美一二三四区| 国产综合久久久久影院| 欧美mv日韩mv| 波多野结衣在线aⅴ中文字幕不卡| www国产成人| av在线不卡电影| 亚洲国产精品久久人人爱蜜臀| 91网址在线看| 麻豆91在线看| 日韩一区欧美一区| 欧美一二三四区在线| 国产精品自拍在线| 一色桃子久久精品亚洲| 欧美日韩国产123区| 成人精品在线视频观看| 一区二区成人在线观看| 欧美一级片免费看| 91国产免费观看| 国产九色精品成人porny| 亚洲精品国产无套在线观| 7777精品久久久大香线蕉| 成人动漫一区二区在线| 日本大胆欧美人术艺术动态 | 色综合咪咪久久| 久久99国产精品免费| 中文字幕在线播放不卡一区| 欧美日韩国产电影| 日本电影亚洲天堂一区| 成人免费视频app| 精品一区二区三区免费| 国产麻豆精品在线观看| 亚洲一区二区精品3399| 懂色一区二区三区免费观看| 成人黄色软件下载| 一区免费观看视频| 337p日本欧洲亚洲大胆精品| 在线精品视频小说1| 国产福利精品一区二区| 一级女性全黄久久生活片免费| 色欧美片视频在线观看 | 欧美亚洲图片小说| 一本色道久久加勒比精品| 7777精品伊人久久久大香线蕉经典版下载| 精品久久国产老人久久综合| ...av二区三区久久精品| 美女网站色91| 欧美一级理论性理论a| 亚洲国产日韩综合久久精品| 国产一区二区调教| 久久综合九色综合久久久精品综合| 亚洲美女一区二区三区| aaa国产一区| 一区二区免费在线播放| 欧美日韩精品一区二区三区蜜桃| 亚洲成人精品一区二区| 欧美日韩亚洲高清一区二区| 五月天网站亚洲| 精品国产一区二区在线观看| 国产一区二区主播在线| 国产精品三级av| 欧美日韩一区不卡| 免费高清视频精品| 国产精品午夜春色av| 92精品国产成人观看免费 | 色吊一区二区三区| 丝袜美腿成人在线| 中文字幕第一区第二区| 91在线播放网址| 蜜臀久久99精品久久久画质超高清 | 国产在线麻豆精品观看| 欧美韩日一区二区三区四区| 色香蕉成人二区免费| 奇米综合一区二区三区精品视频| 2欧美一区二区三区在线观看视频| 国产成人av自拍| 午夜精品久久久久久久| 日本一区免费视频| 欧美高清激情brazzers| 成人一二三区视频| 日本视频一区二区| 亚洲裸体在线观看| 精品成人一区二区三区四区| 一本色道久久综合亚洲91| 久久精品理论片| 亚洲综合激情小说| 中文字幕av资源一区| 在线电影国产精品| 91麻豆精东视频| 国产成人一级电影| 激情欧美一区二区| 性做久久久久久久久| 国产精品看片你懂得| 欧美mv日韩mv国产| 欧美日韩国产一区二区三区地区| 国产69精品一区二区亚洲孕妇| 一个色在线综合| 亚洲图片欧美激情| 久久久久久电影| 日韩一区二区在线观看视频| 欧美在线观看视频一区二区 | 午夜精品久久久久久久蜜桃app| 国产清纯白嫩初高生在线观看91| 欧美精品欧美精品系列| 欧美在线综合视频| 色琪琪一区二区三区亚洲区| 波多野结衣亚洲一区| 懂色av一区二区三区蜜臀| 久久精品国产999大香线蕉| 午夜精品在线看| 亚洲高清一区二区三区| 亚洲激情图片一区| 亚洲精品美国一| 有坂深雪av一区二区精品| 亚洲视频一区在线| 一区二区不卡在线播放| 亚洲欧美激情在线| 亚洲午夜久久久| 天堂资源在线中文精品| 天天色天天爱天天射综合| 天天综合色天天| 亚洲电影在线免费观看| 亚洲综合色成人| 亚洲午夜久久久久久久久久久| 亚洲最新在线观看| 日本一区中文字幕| 久久不见久久见免费视频7| 韩国成人精品a∨在线观看| 玖玖九九国产精品| 韩日欧美一区二区三区| 国产成人精品免费网站| 99国产精品久| 欧美日韩亚洲综合一区二区三区| 欧美天天综合网| 欧美一区二区三区视频在线观看| 欧美一区二区三区电影| 久久亚洲精品小早川怜子| 国产精品国产成人国产三级| 亚洲品质自拍视频| 人人爽香蕉精品| 国产福利一区二区三区视频| 国产凹凸在线观看一区二区| 播五月开心婷婷综合| 欧美日韩成人在线| 国产三级三级三级精品8ⅰ区| 成人欧美一区二区三区小说| 亚洲成人久久影院| 懂色av中文一区二区三区| 在线亚洲欧美专区二区| 精品久久人人做人人爽| 国产精品久久久久久亚洲伦| 亚洲电影你懂得| 国产91在线观看丝袜| 欧美日韩精品系列| 国产精品久久久久三级| 婷婷夜色潮精品综合在线| 国产ts人妖一区二区| 欧美日韩国产影片| 中文字幕一区在线观看| 午夜成人免费电影| 91视频观看视频| 久久久久久电影| 乱中年女人伦av一区二区| 972aa.com艺术欧美| 久久久久久免费毛片精品|