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

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

?? sharedqt.cc

?? vxworks 下多線程編程事例代碼 包括:管道
?? 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一区二区三区免费野_久草精品视频
99久久99久久精品免费看蜜桃| 日韩av二区在线播放| 欧美麻豆精品久久久久久| 精品国产91亚洲一区二区三区婷婷| 三级久久三级久久久| 精品1区2区在线观看| 欧美一级日韩不卡播放免费| 极品美女销魂一区二区三区| 精品乱人伦一区二区三区| 粉嫩欧美一区二区三区高清影视| 国产精品欧美一级免费| 一本到不卡免费一区二区| 日韩和的一区二区| 日日摸夜夜添夜夜添精品视频| 亚洲国产精品自拍| 久久久亚洲国产美女国产盗摄| 色综合久久久久综合体桃花网| 色综合网站在线| 久久99在线观看| 亚洲国产精品一区二区久久 | 欧美日本国产一区| 国产精品99久久久久久似苏梦涵 | 大美女一区二区三区| 中文字幕亚洲一区二区va在线| 欧美丰满少妇xxxxx高潮对白| 欧美一区二区在线视频| 久久久久久久久久久久久久久99| 国产精品第13页| 久久久久久免费| 一区二区在线观看免费视频播放| 欧美成人精品3d动漫h| 欧美怡红院视频| 国产丶欧美丶日本不卡视频| 久久9热精品视频| 99国产精品久久久| 欧美精品黑人性xxxx| 久久久国际精品| 亚洲国产成人av| 成人午夜激情视频| 91精品一区二区三区在线观看| 久久精品国产99| 91亚洲国产成人精品一区二区三 | 麻豆成人综合网| 香蕉加勒比综合久久| 亚洲黄色小视频| 久久国产精品色婷婷| 欧美亚洲综合久久| 国产午夜亚洲精品不卡| 久久久蜜桃精品| 亚洲第一成人在线| 成人手机电影网| 欧美精品一区二区三区蜜臀| 午夜欧美视频在线观看| 日本美女一区二区三区| 成人少妇影院yyyy| 久久久久久久综合日本| 久久99精品久久久久婷婷| 欧洲av一区二区嗯嗯嗯啊| 91麻豆精品国产91久久久更新时间 | 久久综合久久综合久久| 国产精品美女久久久久久2018 | 亚洲婷婷在线视频| 夜夜精品浪潮av一区二区三区| 亚洲超丰满肉感bbw| 99国产精品久久久久久久久久| 欧美国产日韩a欧美在线观看| 久久久久国色av免费看影院| 蜜臀va亚洲va欧美va天堂| 欧美性受xxxx| 一区二区三区四区在线免费观看 | 97se亚洲国产综合自在线观| 国产精品第五页| 99久久免费精品| 亚洲欧美日韩电影| 老汉av免费一区二区三区| 欧美精品乱码久久久久久| 亚洲大片在线观看| 欧美日韩国产高清一区二区三区| 亚洲黄色录像片| 欧美调教femdomvk| 午夜在线成人av| 欧美一区二区三区公司| 美女一区二区在线观看| 日韩免费观看高清完整版在线观看| 久久午夜老司机| 国模无码大尺度一区二区三区| 色老汉一区二区三区| 欧美一区二区三区男人的天堂| 亚洲成a人在线观看| 91麻豆精品国产无毒不卡在线观看 | 国产欧美一区二区精品忘忧草 | 亚洲综合区在线| 国产精品白丝av| 国产精品你懂的在线欣赏| 成人伦理片在线| 亚洲精品福利视频网站| 91精品国产综合久久久蜜臀图片| 免费在线观看一区| 欧美综合亚洲图片综合区| 午夜免费欧美电影| 久久你懂得1024| 91社区在线播放| 日韩二区三区四区| 久久久噜噜噜久噜久久综合| 一本大道综合伊人精品热热| 日韩制服丝袜av| 亚洲国产精品av| 欧美人与性动xxxx| 成人h动漫精品一区二| 国产亚洲制服色| 91成人在线免费观看| 久久9热精品视频| 亚洲综合在线免费观看| 欧美精品一区二区三区在线| 99视频精品全部免费在线| 国产三级精品视频| 欧美午夜一区二区三区免费大片| 久久99九九99精品| 一区二区三区精密机械公司| 久久蜜桃一区二区| 欧美日韩亚洲综合在线 欧美亚洲特黄一级 | 国产成人久久精品77777最新版本| 亚洲欧美日韩国产综合在线| 337p粉嫩大胆噜噜噜噜噜91av | 国内精品免费**视频| 亚洲人成在线播放网站岛国| 日韩精品一区二区三区在线| 在线免费观看日韩欧美| 国产91综合网| 久久国产精品露脸对白| 亚洲国产精品久久久男人的天堂 | 欧美性大战久久| 成人免费观看视频| 韩国毛片一区二区三区| 视频一区视频二区中文| 亚洲国产裸拍裸体视频在线观看乱了| 中文字幕国产一区二区| 久久久蜜桃精品| 久久综合精品国产一区二区三区| 欧美美女喷水视频| 欧美久久一区二区| 欧美日韩另类一区| 欧美亚洲国产一区二区三区| av一区二区不卡| 91日韩一区二区三区| www.综合网.com| 成人丝袜18视频在线观看| 国产综合色在线| 国产福利一区二区| 丁香天五香天堂综合| 国产jizzjizz一区二区| 国产成人精品免费一区二区| 国产一区二区三区免费在线观看| 最近日韩中文字幕| 国产精品久久久99| 国产精品久99| 亚洲女与黑人做爰| 亚洲女厕所小便bbb| 一区二区三区四区国产精品| 一区二区三区久久| 日精品一区二区| 日韩二区三区四区| 九九国产精品视频| 国产精品资源在线看| 国产成人在线视频播放| 波多野结衣在线一区| 色呦呦国产精品| 欧美高清激情brazzers| 日韩一二三区不卡| 在线视频中文字幕一区二区| 在线精品国精品国产尤物884a| 欧美影院一区二区| 精品久久久久久久久久久久包黑料| 欧美大片在线观看| 国产欧美综合在线观看第十页 | 欧美午夜精品久久久久久孕妇| 欧美日韩mp4| 精品蜜桃在线看| 国产精品成人在线观看| 婷婷激情综合网| 国产精品99久久久久久宅男| 在线观看欧美日本| 日韩精品一区二区三区四区 | 911精品国产一区二区在线| 日韩三级高清在线| 国产精品人妖ts系列视频| 亚洲综合成人在线视频| 精品在线亚洲视频| 在线一区二区三区四区五区| 精品少妇一区二区三区视频免付费| 欧美国产一区二区| 偷窥少妇高潮呻吟av久久免费| 国产一区二区不卡老阿姨| 欧洲精品中文字幕| 久久久久久99精品| 日韩精品成人一区二区三区| 国产mv日韩mv欧美| 日韩精品在线一区| 亚洲国产va精品久久久不卡综合| 粉嫩av一区二区三区在线播放 |