Emx::Sem类 参考

进程间同步信号量

#include "Sem.hpp"

Public 成员函数

 Sem ()
 
 ~Sem ()
 
ErrCodeE Create (const char *path, int32_t initValue)
 创建信号量 更多...
 
ErrCodeE Wait (int32_t timeoutMs=-1)
 等待信号量 更多...
 
ErrCodeE Post ()
 释放信号量 更多...
 
int32_t Get ()
 获取信号量的值 更多...
 
void Destroy ()
 销毁信号量 更多...
 

构造及析构函数说明

◆ Sem()

Emx::Sem::Sem ( )
inline

◆ ~Sem()

Emx::Sem::~Sem ( )
inline

成员函数说明

◆ Create()

ErrCodeE Emx::Sem::Create ( const char *  path,
int32_t  initValue 
)
参数
path[in] 信号量绑定地址
initValue[in] 初始值
返回
ErrCodeE

◆ Wait()

ErrCodeE Emx::Sem::Wait ( int32_t  timeoutMs = -1)
参数
timeoutMs[in]超时时间,默认永久等待
返回
ErrCodeE

◆ Post()

ErrCodeE Emx::Sem::Post ( )

◆ Get()

int32_t Emx::Sem::Get ( )

◆ Destroy()

void Emx::Sem::Destroy ( )

被这些函数引用 ~Sem().