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

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

?? sharedqt.cc

?? vxworks中的demo
?? CC
字號:
// sharedQT.cc - SharedQT<T> class method templates// Copyright 1998-2010 Wind River Systems, Inc.//// modification history// --------------------// 02a,30mar98,pai  added Wind River coding conventions// 01a,24mar98,pai  written////// DESCRIPTION// This class provides the following public methods:////            -sharedEnQ//            -sharedDeQ//            -sharedEmptyQ//            -sharedFullQ//            -sharedCountQ//// This is a very basic shared queue template.  The type stored in the queue// and the maximum number of elements to be stored in the queue are specified// when the object is constructed.  For example:////     SharedQT<int> myQ (10);//// will construct a queue which can hold up to 10 integers.  If a queue size// is not specified during construction, the queue will use a default size of// 50 items.//// This class is essentially a very thin wrapper around the QueueT<T> class.// As the class name implies, the intent behind the sharedQT<T> class is to// provide a thread safe container.  QueueT<T> does not provide a mutual// exclusion mechanism.  SharedQT<T> attempts to make QueueT<T> thread safe// by guarding calls to QueueT<T> methods with a mutex semaphore.//// It is assumed that multiple tasks will be trying to read from and write to// a SharedQT<T> object.  A single mutex semaphore insures that when one task// is in the middle of some queue operation, another task will not preempt the// operation at an inappropriate moment.//// SharedQT<T>::SharedQT initializes the object's mutex semaphore using// SEM_Q_PRIORITY and SEM_DELETE_SAFE options.  Pended task will be put on the// ready queue on the basis of priority, and a task which owns the semaphore// will be safe from unexpected deletion.  The SEM_DELETE_SAFE enables an// implicit taskSafe() for each semTask(), and an implicit taskUnsafe() for// each semGive().//// INCLUDE FILES:  sharedQT.h////////////////////////////////////////////////////////////////////////////////////// SharedQT<T>::SharedQT - construct a SharedQT<T> object//// There is but one constructor in this class.  After the base class// constructor is called, this constructor will initialize the mutex semaphore.//// If an argument, qs, is supplied to this constructor, the queue will be// constructed to hold up to 'qs' number of elements.  If no argument is// supplied to the constructor, the queue will, by default, allow up to 50// items to be stored in the queue.//// RETURNS:  N/A//template <class Item>SharedQT<Item>::SharedQT (int qs) : QueueT<Item> (qs)    {     sharedQMutx = semMCreate (SEM_Q_PRIORITY | SEM_DELETE_SAFE);     }//////////////////////////////////////////////////////////////////////////////////// SharedQT<T>::~SharedQT - destroy a shared queue object//// This destructor deletes the mutex semaphore.  The base class destructor// will delete all of the memory allocated for queue items.//// RETURNS:  N/A//template <class Item>SharedQT<Item>::~SharedQT ()    {    // It is a good idea to own a semaphore you intend to delete    semTake (sharedQMutx, WAIT_FOREVER);        // QueueT<T>::~QueueT is virtual; it will take care of    // deleting memory allocated to hold items in the queue.    semDelete (sharedQMutx);    }//////////////////////////////////////////////////////////////////////////////////// SharedQT<T>::sharedEnQ - add an item to a shared queue//// This method will attempt to take an internal semaphore before adding// an item to the queue.  The argument passed to this method should be// a reference to the type specified when the shared queue was constructed.//// RETURNS:  True, if the item was added to the queue.  False is returned//           to indicate that the item could not be added to the queue.//template <class Item>Bool SharedQT<Item>::sharedEnQ (const Item & item)    {    Bool status;    //// GUARD ////    semTake (sharedQMutx, WAIT_FOREVER);    ///////////////        status = enQueue (item);    semGive (sharedQMutx);    return status;    }//////////////////////////////////////////////////////////////////////////////////// SharedQT<T>::sharedDeQ - remove an item from a shared queue//// This method will remove an item from a shared queue and delete the memory// allocated to store the item.  The dequeued item is placed in the argument// for this method.  The method will not attempt to remove an item until it// has taken an internal semaphore.//// RETURNS:  True, if the item was dequeued.  False is returned to indicate//           that an item could not be dequeued.// template <class Item>Bool SharedQT<Item>::sharedDeQ (Item & item)    {    Bool status;    //// GUARD ////    semTake (sharedQMutx, WAIT_FOREVER);    ///////////////        status = deQueue (item);    semGive (sharedQMutx);    return status;    }//////////////////////////////////////////////////////////////////////////////////// SharedQT<T>::sharedEmptyQ - test for an empty shared queue//// This method tests a shared queue for an empty state.//// RETURNS:  True, if the shared queue is empty.  False is returned to//           indicate that the queue is not empty.//template <class Item>Bool SharedQT<Item>::sharedEmptyQ () const    {    Bool status;    //// GUARD ////    semTake (sharedQMutx, WAIT_FOREVER);    ///////////////    status = emptyQueue ();    semGive (sharedQMutx);    return status;    }//////////////////////////////////////////////////////////////////////////////////// SharedQT<T>::sharedFullQ - test for a full shared queue//// This method tests for a full queue. //// RETURNS:  True, if the queue is full.  False is returned to indicate that//           the queue is not full.//template <class Item>Bool SharedQT<Item>::sharedFullQ () const    {    Bool status;    //// GUARD ////    semTake (sharedQMutx, WAIT_FOREVER);    ///////////////    status = fullQueue ();    semGive (sharedQMutx);    return status;    }//////////////////////////////////////////////////////////////////////////////////// SharedQT<T>::sharedCountQ - return the number of items in a shared queue//// This method will return the number of items currently stored in a queue.//// RETURNS:  The number of elements in the queue.//template <class Item>int SharedQT<Item>::sharedCountQ () const    {    int sharedCount;    //// GUARD ////    semTake (sharedQMutx, WAIT_FOREVER);    ///////////////    sharedCount = countQueue ();        semGive (sharedQMutx);    return sharedCount;    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧洲一区在线观看| 午夜精品视频一区| 亚洲成a人片在线不卡一二三区 | 国产成人8x视频一区二区| 96av麻豆蜜桃一区二区| 欧美成人在线直播| 水野朝阳av一区二区三区| 99久久er热在这里只有精品15 | 在线不卡a资源高清| 国产精品你懂的在线欣赏| 蜜桃在线一区二区三区| 91国产免费看| 亚洲三级电影全部在线观看高清| 精品综合免费视频观看| 欧美一级艳片视频免费观看| 一区二区三区资源| av一二三不卡影片| 久久久精品蜜桃| 国产精品系列在线观看| 91精品国产色综合久久ai换脸 | 精品视频在线免费看| 国产精品久久影院| 成人免费看视频| 久久亚洲精品小早川怜子| 久久精品999| 这里只有精品视频在线观看| 久草在线在线精品观看| 8x福利精品第一导航| 亚洲成a人片在线观看中文| 在线视频你懂得一区二区三区| 成人欧美一区二区三区视频网页| 国产精品亚洲第一区在线暖暖韩国| 亚洲精品一区二区三区影院| 日本不卡视频在线| 精品少妇一区二区三区在线播放 | 日本伊人色综合网| 欧美日韩成人综合| 日本午夜一本久久久综合| 在线播放91灌醉迷j高跟美女 | 成人午夜伦理影院| 国产精品不卡在线| 在线观看日韩av先锋影音电影院| 亚洲蜜臀av乱码久久精品| 91老师国产黑色丝袜在线| 亚洲免费观看高清完整版在线观看| 一本一道久久a久久精品| 一区二区三区在线免费观看| 精品视频色一区| 免费的国产精品| 国产亚洲短视频| 97se亚洲国产综合在线| 天天操天天色综合| 久久综合国产精品| 91小视频在线免费看| 一区二区三区不卡在线观看| 在线不卡中文字幕播放| 国产一区二区0| 亚洲精品视频免费看| 欧美精品一二三| 国产福利精品一区| 偷拍自拍另类欧美| 国产视频在线观看一区二区三区| 一本大道久久a久久综合婷婷| 亚洲图片自拍偷拍| 国产欧美日韩综合| 欧美专区日韩专区| 国产成人在线视频网址| 一区二区免费在线| 久久综合色鬼综合色| caoporn国产一区二区| 日韩成人一级大片| 亚洲欧美偷拍卡通变态| 精品黑人一区二区三区久久| 色综合天天做天天爱| 美女精品一区二区| 一区二区三区日韩精品视频| 久久众筹精品私拍模特| 欧美少妇一区二区| 国产91在线观看丝袜| 蜜桃av一区二区三区| 亚洲精品乱码久久久久久久久| 欧美精品一区二区精品网| 在线观看一区二区视频| 成人国产亚洲欧美成人综合网 | 色综合久久88色综合天天免费| 免费精品视频最新在线| 亚洲欧美激情视频在线观看一区二区三区| 3atv在线一区二区三区| av高清不卡在线| 国产精品18久久久久久久久| 日韩精品视频网| 一区二区三区视频在线看| 国产精品水嫩水嫩| 国产日韩欧美精品电影三级在线 | 丁香婷婷深情五月亚洲| 亚洲国产精品精华液网站| 综合激情成人伊人| 国产精品卡一卡二| 国产欧美综合在线| 久久综合给合久久狠狠狠97色69| 69堂亚洲精品首页| 91精品欧美久久久久久动漫| 91成人网在线| 91行情网站电视在线观看高清版| 成人国产在线观看| 99视频在线精品| 99久久亚洲一区二区三区青草| 国产毛片精品视频| 国产精品99久久久久久久vr| 久久精品国产精品青草| 久久99精品国产麻豆婷婷 | 风间由美一区二区av101| 国产一区二区调教| 国产精品18久久久久久久网站| 国产永久精品大片wwwapp | 日韩国产欧美一区二区三区| 一区二区三区四区不卡在线| 亚洲精品高清视频在线观看| 亚洲另类在线视频| 亚洲国产成人91porn| 亚洲电影你懂得| 美女视频黄频大全不卡视频在线播放| 蜜桃视频一区二区三区在线观看| 久久99精品一区二区三区三区| 日韩av电影天堂| 国产在线精品一区二区三区不卡| 狠狠久久亚洲欧美| 国产成a人无v码亚洲福利| 99国产精品视频免费观看| 一本一道久久a久久精品| 欧美日韩三级一区| 日韩一级二级三级精品视频| 欧美精品一区二区精品网| 国产欧美一区二区三区鸳鸯浴| 亚洲欧洲精品一区二区三区| 亚洲精品老司机| 日韩在线卡一卡二| 国产乱理伦片在线观看夜一区 | 国产精品麻豆网站| 一区二区三区四区蜜桃| 蜜臀久久99精品久久久画质超高清 | 欧美色网站导航| 日韩美一区二区三区| 国产精品丝袜在线| 天堂资源在线中文精品| 精品综合免费视频观看| 91年精品国产| 91精品国产综合久久精品图片 | 亚洲影院在线观看| 日本aⅴ亚洲精品中文乱码| 国产成人在线视频免费播放| 色婷婷av一区二区三区软件| 日韩欧美一区二区视频| 一区视频在线播放| 精彩视频一区二区三区| 一本大道综合伊人精品热热| 精品久久久久久亚洲综合网 | 99视频精品全部免费在线| 欧美日韩国产首页| 国产精品美女一区二区| 美女在线视频一区| 91美女片黄在线观看91美女| 欧美一区二区三区播放老司机| 亚洲婷婷综合久久一本伊一区| 秋霞国产午夜精品免费视频| 91免费看`日韩一区二区| 亚洲精品在线免费播放| 亚洲第一av色| 一本色道久久综合狠狠躁的推荐| 精品粉嫩aⅴ一区二区三区四区| 亚洲一区二区四区蜜桃| 成人激情电影免费在线观看| 精品国产一区二区三区四区四| 亚洲成人一区二区| 91丨porny丨户外露出| 亚洲精品一区二区三区蜜桃下载 | 亚洲国产欧美日韩另类综合| av在线不卡免费看| 国产欧美日韩中文久久| 日本不卡一区二区| 欧美色电影在线| 亚洲夂夂婷婷色拍ww47 | 日韩精品综合一本久道在线视频| 一区二区三区国产豹纹内裤在线 | 欧美一区二区三区在| 亚洲一区二区在线观看视频| 99久久99久久精品国产片果冻| 国产午夜精品一区二区三区嫩草| 免费在线成人网| 日韩精品最新网址| 蜜臀av性久久久久蜜臀aⅴ | 亚洲丝袜自拍清纯另类| 色婷婷久久久亚洲一区二区三区| 国产精品欧美一区喷水| 国产91清纯白嫩初高中在线观看| 26uuu精品一区二区在线观看| 精品中文av资源站在线观看| 日韩亚洲欧美高清| 韩日av一区二区| 久久综合久久综合久久综合|