diff options
author | Oliver Bolte <obo@openoffice.org> | 2003-10-20 15:11:08 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2003-10-20 15:11:08 +0000 |
commit | faa0545b629dd1303a9e5c86baee663193a69ae0 (patch) | |
tree | 2aef3c14640351506f0b91ca066eb88e80c3994f /sal/inc/osl/semaphor.hxx | |
parent | ead503392f8585c83a60740ec75304c0c57a4305 (diff) |
INTEGRATION: CWS qdiet01 (1.6.78); FILE MERGED
2003/09/17 09:45:36 obr 1.6.78.1: #110999# made synchrnoization objects non copy constructable / assignable and updated documentation.
Diffstat (limited to 'sal/inc/osl/semaphor.hxx')
-rw-r--r-- | sal/inc/osl/semaphor.hxx | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/sal/inc/osl/semaphor.hxx b/sal/inc/osl/semaphor.hxx index a37b997ade76..00fb66ff3f45 100644 --- a/sal/inc/osl/semaphor.hxx +++ b/sal/inc/osl/semaphor.hxx @@ -2,9 +2,9 @@ * * $RCSfile: semaphor.hxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: hr $ $Date: 2003-03-26 16:45:37 $ + * last change: $Author: obo $ $Date: 2003-10-20 16:11:08 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -71,7 +71,6 @@ namespace osl { class Semaphore { - oslSemaphore semaphore; public: @@ -121,6 +120,35 @@ namespace osl { return osl_releaseSemaphore(semaphore); } + + private: + oslSemaphore semaphore; + + /** The underlying oslSemaphore has no reference count. + + Since the underlying oslSemaphore is not a reference counted object, copy + constructed Semaphore may work on an already destructed oslSemaphore object. + + */ + Semaphore(const Semaphore&); + + /** The underlying oslSemaphore has no reference count. + + When destructed, the Semaphore object destroys the undelying oslSemaphore, + which might cause severe problems in case it's a temporary object. + + */ + Semaphore(oslSemaphore Semaphore); + + /** This assignment operator is private for the same reason as + the copy constructor. + */ + Semaphore& operator= (const Semaphore&); + + /** This assignment operator is private for the same reason as + the constructor taking a oslSemaphore argument. + */ + Semaphore& operator= (oslSemaphore); }; } |