1#ifndef _beos_semaphore_sync_object_h_
2#define _beos_semaphore_sync_object_h_
3
4#include <cppunit/SynchronizedObject.h>
5#include <OS.h>
6
7//! Semaphore based implementation of CppUnit::SynchronizedObject::SynchronizationObject
8/*!	This class is used to serialize access to a TestResult object. You should
9	not need to explicitly use it anywhere in your testing code.
10*/
11class CPPUNIT_API SemaphoreSyncObject : public CppUnit::SynchronizedObject::SynchronizationObject {
12public:
13	SemaphoreSyncObject();
14	virtual ~SemaphoreSyncObject();
15
16	virtual void lock();
17	virtual void unlock();
18
19protected:
20	sem_id fSemId;
21
22private:
23  //! Prevents the use of the copy constructor.
24  SemaphoreSyncObject( const SemaphoreSyncObject &copy );
25
26  //! Prevents the use of the copy operator.
27  void operator =( const SemaphoreSyncObject &copy );
28
29};
30
31#endif  // _beos_synchronization_object_h_
32