Methods of Class Semaphore
- Semaphore
- Semaphore(
-
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.
- Semaphore
- Semaphore(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
NO |
NO |
NO |
- Summary
The underlying oslSemaphore has no reference count.
- Description
Since the underlying oslSemaphore is not a reference counted object, copy
constructed Semaphore may work on an already destructed oslSemaphore object.
- Semaphore
- Semaphore(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
NO |
NO |
NO |
- Summary
The underlying oslSemaphore has no reference count.
- Description
When destructed, the Semaphore object destroys the undelying oslSemaphore,
which might cause severe problems in case it's a temporary object.
- operator=
- Semaphore & operator=(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
NO |
NO |
NO |
- Summary
This assignment operator is private for the same reason as
the copy constructor.
- operator=
- Semaphore & operator=(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
NO |
NO |
NO |
- Summary
This assignment operator is private for the same reason as
the constructor taking a oslSemaphore argument.
Top of Page
Copyright © 2000, 2014 LibreOffice contributors and/or their affiliates. All rights reserved.
LibreOffice was created by The Document Foundation, based on OpenOffice.org, which is Copyright 2000, 2010 Oracle and/or its affiliates.
The Document Foundation acknowledges all community members, please find more info at our website.
Privacy Policy | Impressum (Legal Info) | Copyright information: The source code of LibreOffice is licensed under the GNU Lesser General Public License (LGPLv3). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.