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

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

?? scheduler.h

?? Linux下比較早的基于命令行的DVD播放器
?? H
字號:
//// Copyright (c) 2003 by Istv醤 V醨adi//// This file is part of dxr3Player, a DVD player written specifically // for the DXR3 (aka Hollywood+) decoder card.// This program 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 of the License, or// (at your option) any later version.//// This program 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 this program; if not, write to the Free Software// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA#ifndef DXR3PLAYER_SCHED_SCHEDULER_H#define DXR3PLAYER_SCHED_SCHEDULER_H//------------------------------------------------------------------------------#include "Schedulable.h"#include "util/DefaultAllocator.h"#include "util/FileDescriptor.h"#include "types.h"#include <vector>#include <set>#include <cassert>//------------------------------------------------------------------------------namespace sched {//------------------------------------------------------------------------------class Schedulable;class FDWaitCondition;//------------------------------------------------------------------------------/** * The scheduler. It is a singleton. Get the instance using Scheduler::get(). */class Scheduler{private:    /**     * The type for file descriptor-based wait conditions     */    typedef std::set<FDWaitCondition*, std::less<FDWaitCondition*>, DefaultAllocator> fdWaitConditions_t;    /**     * The pair to store schedulables in.     */    typedef std::pair<Schedulable*, bool> schedulableInfo_t;    /**     * Allocator for schedulables.     */    typedef DefaultAllocatorTemplate<schedulableInfo_t> SchedulableAllocator;    /**     * The type for schedulables.     */    typedef std::vector<schedulableInfo_t, SchedulableAllocator> schedulables_t;public:    /**     * Initialize the instance.     */    static void initialize(size_t stackSize = 128 * 1024);    /**     * Get the instance. Can be called only after an initialize().     */    static Scheduler& get();    /**     * Determine if the current thread is interrupted or not.     */    static bool isInterrupted();    /**     * Call continueBurst() on the current Schedulable     *     * @see Schedulable::continueBurst     */    static void continueBurst(const char* ownerName);    /**     * Call yield() on the current Schedulable     *     * @see Schedulable::yield     */    static void yield(const char* ownerName);        /**     * Call sleep() on the current Schedulable     *     * @see Schedulable::yield     */    static void sleep(const char* ownerName,                      millis_t timeout = INVALID_MILLIS);        /**     * Call sleepInterruptible() on the current Schedulable     *     * @see Schedulable::yield     */    static void sleepInterruptible(const char* ownerName,                                   millis_t timeout = INVALID_MILLIS);        /**     * Call wait() on the current Schedulable     *     * @see Schedulable::wait     */    static bool wait(WaitCondition& cond, millis_t timeout = INVALID_MILLIS);        /**     * Call waitInterruptible() on the current Schedulable     *     * @see Schedulable::wait     */    static bool waitInterruptible(WaitCondition& cond, millis_t timeout = INVALID_MILLIS);    private:    /**     * The only instance.     */    static Scheduler* instance;        /**     * The Schedulable running currently.     */    static Schedulable* currentSchedulable;    /**     * The top of the stack of the next Schedulable.     */    char* nextStackTop;    /**     * The stack state of the scheduler.     */    jmp_buf state;    /**     * The schedulables.     */    schedulables_t schedulables;    /**     * The file descriptor-based wait conditions     */    fdWaitConditions_t fdWaitConditions;    /**     * The start clock.     */    long startClock;    /**     * Construct the scheduler.     */    Scheduler(size_t stackSize);public:    /**     * Run the scheduler.     */    void run();    /**     * Print the status of the scheduler and the schedulables.     */    void printStatus();    /**     * Signal all schedulables to quit.     */    void quit() const;private:    /**     * Add the given schedulable.     *     * @return the bottom of the next stack     */    char* addSchedulable(Schedulable* schedulable, size_t stackSize);    /**     * Add the given file descriptor-based wait condition.     */    void addFDWaitCondition(FDWaitCondition* cond);    /**     * Remove the given file descriptor-based wait condition.     */    void removeFDWaitCondition(FDWaitCondition* cond);    /**     * Get the earliest time a schedulabe times out.      *     * @return the earliest time, or 0 if there is at least one     * schedulable, that is runnable at once.     */    millis_t getEarliestTime() const;        /**     * Get the file descriptors to watch.     *     * @return the largest file descriptor, or -1 if no file     * descriptor should be watched.     */    int getFileDescriptors(fd_set& readFDs, fd_set& writeFDs) const;    /**     * Set the file descriptor-based wait conditions for the file     * descriptors that are available.     */    void setFileDescriptors(const fd_set& readFDs,                            const fd_set& writeFDs) const;    /**     * Set the runnability of the schedulables.     */    void setRunnability();    /**     * Run the runnable schedulables.     */    void runRunnables();    /**     * Resume the scheduler.     */    void resume();    /**     * Run the schedulable.     */    void runSchedulable(Schedulable* schedulable);    friend class Schedulable;    friend class FDWaitCondition;};//------------------------------------------------------------------------------// Inline definitions//------------------------------------------------------------------------------inline Scheduler& Scheduler::get(){    assert(instance!=0);    return *instance;}//------------------------------------------------------------------------------inline bool Scheduler::isInterrupted(){    assert(currentSchedulable!=0);    return currentSchedulable->isInterrupted();}    //------------------------------------------------------------------------------inline void Scheduler::continueBurst(const char* ownerName){    assert(currentSchedulable!=0);    currentSchedulable->continueBurst(ownerName);}//------------------------------------------------------------------------------inline void Scheduler::yield(const char* ownerName){    assert(currentSchedulable!=0);    currentSchedulable->yield(ownerName);}    //------------------------------------------------------------------------------inline void Scheduler::sleep(const char* ownerName, millis_t timeout){    assert(currentSchedulable!=0);    currentSchedulable->sleep(ownerName, timeout);}    //------------------------------------------------------------------------------inline void Scheduler::sleepInterruptible(const char* ownerName, millis_t timeout){    assert(currentSchedulable!=0);    currentSchedulable->sleepInterruptible(ownerName, timeout);}    //------------------------------------------------------------------------------inline bool Scheduler::wait(WaitCondition& cond, millis_t timeout){    assert(currentSchedulable!=0);    return currentSchedulable->wait(cond, timeout);}//------------------------------------------------------------------------------inline bool Scheduler::waitInterruptible(WaitCondition& cond, millis_t timeout){    assert(currentSchedulable!=0);    return currentSchedulable->waitInterruptible(cond, timeout);}//------------------------------------------------------------------------------inline void Scheduler::resume(){    longjmp(state, 0);}//------------------------------------------------------------------------------} /* namespace sched *///------------------------------------------------------------------------------#endif // DXR3PLAYER_SCHED_SCHEDULER_H// Local variables:// mode: c++// End:

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99久久婷婷国产综合精品| thepron国产精品| 日韩精品乱码免费| 亚洲一卡二卡三卡四卡五卡| 亚洲欧美另类图片小说| 国产精品国产成人国产三级| 中文字幕人成不卡一区| 亚洲欧美在线视频观看| 亚洲男人的天堂在线aⅴ视频| 亚洲三级免费观看| 亚洲精品视频免费观看| 一区二区三区在线视频免费| 亚洲综合一二区| 五月婷婷久久综合| 日韩av成人高清| 久久99精品视频| 狠狠色丁香婷综合久久| 国产激情视频一区二区三区欧美 | 日韩欧美一二三区| 欧美电视剧免费全集观看| www激情久久| 国产精品免费网站在线观看| 亚洲人成小说网站色在线 | 一本色道久久综合亚洲aⅴ蜜桃 | 欧美精品日日鲁夜夜添| 在线播放日韩导航| 日韩美女天天操| 欧美国产一区视频在线观看| 亚洲女人****多毛耸耸8| 亚洲一区二区三区四区在线免费观看| 性做久久久久久久免费看| 蜜桃一区二区三区在线观看| 国产真实乱子伦精品视频| k8久久久一区二区三区| 欧美午夜影院一区| 精品久久久久一区| 亚洲女厕所小便bbb| 丝袜诱惑亚洲看片| 国产69精品久久99不卡| 一本色道综合亚洲| 日韩欧美国产精品| 亚洲图片激情小说| 免费看日韩精品| 成人福利在线看| 欧美日韩国产色站一区二区三区| 精品剧情v国产在线观看在线| 国产精品麻豆欧美日韩ww| 亚洲bt欧美bt精品| 国产91富婆露脸刺激对白| 在线观看日韩电影| 久久久www免费人成精品| 亚洲激情综合网| 国产一区视频网站| 欧洲激情一区二区| 2023国产一二三区日本精品2022| 亚洲欧美成aⅴ人在线观看| 美女mm1313爽爽久久久蜜臀| 91在线丨porny丨国产| 日韩一区二区在线看片| 亚洲欧美视频在线观看| 久久激情五月婷婷| 欧美性色综合网| 亚洲国产成人午夜在线一区| 日韩av一二三| 在线视频欧美精品| 中文字幕成人av| 免费的国产精品| 欧美亚洲日本一区| 中文成人av在线| 精品影院一区二区久久久| 欧美私人免费视频| 国产精品乱码一区二区三区软件| 欧美日精品一区视频| 国产精品美女久久久久aⅴ国产馆| 日本欧洲一区二区| 欧美午夜精品久久久久久孕妇| 国产精品丝袜久久久久久app| 六月婷婷色综合| 欧美年轻男男videosbes| 亚洲欧洲一区二区三区| 国产精品88av| 精品国产伦一区二区三区观看体验| 亚洲一区在线电影| 97精品国产露脸对白| 亚洲国产成人私人影院tom| 狠狠色综合播放一区二区| 555www色欧美视频| 亚洲成人免费视| 日本道在线观看一区二区| 国产精品久久久久久亚洲伦| 国产精品99久久久久久宅男| 26uuu精品一区二区三区四区在线 26uuu精品一区二区在线观看 | 在线观看91av| 亚洲第一av色| 欧美在线观看一二区| 亚洲欧美日韩国产综合| 91视频一区二区三区| 国产精品护士白丝一区av| 丁香婷婷综合激情五月色| 久久久另类综合| 国产精品99久久久久| 亚洲精品一区二区在线观看| 久久精品理论片| 精品免费国产二区三区| 麻豆精品视频在线| 欧美成人aa大片| 激情偷乱视频一区二区三区| 555www色欧美视频| 久久精品国产亚洲a| 欧美mv和日韩mv国产网站| 久久精品免费看| 久久伊99综合婷婷久久伊| 国产一区二区三区在线观看免费 | 国产丝袜在线精品| 国产激情视频一区二区在线观看 | 欧美国产激情二区三区| 成人av资源站| 亚洲码国产岛国毛片在线| 欧美在线观看禁18| 丝袜亚洲另类欧美| 精品嫩草影院久久| k8久久久一区二区三区 | 高清免费成人av| 一区二区中文视频| 欧美日韩极品在线观看一区| 日产国产欧美视频一区精品| 精品久久久久久综合日本欧美| 国产盗摄一区二区三区| 亚洲视频1区2区| 欧美三片在线视频观看| 久久66热偷产精品| 国产精品久线在线观看| 欧洲激情一区二区| 精品在线播放免费| ...xxx性欧美| 91精品国产日韩91久久久久久| 精品在线播放免费| 亚洲男同1069视频| 欧美一区二区三区性视频| 国产福利一区二区三区视频在线| 亚洲欧洲99久久| 在线播放中文一区| 成人app网站| 午夜久久久久久久久| 久久亚洲精品小早川怜子| 色哟哟亚洲精品| 蜜臀va亚洲va欧美va天堂| 日本一区二区高清| 欧美日韩久久不卡| 国产馆精品极品| 午夜日韩在线观看| 亚洲国产精品99久久久久久久久| 欧美午夜精品一区二区三区| 国产成人午夜精品影院观看视频| 樱桃国产成人精品视频| 日韩欧美亚洲另类制服综合在线| 成人激情动漫在线观看| 亚洲成a人片在线观看中文| 国内精品视频666| 欧美一区二区福利在线| 成人精品国产一区二区4080| 亚洲成a人片综合在线| 国产蜜臀av在线一区二区三区| 欧美日韩一区二区三区免费看| 国产一区美女在线| 午夜欧美在线一二页| 国产精品久久综合| 欧美日韩大陆在线| 欧美在线观看视频在线| 福利一区在线观看| 国产一区视频在线看| 一区二区三区中文字幕在线观看| 欧美日韩精品系列| 成人综合在线观看| 亚洲视频一区二区免费在线观看| eeuss鲁片一区二区三区在线看| 国产片一区二区| 黑人巨大精品欧美一区| 国产日韩精品久久久| 国产自产v一区二区三区c| 亚洲综合一区二区三区| 国产欧美一区二区精品秋霞影院| 裸体在线国模精品偷拍| 欧美一区二区三区在线观看 | 欧美自拍偷拍一区| 最新成人av在线| 欧美又粗又大又爽| 亚洲国产精品影院| 欧美人成免费网站| 久久99日本精品| 国产精品免费丝袜| 欧美日韩视频在线第一区| 日本中文字幕一区| 久久久影视传媒| 欧美最猛性xxxxx直播| 麻豆成人久久精品二区三区红 | 久久青草欧美一区二区三区| 欧美最新大片在线看| 国产精品自拍在线| 夜夜嗨av一区二区三区网页|