Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.15
 Overview   Namespace   Class   Index   Help 

Methods of Class Semaphore


Semaphore
Semaphore(
sal_uInt32 initialCount );

virtual abstract const volatile template static inline C-linkage
NO NO NO NO NO NO YES NO

Summary
Creates a semaphore.<BR>
Parameters
InitialCount
denotes the starting value the semaphore. If you set it to
zero, the first acquire() blocks. Otherwise InitialCount acquire()s  are
immedeatly  successfull.
Return
0 if the semaphore could not be created, otherwise a handle to the sem.

~Semaphore
~Semaphore();

virtual abstract const volatile template static inline C-linkage
NO NO NO NO NO NO YES NO

Summary
Release the OS-structures and free semaphore data-structure
Return
fbbb

acquire
sal_Bool acquire();

virtual abstract const volatile template static inline C-linkage
NO NO NO NO NO NO YES NO

Summary
acquire()decreases the count. It will block if it tries to
decrease below zero.
Return
False if the system-call failed.

tryToAcquire
sal_Bool tryToAcquire();

virtual abstract const volatile template static inline C-linkage
NO NO NO NO NO NO YES NO

Description
tryToAcquire()tries to decreases the count. It will 
return with False if it would decrease the count below zero.
(When acquire() would block.) If it could successfully 
decrease the count, it will return True.

release
sal_Bool release();

virtual abstract const volatile template static inline C-linkage
NO NO NO NO NO NO YES NO

Summary
release()increases the count.
Return
False if the system-call failed.

Top of Page

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. The Apache feather logo is a trademark of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.