vfs: check userland buffers before reading them.
[haiku.git] / headers / tools / cppunit / LockerSyncObject.h
blob24e58f8dc8442695397bcdfdb262cb95aa2e2cd7
1 #ifndef _beos_locker_sync_object_h_
2 #define _beos_locker_sync_object_h_
4 #include <cppunit/SynchronizedObject.h>
5 #include <Locker.h>
7 //! BLocker 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.
11 class CPPUNIT_API LockerSyncObject : public CppUnit::SynchronizedObject::SynchronizationObject {
12 public:
13 LockerSyncObject() {}
14 virtual ~LockerSyncObject() {}
16 virtual void lock() { fLock.Lock(); }
17 virtual void unlock() { fLock.Unlock(); }
19 protected:
20 BLocker fLock;
22 private:
23 //! Prevents the use of the copy constructor.
24 LockerSyncObject( const LockerSyncObject &copy );
26 //! Prevents the use of the copy operator.
27 void operator =( const LockerSyncObject &copy );
31 #endif // _beos_synchronization_object_h_