mcatan 2004/04/02 00:47:13
Modified: include/log4cxx/helpers objectimpl.h
Log:
optimized reference counting
Revision Changes Path
1.11 +3 -19 logging-log4cxx/include/log4cxx/helpers/objectimpl.h
Index: objectimpl.h
===================================================================
RCS file: /home/cvs/logging-log4cxx/include/log4cxx/helpers/objectimpl.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- objectimpl.h 28 Feb 2004 15:10:23 -0000 1.10
+++ objectimpl.h 2 Apr 2004 08:47:13 -0000 1.11
@@ -19,15 +19,7 @@
#include <log4cxx/config.h>
#include <log4cxx/helpers/object.h>
-
-#ifdef HAVE_LINUX_ATOMIC_OPERATIONS
-#include <asm/atomic.h>
-#elif defined(HAVE_PTHREAD)
#include <log4cxx/helpers/criticalsection.h>
-#endif
-
-#include <log4cxx/helpers/mutex.h>
-#include <log4cxx/helpers/condition.h>
namespace log4cxx
{
@@ -45,20 +37,12 @@
virtual void unlock() const;
virtual void wait() const;
virtual void notify() const;
+ virtual void notifyAll() const;
protected:
-#ifdef HAVE_LINUX_ATOMIC_OPERATIONS
- mutable atomic_t ref;
-#elif defined(HAVE_PTHREAD)
- mutable CriticalSection refCs;
- mutable unsigned int ref;
-#elif defined(HAVE_MS_THREAD)
mutable long volatile ref;
-#else
- mutable unsigned int ref;
-#endif
- mutable Mutex mutex;
- mutable Condition cond;
+ mutable CriticalSection cs;
+ mutable void * eventList;
};
};
};