r3semaph

r3semaph

Class

oops/r3semaph.h

Library

r3oops

Description:

Semaphore Class

See Also

oops/r3root.h

Super Class

r3Root

R3CLID_ROOT

JavaScript

r3Semaphore

Class Identifier

R3CLID_SEMAPHORE - 3

Methods

OBTAIN, ATTEMPT, RELEASE,

Attributes

Registration

int R3RegisterSemaphoreClass(R3APP *app);

R3SEMM_OBTAIN

Method

OBTAIN

Identifier

R3SEMM_OBTAIN

Param 3:

R3INT, see access types below

JavaScript

obj.OBTAIN(p3);

Description

Obtain semaphore. If semaphore is obtained, call return immediately. If not, the thread is put to sleep.

R3SEMM_ATTEMPT

Method

ATTEMPT

Identifier

R3SEMM_ATTEMPT

Return

R3BOOL, FALSE if semaphore cannot be locked by us

Param 3:

R3INT, see access types below

JavaScript

rc = obj.ATTEMPT(p3);

Description

Attemp to lock semaphore. If cannot be locked, call return immediately with FALSE return value. Otherwise the semaphore is locked and TRUE is returned.

R3SEMM_RELEASE

Method

RELEASE

Identifier

R3SEMM_RELEASE

JavaScript

obj.RELEASE();

Description

Release semaphore locked using ATTEMP or OBTAIN methods

Access types

R3SEM_SHARED
R3SEM_EXCLUSIVE

Tags

Tags

R3SEMA_Task