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

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

?? sharedqt.cpp

?? This program demonstrates using a thread safe C++ class called SharedQT<T>. This example act
?? CPP
字號:
// 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一区二区三区免费野_久草精品视频
国产精品久久久久久久久免费丝袜| 欧美一区二区三区在线观看| 麻豆视频一区二区| 亚洲成av人**亚洲成av**| 国产精品久久综合| 国产精品久久久久久久久久久免费看| 欧美精品一区二区蜜臀亚洲| 精品美女在线播放| 欧美精品一区二区三区久久久| 日韩一二三区视频| 欧美成人一级视频| 欧美电影免费观看高清完整版在线| 欧美区一区二区三区| 欧美在线影院一区二区| 在线欧美一区二区| 欧美日韩五月天| 欧美日韩一区二区电影| 这里只有精品免费| 精品国产一区二区精华| 久久久综合精品| 国产精品污www在线观看| 中文字幕欧美一区| 洋洋av久久久久久久一区| 亚洲福利一区二区三区| 另类小说综合欧美亚洲| 国产专区欧美精品| 成人高清免费在线播放| 在线观看网站黄不卡| 欧美一区永久视频免费观看| 精品国产三级电影在线观看| 国产精品欧美一级免费| 亚洲高清视频在线| 国产激情偷乱视频一区二区三区| 一本一道久久a久久精品综合蜜臀| 欧美日韩一区二区三区免费看| 精品久久久久一区| 亚洲精品国产成人久久av盗摄| 久久精品国产一区二区三区免费看| 国产精品亚洲午夜一区二区三区| 色婷婷国产精品| 日韩精品专区在线影院重磅| 亚洲欧洲精品天堂一级| 久久激情综合网| 91老司机福利 在线| 制服丝袜中文字幕一区| 国产精品嫩草影院com| 日本vs亚洲vs韩国一区三区二区| 成人性生交大合| 777午夜精品免费视频| 中文字幕制服丝袜一区二区三区 | 99久久精品国产一区二区三区| 日本乱人伦一区| 国产亚洲欧美日韩俺去了| 午夜久久电影网| 91亚洲午夜精品久久久久久| 精品国产髙清在线看国产毛片| 亚洲精品视频免费看| 国产91精品久久久久久久网曝门| 制服丝袜成人动漫| 亚洲香蕉伊在人在线观| 99久久久无码国产精品| 国产喷白浆一区二区三区| 麻豆精品视频在线| 欧美肥妇free| 五月天激情综合网| 欧美在线观看18| 亚洲黄网站在线观看| 成人av动漫网站| 中文字幕免费一区| 国产 欧美在线| 久久久精品国产免大香伊| 精品午夜久久福利影院 | 日韩欧美国产小视频| 午夜不卡av在线| 欧美日韩在线免费视频| 亚洲精品久久久蜜桃| 成人精品视频一区二区三区 | 中文字幕中文字幕在线一区 | 丁香激情综合国产| 久久人人超碰精品| 国产一区二区三区免费看| 日韩免费成人网| 国产一区二区三区高清播放| 亚洲精品一区二区在线观看| 国产一区二区视频在线| 欧美激情一区二区三区蜜桃视频 | 亚洲人成7777| 日本久久一区二区| 亚洲一卡二卡三卡四卡| 欧美日韩国产欧美日美国产精品| 亚洲国产精品一区二区久久恐怖片| 欧美日韩在线免费视频| 美女网站在线免费欧美精品| 久久免费美女视频| 国产宾馆实践打屁股91| 亚洲免费在线观看| 在线成人av网站| 国模无码大尺度一区二区三区| 久久久久久久综合日本| k8久久久一区二区三区 | 久久精品网站免费观看| 成人18视频日本| 午夜精品在线看| 久久视频一区二区| 99久久精品国产一区二区三区| 亚洲午夜一区二区三区| 日韩三级在线免费观看| 成人久久18免费网站麻豆| 亚洲小说欧美激情另类| xf在线a精品一区二区视频网站| 成人激情开心网| 午夜成人免费电影| 国产精品全国免费观看高清| 欧美日韩国产另类不卡| 成人三级在线视频| 日韩激情在线观看| 中文字幕色av一区二区三区| 日韩一级完整毛片| 91亚洲男人天堂| 久久 天天综合| 夜夜亚洲天天久久| 久久亚洲二区三区| 欧美日韩久久久一区| 成人免费视频国产在线观看| 午夜久久久久久| 亚洲视频精选在线| www成人在线观看| 欧美人xxxx| 色综合天天综合网天天看片| 精彩视频一区二区| 天天爽夜夜爽夜夜爽精品视频| 国产精品私房写真福利视频| 欧美三片在线视频观看| 国产精品一区二区久激情瑜伽 | 日本成人中文字幕| 1区2区3区精品视频| 久久亚洲综合av| 日韩美女视频一区二区在线观看| 91九色02白丝porn| 91猫先生在线| 成人黄色小视频在线观看| 精品一区二区免费看| 蜜芽一区二区三区| 日韩电影免费在线看| 午夜成人免费电影| 亚洲一区二区三区不卡国产欧美 | 亚洲国产一区二区三区青草影视| 国产精品嫩草久久久久| 国产欧美一区二区三区鸳鸯浴| 日韩美女在线视频| 精品国产网站在线观看| 精品免费一区二区三区| 精品第一国产综合精品aⅴ| 欧美一区二区三区不卡| 日韩写真欧美这视频| 欧美一区二区三区免费在线看 | 一区二区三区中文免费| 亚洲色图一区二区| 国产精品成人一区二区艾草| **欧美大码日韩| 亚洲三级在线看| 亚洲与欧洲av电影| 亚洲一区电影777| 日韩av不卡在线观看| 精品一区二区三区在线视频| 韩国三级电影一区二区| 丁香婷婷综合五月| 床上的激情91.| 色美美综合视频| 精品视频资源站| 日韩欧美一级二级三级久久久| 精品国产乱码久久久久久图片| 久久久美女艺术照精彩视频福利播放| 久久久久综合网| 中文字幕欧美日本乱码一线二线| 亚洲色图.com| 天堂成人国产精品一区| 国产一区激情在线| 91同城在线观看| 欧美日韩国产高清一区二区| 欧美r级在线观看| 最新中文字幕一区二区三区| 一区二区高清视频在线观看| 免费观看一级欧美片| 国产成人啪午夜精品网站男同| 99热在这里有精品免费| 欧美人xxxx| 国产精品美女久久久久久久久| 一区二区三区欧美亚洲| 久久精品国产网站| 97久久超碰精品国产| 日韩精品专区在线影院重磅| 亚洲欧美在线另类| 日韩成人伦理电影在线观看| 国产成人在线视频网址| 欧美日韩一区三区| 亚洲欧洲另类国产综合| 日本美女一区二区| 色欧美片视频在线观看在线视频| 精品粉嫩超白一线天av|