removing NS_MT_SUPPORTED define. b=186494, r=dougt, r=seawood

This commit is contained in:
dougt%netscape.com 2003-03-05 23:30:22 +00:00
Родитель 565069647f
Коммит c5ac287dab
8 изменённых файлов: 5 добавлений и 62 удалений

Просмотреть файл

@ -236,9 +236,6 @@ MOZ_TRACE_MALLOC=1
!endif
# For modular netlib support.
CFLAGS=$(CFLAGS) -DNS_MT_SUPPORTED -DNETLIB_THREAD -DNS_NET_FILE
# Defines for cookie management feature...
CFLAGS=$(CFLAGS) -DCookieManagement

Просмотреть файл

@ -4583,10 +4583,6 @@ if test "$MOZ_LDAP_XPCOM"; then
fi
fi
dnl make sure that we compile in multi-processor support
NS_MT_SUPPORTED=1
AC_DEFINE(NS_MT_SUPPORTED)
if test "$SUNCTL"; then
dnl older versions of glib do not seem to have gmodule which ctl needs
_SAVE_CFLAGS=$CFLAGS

Просмотреть файл

@ -137,10 +137,6 @@ STDMETHODIMP_(ULONG) _class::Release(void) \
return mRefCnt; \
}
#ifndef NS_MT_SUPPORTED
#error "We need MT support
#endif
extern const nsID NSID_IDISPATCH;
/**

Просмотреть файл

@ -37,9 +37,7 @@
#ifndef nsISupportsObsolete_h__
#define nsISupportsObsolete_h__
#if defined(NS_MT_SUPPORTED)
#include "prcmon.h"
#endif /* NS_MT_SUPPORTED */
///////////////////////////////////////////////////////////////////////////////
@ -258,21 +256,11 @@ NS_IMPL_SETTER_STR(_class::Set##_postfix, _member)
{ 0x88210890, 0x47a6, 0x11d2, \
{0xbe, 0xc3, 0x00, 0x80, 0x5f, 0x8a, 0x66, 0xdc} }
#if defined(NS_MT_SUPPORTED)
#define NS_LOCK_INSTANCE() \
PR_CEnterMonitor((void*)this)
#define NS_UNLOCK_INSTANCE() \
PR_CExitMonitor((void*)this)
#else
#define NS_LOCK_INSTANCE()
#define NS_UNLOCK_INSTANCE()
#endif
/**
* This implements query interface with two assumptions: First, the
* class in question implements nsISupports and its own interface and

Просмотреть файл

@ -99,17 +99,12 @@ NS_MeanAndStdDev(double n, double sumOfValues, double sumOfSquaredValues,
#include "plhash.h"
#include "prmem.h"
#if defined(NS_MT_SUPPORTED)
#include "prlock.h"
static PRLock* gTraceLock;
#define LOCK_TRACELOG() PR_Lock(gTraceLock)
#define UNLOCK_TRACELOG() PR_Unlock(gTraceLock)
#else /* ! NT_MT_SUPPORTED */
#define LOCK_TRACELOG()
#define UNLOCK_TRACELOG()
#endif /* ! NS_MT_SUPPORTED */
static PLHashTable* gBloatView;
static PLHashTable* gTypesToLog;
@ -843,10 +838,7 @@ static void InitTraceLog(void)
gLogging = PR_TRUE;
}
#if defined(NS_MT_SUPPORTED)
gTraceLock = PR_NewLock();
#endif /* NS_MT_SUPPORTED */
}
#endif

Просмотреть файл

@ -99,17 +99,12 @@ NS_MeanAndStdDev(double n, double sumOfValues, double sumOfSquaredValues,
#include "plhash.h"
#include "prmem.h"
#if defined(NS_MT_SUPPORTED)
#include "prlock.h"
static PRLock* gTraceLock;
#define LOCK_TRACELOG() PR_Lock(gTraceLock)
#define UNLOCK_TRACELOG() PR_Unlock(gTraceLock)
#else /* ! NT_MT_SUPPORTED */
#define LOCK_TRACELOG()
#define UNLOCK_TRACELOG()
#endif /* ! NS_MT_SUPPORTED */
static PLHashTable* gBloatView;
static PLHashTable* gTypesToLog;
@ -843,10 +838,7 @@ static void InitTraceLog(void)
gLogging = PR_TRUE;
}
#if defined(NS_MT_SUPPORTED)
gTraceLock = PR_NewLock();
#endif /* NS_MT_SUPPORTED */
}
#endif

Просмотреть файл

@ -492,7 +492,7 @@ NS_ErrorAccordingToNSPR()
// This wrapper around PR_GetCurrentThread is simply here for debug builds so
// that clients linking with xpcom don't also have to link with nspr explicitly.
#if defined(NS_DEBUG) && defined(NS_MT_SUPPORTED)
#if defined(NS_DEBUG)
#include "nsISupportsUtils.h"
#include "prthread.h"
@ -534,6 +534,6 @@ NS_CheckThreadSafe(void* owningThread, const char* msg)
}
}
#endif // !(defined(NS_DEBUG) && defined(NS_MT_SUPPORTED))
#endif // !(defined(NS_DEBUG)
////////////////////////////////////////////////////////////////////////////////

Просмотреть файл

@ -65,7 +65,7 @@
////////////////////////////////////////////////////////////////////////////////
// Macros to help detect thread-safety:
#if defined(NS_DEBUG) && defined(NS_MT_SUPPORTED) && !defined(XPCOM_GLUE)
#if defined(NS_DEBUG) && !defined(XPCOM_GLUE)
extern "C" NS_COM void* NS_CurrentThread(void);
extern "C" NS_COM void NS_CheckThreadSafe(void* owningThread,
@ -84,12 +84,12 @@ private:
#define NS_ASSERT_OWNINGTHREAD(_class) \
NS_CheckThreadSafe(_mOwningThread.GetThread(), #_class " not thread-safe")
#else // !(defined(NS_DEBUG) && defined(NS_MT_SUPPORTED))
#else // !(defined(NS_DEBUG))
#define NS_DECL_OWNINGTHREAD /* nothing */
#define NS_ASSERT_OWNINGTHREAD(_class) ((void)0)
#endif // !(defined(NS_DEBUG) && defined(NS_MT_SUPPORTED))
#endif // !(defined(NS_DEBUG))
class nsAutoRefCnt {
@ -696,8 +696,6 @@ NS_IMETHODIMP_(nsrefcnt) Class::Release(void) \
*
*/
#if defined(NS_MT_SUPPORTED)
/**
* Use this macro to implement the AddRef method for a given <i>_class</i>
* @param _class The name of the class implementing the method
@ -735,22 +733,6 @@ NS_IMETHODIMP_(nsrefcnt) _class::Release(void) \
return count; \
}
#else // defined(NS_MT_SUPPORTED)
/**
* Convenience macro for implementing all nsISupports methods for
* a simple class.
* @param _class The name of the class implementing the method
* @param _classiiddef The name of the #define symbol that defines the IID
* for the class (e.g. NS_ISUPPORTS_IID)
*/
#define NS_IMPL_THREADSAFE_ADDREF(_class) NS_IMPL_ADDREF(_class)
#define NS_IMPL_THREADSAFE_RELEASE(_class) NS_IMPL_RELEASE(_class)
#endif /* !NS_MT_SUPPORTED */
#define NS_IMPL_THREADSAFE_ISUPPORTS0(_class) \
NS_IMPL_THREADSAFE_ADDREF(_class) \
NS_IMPL_THREADSAFE_RELEASE(_class) \