⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wycond.h

📁 一个不错
💻 H
字号:
/* Copyright is licensed under GNU LGPL.                 by I.J.Wang 2003   WyCond is for the thread to suspend execution waiting to resume*/#ifndef WYCOND_H__#define WYCOND_H__#define WYCOND_VERSION 31#include "wymutex.h"#include "wytimespec.h"#include <signal.h>   // for sig_atomic_tclass WyCond {  public:    static const char class_name[];    WY_THROW_REPLY;    WyCond() WY__TSPC();    ~WyCond() WY__TSPC();    void signal(void) WY__TSPC();    void broadcast(void) WY__TSPC();    WyRet wait(WyLock &mtx);    WyRet wait(WyLock &mtx, WyTimeSpec abstime);  private:   #ifndef NDEBUG    volatile sig_atomic_t _sig;                // class signature   #endif    ::pthread_cond_t  _cond;    WyCond(const WyCond&);                     // no copy constructor     const WyCond& operator =(const WyCond&);   // no assign operator    bool operator ==(const WyCond&);           // no equal operator};#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -