XWOS API  4.0
XWOS C/C++ API参考手册
载入中...
搜索中...
未找到
SFlg.hxx
浏览该文件的文档.
1
13#ifndef __xwos_cxx_sync_SFlg_hxx__
14#define __xwos_cxx_sync_SFlg_hxx__
15
16#include <xwos/cxx/sync/Flg.hxx>
17
18namespace xwos {
19namespace sync {
20
31template<xwsz_t TNum>
32class SFlg : public Flg<TNum>
33{
34 private:
35 struct xwos_flg mFlg;
39 public:
44 : Flg<TNum>()
45 {
46 xwos_flg_init(&mFlg, TNum, mEventBmp.mData, mEventMsk.mData);
48 }
51 /* 生命周期管理 */
52 xwer_t grab() { return xwos_flg_grab(&mFlg); }
53 xwer_t put() { return xwos_flg_put(&mFlg); }
54};
55
60} // namespace sync
61} // namespace xwos
62
63#endif /* xwos/cxx/sync/SFlg.hxx */
xwos::sync::Flg
事件标志基类
Definition Flg.hxx:62
静态事件标志
Definition SFlg.hxx:33
xwos::Bmp< TNum > mEventMsk
Definition SFlg.hxx:37
xwer_t put()
Definition SFlg.hxx:53
struct xwos_flg mFlg
Definition SFlg.hxx:35
xwer_t grab()
Definition SFlg.hxx:52
SFlg()
构造函数
Definition SFlg.hxx:43
xwos::Bmp< TNum > mEventBmp
Definition SFlg.hxx:36
signed long xwer_t
Definition type.h:554
static xwer_t xwos_flg_fini(struct xwos_flg *flg)
XWOS API:销毁静态方式初始化的事件标志对象
Definition flg.h:148
static xwer_t xwos_flg_put(struct xwos_flg *flg)
XWOS API:减少事件标志对象的引用计数
Definition flg.h:186
static xwer_t xwos_flg_grab(struct xwos_flg *flg)
XWOS API:增加事件标志对象的引用计数
Definition flg.h:167
static xwer_t xwos_flg_init(struct xwos_flg *flg, xwsz_t num, xwbmp_t *bmp, xwbmp_t *msk)
XWOS API:静态方式初始化事件标志对象
Definition flg.h:132
Definition Bmp.hxx:21
XWOS API:事件标志对象
Definition flg.h:90