rllib  1
Public Member Functions | Public Attributes | List of all members
rlSemaphore Class Reference

#include <rlthread.h>

Collaboration diagram for rlSemaphore:
Collaboration graph
[legend]

Public Member Functions

 rlSemaphore (int max_semaphore=1000)
 
virtual ~rlSemaphore ()
 
int waitSemaphore ()
 
int incrementSemaphore ()
 

Public Attributes

WSEMAPHORE semaphore
 

Detailed Description

Semaphore functions based on POSIX threads.

Definition at line 148 of file rlthread.h.

Constructor & Destructor Documentation

◆ rlSemaphore()

rlSemaphore::rlSemaphore ( int  max_semaphore = 1000)

Definition at line 116 of file rlthread.cpp.

117 {
118  rlwrapinit_semaphore(&semaphore, max_semaphore);
119 }
WSEMAPHORE semaphore
Definition: rlthread.h:164
int rlwrapinit_semaphore(WSEMAPHORE *s, int cmax)
Definition: rlwthread.cpp:268

◆ ~rlSemaphore()

rlSemaphore::~rlSemaphore ( )
virtual

Definition at line 121 of file rlthread.cpp.

122 {
124 }
WSEMAPHORE semaphore
Definition: rlthread.h:164
int rlwrapdestroy_semaphore(WSEMAPHORE *s)
Definition: rlwthread.cpp:294

Member Function Documentation

◆ incrementSemaphore()

int rlSemaphore::incrementSemaphore ( )
Increment the value of the semaphore

Definition at line 131 of file rlthread.cpp.

132 {
134 }
WSEMAPHORE semaphore
Definition: rlthread.h:164
int rlwrapincrement_semaphore(WSEMAPHORE *s)
Definition: rlwthread.cpp:310

◆ waitSemaphore()

int rlSemaphore::waitSemaphore ( )
Wait until semaphore is signaled

Definition at line 126 of file rlthread.cpp.

127 {
129 }
WSEMAPHORE semaphore
Definition: rlthread.h:164
int rlwrapwait_semaphore(WSEMAPHORE *s)
Definition: rlwthread.cpp:341

Member Data Documentation

◆ semaphore

WSEMAPHORE rlSemaphore::semaphore

Definition at line 164 of file rlthread.h.


The documentation for this class was generated from the following files: