cargilld 2005/04/05 11:36:01
Modified: c/src/xercesc/util PanicHandler.cpp PanicHandler.hpp
c/src/xercesc/util/Platforms/AIX AIXPlatformUtils.cpp
c/src/xercesc/util/Platforms/BeOS BeOSPlatformUtils.cpp
c/src/xercesc/util/Platforms/FreeBSD
FreeBSDPlatformUtils.cpp
c/src/xercesc/util/Platforms/HPUX HPPlatformUtils.cpp
c/src/xercesc/util/Platforms/Interix
InterixPlatformUtils.cpp
c/src/xercesc/util/Platforms/IRIX IRIXPlatformUtils.cpp
c/src/xercesc/util/Platforms/Linux LinuxPlatformUtils.cpp
c/src/xercesc/util/Platforms/NetBSD NetBSDPlatformUtils.cpp
c/src/xercesc/util/Platforms/OpenServer
OpenServerPlatformUtils.cpp
c/src/xercesc/util/Platforms/OS2 OS2PlatformUtils.cpp
c/src/xercesc/util/Platforms/OS390 OS390PlatformUtils.cpp
c/src/xercesc/util/Platforms/OS400 OS400PlatformUtils.cpp
c/src/xercesc/util/Platforms/QNX QNXPlatformUtils.cpp
c/src/xercesc/util/Platforms/Solaris
SolarisPlatformUtils.cpp
c/src/xercesc/util/Platforms/Tru64 Tru64PlatformUtils.cpp
c/src/xercesc/util/Platforms/UnixWare
UnixWarePlatformUtils.cpp
Log:
Change platform mutex code to do a panic instead of throwing an exception as
the exception code uses mutexes and this can result in infinite recursion.
Revision Changes Path
1.3 +7 -1 xml-xerces/c/src/xercesc/util/PanicHandler.cpp
Index: PanicHandler.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/xercesc/util/PanicHandler.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- PanicHandler.cpp 8 Sep 2004 13:56:22 -0000 1.2
+++ PanicHandler.cpp 5 Apr 2005 18:36:00 -0000 1.3
@@ -17,6 +17,9 @@
/*
* $Id$
* $Log$
+ * Revision 1.3 2005/04/05 18:36:00 cargilld
+ * Change platform mutex code to do a panic instead of throwing an exception
as the exception code uses mutexes and this can result in infinite recursion.
+ *
* Revision 1.2 2004/09/08 13:56:22 peiyongz
* Apache License Version 2.0
*
@@ -61,6 +64,9 @@
case Panic_SystemInit:
reasonStr = "Cannot initialize the system or mutex";
break;
+ case Panic_MutexErr:
+ reasonStr = "Cannot create, lock or unlock a mutex";
+ break;
default:
reasonStr = "Unknown reason";
break;
1.9 +5 -2 xml-xerces/c/src/xercesc/util/PanicHandler.hpp
Index: PanicHandler.hpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/xercesc/util/PanicHandler.hpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- PanicHandler.hpp 20 Oct 2004 15:18:35 -0000 1.8
+++ PanicHandler.hpp 5 Apr 2005 18:36:00 -0000 1.9
@@ -16,6 +16,9 @@
/*
* $Log$
+ * Revision 1.9 2005/04/05 18:36:00 cargilld
+ * Change platform mutex code to do a panic instead of throwing an exception
as the exception code uses mutexes and this can result in infinite recursion.
+ *
* Revision 1.8 2004/10/20 15:18:35 knoaman
* Allow option of initializing static data in XMLPlatformUtils::Initialize
*
@@ -89,7 +92,7 @@
, Panic_SynchronizationErr
, Panic_SystemInit
, Panic_AllStaticInitErr
-
+ , Panic_MutexErr
, PanicReasons_Count
};
//@}
1.24 +6 -6
xml-xerces/c/src/xercesc/util/Platforms/AIX/AIXPlatformUtils.cpp
Index: AIXPlatformUtils.cpp
===================================================================
RCS file:
/home/cvs/xml-xerces/c/src/xercesc/util/Platforms/AIX/AIXPlatformUtils.cpp,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- AIXPlatformUtils.cpp 8 Sep 2004 13:56:38 -0000 1.23
+++ AIXPlatformUtils.cpp 5 Apr 2005 18:36:00 -0000 1.24
@@ -378,7 +378,7 @@
return;
if (pthread_mutex_lock( (pthread_mutex_t*)mtxHandle))
{
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
XMLExcepts::Mutex_CouldNotLock, fgMemoryManager);
+ panic(PanicHandler::Panic_MutexErr);
}
}
@@ -387,7 +387,7 @@
pthread_mutex_t* mutex = new pthread_mutex_t;
if (mutex == NULL)
{
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
XMLExcepts::Mutex_CouldNotCreate, fgMemoryManager);
+ panic(PanicHandler::Panic_MutexErr);
}
pthread_mutexattr_t* attr = new pthread_mutexattr_t;
#if defined(XML_USE_DCE)
@@ -395,7 +395,7 @@
pthread_mutexattr_setkind_np(attr, MUTEX_RECURSIVE_NP);
if (pthread_mutex_init(mutex, *attr))
{
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
XMLExcepts::Mutex_CouldNotCreate, fgMemoryManager);
+ panic(PanicHandler::Panic_MutexErr);
}
pthread_mutexattr_delete(attr);
#else
@@ -407,7 +407,7 @@
#endif
if (pthread_mutex_init(mutex, attr))
{
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
XMLExcepts::Mutex_CouldNotCreate, fgMemoryManager);
+ panic(PanicHandler::Panic_MutexErr);
}
pthread_mutexattr_destroy(attr);
#endif
@@ -420,7 +420,7 @@
return;
if (pthread_mutex_unlock( (pthread_mutex_t*)mtxHandle))
{
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
XMLExcepts::Mutex_CouldNotUnlock, fgMemoryManager);
+ panic(PanicHandler::Panic_MutexErr);
}
}
1.15 +6 -6
xml-xerces/c/src/xercesc/util/Platforms/BeOS/BeOSPlatformUtils.cpp
Index: BeOSPlatformUtils.cpp
===================================================================
RCS file:
/home/cvs/xml-xerces/c/src/xercesc/util/Platforms/BeOS/BeOSPlatformUtils.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- BeOSPlatformUtils.cpp 8 Sep 2004 13:56:38 -0000 1.14
+++ BeOSPlatformUtils.cpp 5 Apr 2005 18:36:00 -0000 1.15
@@ -16,6 +16,9 @@
/*
* $Log$
+ * Revision 1.15 2005/04/05 18:36:00 cargilld
+ * Change platform mutex code to do a panic instead of throwing an exception
as the exception code uses mutexes and this can result in infinite recursion.
+ *
* Revision 1.14 2004/09/08 13:56:38 peiyongz
* Apache License Version 2.0
*
@@ -477,8 +480,7 @@
pthread_mutexattr_settype(attr, PTHREAD_MUTEX_RECURSIVE_NP);
if (pthread_mutex_init(mutex, attr))
{
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
- XMLExcepts::Mutex_CouldNotCreate, fgMemoryManager);
+ panic(PanicHandler::Panic_MutexErr);
}
pthread_mutexattr_destroy(attr);
delete attr;
@@ -506,8 +508,7 @@
{
if (pthread_mutex_lock((pthread_mutex_t*) mtxHandle))
{
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
- XMLExcepts::Mutex_CouldNotLock, fgMemoryManager);
+ panic(PanicHandler::Panic_MutexErr);
}
}
}
@@ -519,8 +520,7 @@
{
if (pthread_mutex_unlock((pthread_mutex_t*) mtxHandle))
{
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
- XMLExcepts::Mutex_CouldNotUnlock, fgMemoryManager);
+ panic(PanicHandler::Panic_MutexErr);
}
}
}
1.24 +6 -6
xml-xerces/c/src/xercesc/util/Platforms/FreeBSD/FreeBSDPlatformUtils.cpp
Index: FreeBSDPlatformUtils.cpp
===================================================================
RCS file:
/home/cvs/xml-xerces/c/src/xercesc/util/Platforms/FreeBSD/FreeBSDPlatformUtils.cpp,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- FreeBSDPlatformUtils.cpp 8 Sep 2004 13:56:39 -0000 1.23
+++ FreeBSDPlatformUtils.cpp 5 Apr 2005 18:36:00 -0000 1.24
@@ -16,6 +16,9 @@
/*
* $Log$
+ * Revision 1.24 2005/04/05 18:36:00 cargilld
+ * Change platform mutex code to do a panic instead of throwing an exception
as the exception code uses mutexes and this can result in infinite recursion.
+ *
* Revision 1.23 2004/09/08 13:56:39 peiyongz
* Apache License Version 2.0
*
@@ -523,8 +526,7 @@
pthread_mutexattr_settype(attr, PTHREAD_MUTEX_RECURSIVE);
if (pthread_mutex_init(mutex, attr))
{
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
- XMLExcepts::Mutex_CouldNotCreate, fgMemoryManager);
+ panic(PanicHandler::Panic_MutexErr);
}
pthread_mutexattr_destroy(attr);
delete attr;
@@ -552,8 +554,7 @@
{
if (pthread_mutex_lock((pthread_mutex_t*) mtxHandle))
{
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
- XMLExcepts::Mutex_CouldNotLock, fgMemoryManager);
+ panic(PanicHandler::Panic_MutexErr);
}
}
}
@@ -565,8 +566,7 @@
{
if (pthread_mutex_unlock((pthread_mutex_t*) mtxHandle))
{
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
- XMLExcepts::Mutex_CouldNotUnlock, fgMemoryManager);
+ panic(PanicHandler::Panic_MutexErr);
}
}
}
1.21 +7 -8
xml-xerces/c/src/xercesc/util/Platforms/HPUX/HPPlatformUtils.cpp
Index: HPPlatformUtils.cpp
===================================================================
RCS file:
/home/cvs/xml-xerces/c/src/xercesc/util/Platforms/HPUX/HPPlatformUtils.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- HPPlatformUtils.cpp 8 Sep 2004 13:56:39 -0000 1.20
+++ HPPlatformUtils.cpp 5 Apr 2005 18:36:01 -0000 1.21
@@ -16,6 +16,9 @@
/*
* $Log$
+ * Revision 1.21 2005/04/05 18:36:01 cargilld
+ * Change platform mutex code to do a panic instead of throwing an exception
as the exception code uses mutexes and this can result in infinite recursion.
+ *
* Revision 1.20 2004/09/08 13:56:39 peiyongz
* Apache License Version 2.0
*
@@ -565,8 +568,7 @@
pthread_mutexattr_setkind_np(attr, MUTEX_RECURSIVE_NP);
if (pthread_mutex_init(mutex, *attr))
{
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
- XMLExcepts::Mutex_CouldNotCreate, fgMemoryManager);
+ panic(PanicHandler::Panic_MutexErr);
}
pthread_mutexattr_delete(attr);
#else
@@ -574,8 +576,7 @@
pthread_mutexattr_settype(attr, PTHREAD_MUTEX_RECURSIVE);
if (pthread_mutex_init(mutex, attr))
{
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
- XMLExcepts::Mutex_CouldNotCreate, fgMemoryManager);
+ panic(PanicHandler::Panic_MutexErr);
}
pthread_mutexattr_destroy(attr);
#endif
@@ -602,8 +603,7 @@
{
if (pthread_mutex_lock((pthread_mutex_t *) mtxHandle))
{
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
- XMLExcepts::Mutex_CouldNotLock, fgMemoryManager);
+ panic(PanicHandler::Panic_MutexErr);
}
}
}
@@ -614,8 +614,7 @@
{
if (pthread_mutex_unlock((pthread_mutex_t *) mtxHandle))
{
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
- XMLExcepts::Mutex_CouldNotUnlock, fgMemoryManager);
+ panic(PanicHandler::Panic_MutexErr);
}
}
}
1.3 +6 -6
xml-xerces/c/src/xercesc/util/Platforms/Interix/InterixPlatformUtils.cpp
Index: InterixPlatformUtils.cpp
===================================================================
RCS file:
/home/cvs/xml-xerces/c/src/xercesc/util/Platforms/Interix/InterixPlatformUtils.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- InterixPlatformUtils.cpp 8 Sep 2004 13:56:40 -0000 1.2
+++ InterixPlatformUtils.cpp 5 Apr 2005 18:36:01 -0000 1.3
@@ -16,6 +16,9 @@
/*
* $Log$
+ * Revision 1.3 2005/04/05 18:36:01 cargilld
+ * Change platform mutex code to do a panic instead of throwing an exception
as the exception code uses mutexes and this can result in infinite recursion.
+ *
* Revision 1.2 2004/09/08 13:56:40 peiyongz
* Apache License Version 2.0
*
@@ -428,8 +431,7 @@
pthread_mutexattr_settype(attr, PTHREAD_MUTEX_RECURSIVE);
if (pthread_mutex_init(mutex, attr))
{
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
- XMLExcepts::Mutex_CouldNotCreate, fgMemoryManager);
+ panic(PanicHandler::Panic_MutexErr);
}
pthread_mutexattr_destroy(attr);
delete attr;
@@ -457,8 +459,7 @@
{
if (pthread_mutex_lock((pthread_mutex_t*) mtxHandle))
{
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
- XMLExcepts::Mutex_CouldNotLock, fgMemoryManager);
+ panic(PanicHandler::Panic_MutexErr);
}
}
}
@@ -470,8 +471,7 @@
{
if (pthread_mutex_unlock((pthread_mutex_t*) mtxHandle))
{
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
- XMLExcepts::Mutex_CouldNotUnlock, fgMemoryManager);
+ panic(PanicHandler::Panic_MutexErr);
}
}
}
1.21 +9 -12
xml-xerces/c/src/xercesc/util/Platforms/IRIX/IRIXPlatformUtils.cpp
Index: IRIXPlatformUtils.cpp
===================================================================
RCS file:
/home/cvs/xml-xerces/c/src/xercesc/util/Platforms/IRIX/IRIXPlatformUtils.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- IRIXPlatformUtils.cpp 8 Sep 2004 13:56:39 -0000 1.20
+++ IRIXPlatformUtils.cpp 5 Apr 2005 18:36:01 -0000 1.21
@@ -16,6 +16,9 @@
/*
* $Log$
+ * Revision 1.21 2005/04/05 18:36:01 cargilld
+ * Change platform mutex code to do a panic instead of throwing an exception
as the exception code uses mutexes and this can result in infinite recursion.
+ *
* Revision 1.20 2004/09/08 13:56:39 peiyongz
* Apache License Version 2.0
*
@@ -563,8 +566,7 @@
return (void*)sema;
}
else
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
- XMLExcepts::Mutex_CouldNotCreate, fgMemoryManager);
+ panic(PanicHandler::Panic_MutexErr);
}
else {
// arena==0; therefore platformInit hasn't been called.
@@ -593,8 +595,7 @@
if (mtxHandle != NULL) {
if (uspsema (mtxHandle) != 1)
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
- XMLExcepts::Mutex_CouldNotLock, fgMemoryManager);
+ panic(PanicHandler::Panic_MutexErr);
}
}
@@ -606,8 +607,7 @@
{
if (usvsema(mtxHandle) == -1)
{
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
- XMLExcepts::Mutex_CouldNotUnlock, fgMemoryManager);
+ panic(PanicHandler::Panic_MutexErr);
}
}
}
@@ -650,8 +650,7 @@
pthread_mutexattr_settype(attr, PTHREAD_MUTEX_RECURSIVE);
if (pthread_mutex_init(mutex, attr))
{
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
- XMLExcepts::Mutex_CouldNotCreate, fgMemoryManager);
+ panic(PanicHandler::Panic_MutexErr);
}
pthread_mutexattr_destroy(attr);
delete attr;
@@ -679,8 +678,7 @@
{
if (pthread_mutex_lock((pthread_mutex_t*) mtxHandle))
{
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
- XMLExcepts::Mutex_CouldNotLock, fgMemoryManager);
+ panic(PanicHandler::Panic_MutexErr);
}
}
}
@@ -692,8 +690,7 @@
{
if (pthread_mutex_unlock((pthread_mutex_t*) mtxHandle))
{
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
- XMLExcepts::Mutex_CouldNotUnlock, fgMemoryManager);
+ panic(PanicHandler::Panic_MutexErr);
}
}
}
1.26 +6 -6
xml-xerces/c/src/xercesc/util/Platforms/Linux/LinuxPlatformUtils.cpp
Index: LinuxPlatformUtils.cpp
===================================================================
RCS file:
/home/cvs/xml-xerces/c/src/xercesc/util/Platforms/Linux/LinuxPlatformUtils.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- LinuxPlatformUtils.cpp 12 Jan 2005 20:06:55 -0000 1.25
+++ LinuxPlatformUtils.cpp 5 Apr 2005 18:36:01 -0000 1.26
@@ -16,6 +16,9 @@
/*
* $Log$
+ * Revision 1.26 2005/04/05 18:36:01 cargilld
+ * Change platform mutex code to do a panic instead of throwing an exception
as the exception code uses mutexes and this can result in infinite recursion.
+ *
* Revision 1.25 2005/01/12 20:06:55 cargilld
* Remove warning messages.
*
@@ -583,8 +586,7 @@
pthread_mutexattr_settype(attr, PTHREAD_MUTEX_RECURSIVE_NP);
if (pthread_mutex_init(mutex, attr))
{
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
- XMLExcepts::Mutex_CouldNotCreate, fgMemoryManager);
+ panic(PanicHandler::Panic_MutexErr);
}
pthread_mutexattr_destroy(attr);
delete attr;
@@ -612,8 +614,7 @@
{
if (pthread_mutex_lock((pthread_mutex_t*) mtxHandle))
{
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
- XMLExcepts::Mutex_CouldNotLock, fgMemoryManager);
+ panic(PanicHandler::Panic_MutexErr);
}
}
}
@@ -625,8 +626,7 @@
{
if (pthread_mutex_unlock((pthread_mutex_t*) mtxHandle))
{
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
- XMLExcepts::Mutex_CouldNotUnlock, fgMemoryManager);
+ panic(PanicHandler::Panic_MutexErr);
}
}
}
1.14 +3 -6
xml-xerces/c/src/xercesc/util/Platforms/NetBSD/NetBSDPlatformUtils.cpp
Index: NetBSDPlatformUtils.cpp
===================================================================
RCS file:
/home/cvs/xml-xerces/c/src/xercesc/util/Platforms/NetBSD/NetBSDPlatformUtils.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- NetBSDPlatformUtils.cpp 8 Nov 2004 14:01:09 -0000 1.13
+++ NetBSDPlatformUtils.cpp 5 Apr 2005 18:36:01 -0000 1.14
@@ -494,8 +494,7 @@
pthread_mutexattr_settype(attr, PTHREAD_MUTEX_RECURSIVE);
if (pthread_mutex_init(mutex, attr))
{
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
- XMLExcepts::Mutex_CouldNotCreate, fgMemoryManager);
+ panic(PanicHandler::Panic_MutexErr);
}
pthread_mutexattr_destroy(attr);
delete attr;
@@ -523,8 +522,7 @@
{
if (pthread_mutex_lock((pthread_mutex_t*) mtxHandle))
{
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
- XMLExcepts::Mutex_CouldNotLock, fgMemoryManager);
+ panic(PanicHandler::Panic_MutexErr);
}
}
}
@@ -536,8 +534,7 @@
{
if (pthread_mutex_unlock((pthread_mutex_t*) mtxHandle))
{
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
- XMLExcepts::Mutex_CouldNotUnlock, fgMemoryManager);
+ panic(PanicHandler::Panic_MutexErr);
}
}
}
1.17 +6 -6
xml-xerces/c/src/xercesc/util/Platforms/OpenServer/OpenServerPlatformUtils.cpp
Index: OpenServerPlatformUtils.cpp
===================================================================
RCS file:
/home/cvs/xml-xerces/c/src/xercesc/util/Platforms/OpenServer/OpenServerPlatformUtils.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- OpenServerPlatformUtils.cpp 8 Sep 2004 13:56:42 -0000 1.16
+++ OpenServerPlatformUtils.cpp 5 Apr 2005 18:36:01 -0000 1.17
@@ -16,6 +16,9 @@
/*
* $Log$
+ * Revision 1.17 2005/04/05 18:36:01 cargilld
+ * Change platform mutex code to do a panic instead of throwing an exception
as the exception code uses mutexes and this can result in infinite recursion.
+ *
* Revision 1.16 2004/09/08 13:56:42 peiyongz
* Apache License Version 2.0
*
@@ -467,8 +470,7 @@
RecursiveMutex() {
if (pthread_mutex_init(&mutex, NULL))
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
- XMLExcepts::Mutex_CouldNotCreate,
XMLPlatformUtils::fgMemoryManager);
+ XMLPlatformUtils::panic(PanicHandler::Panic_MutexErr);
recursionCount = 0;
tid = 0;
}
@@ -486,8 +488,7 @@
return;
}
if (pthread_mutex_lock(&mutex) != 0)
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
- XMLExcepts::Mutex_CouldNotLock,
XMLPlatformUtils::fgMemoryManager);
+ XMLPlatformUtils::panic(PanicHandler::Panic_MutexErr);
tid = pthread_self();
recursionCount = 1;
}
@@ -497,8 +498,7 @@
return;
if (pthread_mutex_unlock(&mutex) != 0)
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
- XMLExcepts::Mutex_CouldNotUnlock,
XMLPlatformUtils::fgMemoryManager);
+ XMLPlatformUtils::panic(PanicHandler::Panic_MutexErr);
tid = 0;
}
};
1.11 +4 -4
xml-xerces/c/src/xercesc/util/Platforms/OS2/OS2PlatformUtils.cpp
Index: OS2PlatformUtils.cpp
===================================================================
RCS file:
/home/cvs/xml-xerces/c/src/xercesc/util/Platforms/OS2/OS2PlatformUtils.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- OS2PlatformUtils.cpp 8 Sep 2004 13:56:41 -0000 1.10
+++ OS2PlatformUtils.cpp 5 Apr 2005 18:36:01 -0000 1.11
@@ -262,7 +262,7 @@
if (DosRequestMutexSem( (HMTX)mtxHandle,(ULONG) SEM_INDEFINITE_WAIT) )
{
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
XMLExcepts::Mutex_CouldNotLock, fgMemoryManager);
+ panic(PanicHandler::Panic_MutexErr);
}
#endif
}
@@ -273,7 +273,7 @@
HMTX hRet; // Mutex Handle
if (DosCreateMutexSem(NULL, &hRet, 0, FALSE))
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
XMLExcepts::Mutex_CouldNotCreate, fgMemoryManager);
+ panic(PanicHandler::Panic_MutexErr);
return (void*)hRet;
#else
return 0;
@@ -288,7 +288,7 @@
if (DosReleaseMutexSem( (HMTX)mtxHandle))
{
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
XMLExcepts::Mutex_CouldNotUnlock, fgMemoryManager);
+ panic(PanicHandler::Panic_MutexErr);
}
#endif
}
1.20 +5 -6
xml-xerces/c/src/xercesc/util/Platforms/OS390/OS390PlatformUtils.cpp
Index: OS390PlatformUtils.cpp
===================================================================
RCS file:
/home/cvs/xml-xerces/c/src/xercesc/util/Platforms/OS390/OS390PlatformUtils.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- OS390PlatformUtils.cpp 8 Sep 2004 13:56:41 -0000 1.19
+++ OS390PlatformUtils.cpp 5 Apr 2005 18:36:01 -0000 1.20
@@ -981,7 +981,7 @@
if (isPosixEnabled) {
if (pthread_mutex_lock( (pthread_mutex_t*)mtxHandle))
{
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
XMLExcepts::Mutex_CouldNotLock, fgMemoryManager);
+ panic(PanicHandler::Panic_MutexErr);
}
} // __isPosixOn
else {
@@ -1001,7 +1001,7 @@
pthread_mutex_t* mutex = new pthread_mutex_t;
if (mutex == NULL)
{
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
XMLExcepts::Mutex_CouldNotCreate, fgMemoryManager);
+ panic(PanicHandler::Panic_MutexErr);
}
pthread_mutexattr_t* attr = new pthread_mutexattr_t;
@@ -1009,8 +1009,7 @@
pthread_mutexattr_setkind_np(attr, __MUTEX_RECURSIVE);
if (pthread_mutex_init(mutex, attr))
{
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
- XMLExcepts::Mutex_CouldNotCreate, fgMemoryManager);
+ panic(PanicHandler::Panic_MutexErr);
}
pthread_mutexattr_destroy(attr);
delete attr;
@@ -1031,7 +1030,7 @@
if (isPosixEnabled) {
if (pthread_mutex_unlock( (pthread_mutex_t*)mtxHandle))
{
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
XMLExcepts::Mutex_CouldNotUnlock, fgMemoryManager);
+ panic(PanicHandler::Panic_MutexErr);
}
} // __isPosixOn
else {
1.21 +5 -5
xml-xerces/c/src/xercesc/util/Platforms/OS400/OS400PlatformUtils.cpp
Index: OS400PlatformUtils.cpp
===================================================================
RCS file:
/home/cvs/xml-xerces/c/src/xercesc/util/Platforms/OS400/OS400PlatformUtils.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- OS400PlatformUtils.cpp 23 Sep 2004 21:44:13 -0000 1.20
+++ OS400PlatformUtils.cpp 5 Apr 2005 18:36:01 -0000 1.21
@@ -562,7 +562,7 @@
RecursiveMutex() {
if (pthread_mutex_init(&mutex, NULL))
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
XMLExcepts::Mutex_CouldNotCreate, XMLPlatformUtils::fgMemoryManager);
+
XMLPlatformUtils::panic(PanicHandler::Panic_MutexErr);
recursionCount = 0;
tid.reservedHiId = 0;
tid.reservedLoId = 0;
@@ -581,7 +581,7 @@
return;
}
if (pthread_mutex_lock(&mutex) != 0)
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
XMLExcepts::Mutex_CouldNotLock, XMLPlatformUtils::fgMemoryManager);
+
XMLPlatformUtils::panic(PanicHandler::Panic_MutexErr);
tid = pthread_self();
recursionCount = 1;
}
@@ -592,8 +592,8 @@
return;
if (pthread_mutex_unlock(&mutex) != 0)
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
XMLExcepts::Mutex_CouldNotUnlock, XMLPlatformUtils::fgMemoryManager);
- tid.reservedHandle= 0;
+
XMLPlatformUtils::panic(PanicHandler::Panic_MutexErr);
+ tid.reservedHandle= 0;
tid.reservedHiId = 0;
tid.reservedLoId = 0;
}
1.11 +4 -4
xml-xerces/c/src/xercesc/util/Platforms/QNX/QNXPlatformUtils.cpp
Index: QNXPlatformUtils.cpp
===================================================================
RCS file:
/home/cvs/xml-xerces/c/src/xercesc/util/Platforms/QNX/QNXPlatformUtils.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- QNXPlatformUtils.cpp 8 Sep 2004 13:56:42 -0000 1.10
+++ QNXPlatformUtils.cpp 5 Apr 2005 18:36:01 -0000 1.11
@@ -261,7 +261,7 @@
pthread_mutex_t *mutex = new pthread_mutex_t;
if( pthread_mutex_init( mutex, &attr ) != EOK ) {
delete mutex;
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
XMLExcepts::Mutex_CouldNotCreate, fgMemoryManager);
+ panic(PanicHandler::Panic_MutexErr);
}
pthread_mutexattr_destroy( &attr );
return mutex;
@@ -279,7 +279,7 @@
void XMLPlatformUtils::lockMutex(void* const mtxHandle)
{
if( mtxHandle == NULL || pthread_mutex_lock( (pthread_mutex_t
*)mtxHandle ) != EOK ) {
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
XMLExcepts::Mutex_CouldNotLock, fgMemoryManager);
+ panic(PanicHandler::Panic_MutexErr);
}
}
@@ -287,7 +287,7 @@
void XMLPlatformUtils::unlockMutex(void* const mtxHandle)
{
if( mtxHandle == NULL || pthread_mutex_unlock( (pthread_mutex_t
*)mtxHandle ) != EOK ) {
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
XMLExcepts::Mutex_CouldNotLock, fgMemoryManager);
+ panic(PanicHandler::Panic_MutexErr);
}
}
1.29 +6 -8
xml-xerces/c/src/xercesc/util/Platforms/Solaris/SolarisPlatformUtils.cpp
Index: SolarisPlatformUtils.cpp
===================================================================
RCS file:
/home/cvs/xml-xerces/c/src/xercesc/util/Platforms/Solaris/SolarisPlatformUtils.cpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- SolarisPlatformUtils.cpp 30 Sep 2004 14:01:41 -0000 1.28
+++ SolarisPlatformUtils.cpp 5 Apr 2005 18:36:01 -0000 1.29
@@ -437,7 +437,7 @@
RecursiveMutex() {
if (pthread_mutex_init(&mutex, NULL))
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
XMLExcepts::Mutex_CouldNotCreate, XMLPlatformUtils::fgMemoryManager);
+ XMLPlatformUtils::panic(PanicHandler::Panic_MutexErr);
recursionCount = 0;
tid = 0;
}
@@ -454,7 +454,7 @@
return;
}
if (pthread_mutex_lock(&mutex) != 0)
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
XMLExcepts::Mutex_CouldNotLock, XMLPlatformUtils::fgMemoryManager);
+ XMLPlatformUtils::panic(PanicHandler::Panic_MutexErr);
tid = pthread_self();
recursionCount = 1;
}
@@ -465,7 +465,7 @@
return;
if (pthread_mutex_unlock(&mutex) != 0)
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
XMLExcepts::Mutex_CouldNotUnlock, XMLPlatformUtils::fgMemoryManager);
+ XMLPlatformUtils::panic(PanicHandler::Panic_MutexErr);
tid = 0;
}
};
@@ -477,16 +477,14 @@
pthread_mutex_t* mutex = new pthread_mutex_t;
if (mutex == NULL)
{
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
- XMLExcepts::Mutex_CouldNotCreate, fgMemoryManager);
+ panic(PanicHandler::Panic_MutexErr);
}
pthread_mutexattr_t attr;
pthread_mutexattr_create(&attr);
pthread_mutexattr_setkind_np(&attr, MUTEX_RECURSIVE_NP);
if (pthread_mutex_init(mutex, attr))
{
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
- XMLExcepts::Mutex_CouldNotCreate, fgMemoryManager);
+ panic(PanicHandler::Panic_MutexErr);
}
pthread_mutexattr_delete(&attr);
return (void*)(mutex);
1.19 +4 -4
xml-xerces/c/src/xercesc/util/Platforms/Tru64/Tru64PlatformUtils.cpp
Index: Tru64PlatformUtils.cpp
===================================================================
RCS file:
/home/cvs/xml-xerces/c/src/xercesc/util/Platforms/Tru64/Tru64PlatformUtils.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- Tru64PlatformUtils.cpp 8 Sep 2004 13:56:43 -0000 1.18
+++ Tru64PlatformUtils.cpp 5 Apr 2005 18:36:01 -0000 1.19
@@ -424,7 +424,7 @@
RecursiveMutex()
{
if (pthread_mutex_init(&mutex, NULL))
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
XMLExcepts::Mutex_CouldNotCreate, XMLPlatformUtils::fgMemoryManager);
+ XMLPlatformUtils::panic(PanicHandler::Panic_MutexErr);
recursionCount = 0;
tid = 0;
}
@@ -443,7 +443,7 @@
return;
}
if (pthread_mutex_lock(&mutex) != 0)
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
XMLExcepts::Mutex_CouldNotLock, XMLPlatformUtils::fgMemoryManager);
+ XMLPlatformUtils::panic(PanicHandler::Panic_MutexErr);
tid = pthread_self();
recursionCount = 1;
}
@@ -455,7 +455,7 @@
return;
if (pthread_mutex_unlock(&mutex) != 0)
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
XMLExcepts::Mutex_CouldNotUnlock, XMLPlatformUtils::fgMemoryManager);
+ XMLPlatformUtils::panic(PanicHandler::Panic_MutexErr);
tid = 0;
}
};
1.20 +6 -3
xml-xerces/c/src/xercesc/util/Platforms/UnixWare/UnixWarePlatformUtils.cpp
Index: UnixWarePlatformUtils.cpp
===================================================================
RCS file:
/home/cvs/xml-xerces/c/src/xercesc/util/Platforms/UnixWare/UnixWarePlatformUtils.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- UnixWarePlatformUtils.cpp 13 Jan 2005 12:36:02 -0000 1.19
+++ UnixWarePlatformUtils.cpp 5 Apr 2005 18:36:01 -0000 1.20
@@ -16,6 +16,9 @@
/*
* $Log$
+ * Revision 1.20 2005/04/05 18:36:01 cargilld
+ * Change platform mutex code to do a panic instead of throwing an exception
as the exception code uses mutexes and this can result in infinite recursion.
+ *
* Revision 1.19 2005/01/13 12:36:02 amassari
* Support for UnixWare 7.1.1 (jira# 1148)
*
@@ -515,7 +518,7 @@
RecursiveMutex() {
if (pthread_mutex_init(&mutex, NULL))
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
XMLExcepts::Mutex_CouldNotCreate, XMLPlatformUtils::fgMemoryManager);
+ XMLPlatformUtils::panic(PanicHandler::Panic_MutexErr);
recursionCount = 0;
tid = 0;
}
@@ -532,7 +535,7 @@
return;
}
if (pthread_mutex_lock(&mutex) != 0)
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
XMLExcepts::Mutex_CouldNotLock, XMLPlatformUtils::fgMemoryManager);
+ XMLPlatformUtils::panic(PanicHandler::Panic_MutexErr);
tid = pthread_self();
recursionCount = 1;
}
@@ -543,7 +546,7 @@
return;
if (pthread_mutex_unlock(&mutex) != 0)
- ThrowXMLwithMemMgr(XMLPlatformUtilsException,
XMLExcepts::Mutex_CouldNotUnlock, XMLPlatformUtils::fgMemoryManager);
+ XMLPlatformUtils::panic(PanicHandler::Panic_MutexErr);
tid = 0;
}
};
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]