1 #ifndef GIRMEM_HPP_INCLUDED
2 #define GIRMEM_HPP_INCLUDED
5 /* The following pthread crap mirrors what is in pthreadx.h, which is
6 what girmem.cpp uses to declare the lock interface. We can't simply
7 include pthreadx.h here, because it's an internal Xmlrpc-c header file,
8 and this is an external one.
10 This is a stopgap measure until we do something cleaner, such as expose
11 pthreadx.h as an external interface (class girlock, maybe?) or create
12 a lock class with virtual methods.
14 The problem we're solving is that class autoObject contains
15 a pthread_mutex_t member, and on Windows, there's no such type.
20 typedef pthread_mutex_t girmem_lock;
22 typedef CRITICAL_SECTION girmem_lock;
30 friend class autoObjectPtr;
34 void decref(bool * const unreferencedP);
38 virtual ~autoObject();
41 girmem_lock refcountLock;
42 unsigned int refcount;
48 autoObjectPtr(girmem::autoObject * objectP);
49 autoObjectPtr(girmem::autoObjectPtr const& autoObjectPtr);
54 point(girmem::autoObject * const objectP);
60 operator=(girmem::autoObjectPtr const& objectPtr);
69 girmem::autoObject * objectP;