From eb44468f13372dea0feef9045ef413911f9e8d5a Mon Sep 17 00:00:00 2001 From: pixel Date: Fri, 23 Jul 2004 16:56:03 +0000 Subject: Beeing more thread safe \(introduced locker\) --- include/Exceptions.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'include') 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 #endif -- cgit v1.2.3