RflySimSDK v3.05
RflySimSDK说明文档
载入中...
搜索中...
未找到
vrpn_Semaphore类 参考

Public 成员函数

 vrpn_Semaphore (int cNumResources=1)
 constructor - mutex by default (0 is a sync primitive)
 
 ~vrpn_Semaphore ()
 destructor
 
bool reset (int cNumResources=1)
 routine to reset it (true on success, false on failure) (may create new semaphore)
 
int p ()
 Blocking acquire of resource. ("down")
 
int v ()
 Release of resource. ("up")
 
int condP ()
 Non-blocking attempt to acquire resource ("down")
 
int numResources ()
 read values
 

构造及析构函数说明

◆ vrpn_Semaphore()

vrpn_Semaphore ( int cNumResources = 1)

constructor - mutex by default (0 is a sync primitive)

◆ ~vrpn_Semaphore()

destructor

成员函数说明

◆ condP()

int condP ( )

Non-blocking attempt to acquire resource ("down")

返回
0 if it could not access the resource and 1 if it could (-1 on fail)

◆ numResources()

int numResources ( )

read values

◆ p()

int p ( )

Blocking acquire of resource. ("down")

返回
1 when it has acquired the resource, -1 on fail

◆ reset()

bool reset ( int cNumResources = 1)

routine to reset it (true on success, false on failure) (may create new semaphore)

◆ v()

int v ( )

Release of resource. ("up")

返回
0 when it has released the resource, -1 on fail

该类的文档由以下文件生成: