diff options
author | pixel <pixel> | 2004-07-23 16:56:03 +0000 |
---|---|---|
committer | pixel <pixel> | 2004-07-23 16:56:03 +0000 |
commit | eb44468f13372dea0feef9045ef413911f9e8d5a (patch) | |
tree | bd1ee8b3cdd140a808b2af7e33c31f6403dc5cce /include | |
parent | 61a150c500fd64d1eeae74f9abb6829721261d39 (diff) |
Beeing more thread safe \(introduced locker\)
Diffstat (limited to 'include')
-rw-r--r-- | include/Exceptions.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/include/Exceptions.h b/include/Exceptions.h index 9f0c3a6..c1fb303 100644 --- a/include/Exceptions.h +++ b/include/Exceptions.h @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: Exceptions.h,v 1.35 2004-07-22 23:38:31 pixel Exp $ */ +/* $Id: Exceptions.h,v 1.36 2004-07-23 16:56:03 pixel Exp $ */ #ifndef __EXCEPTIONS_H__ #define __EXCEPTIONS_H__ @@ -144,6 +144,17 @@ class printer_t : public Base { extern printer_t * printer; +class locker_t : public Base { + public: + virtual void lock() = 0; + virtual void unlock() = 0; +}; + +extern locker_t * locker; + +#define LOCK if (locker) locker->lock() +#define UNLOCK if (locker) locker->unlock(); + #include <BString.h> #endif |