From 61bd8dbc05c0d6de9716aac6193aa62c2840c90e Mon Sep 17 00:00:00 2001 From: dimitr Date: Sun, 30 Apr 2006 17:49:32 +0000 Subject: [PATCH] Threading cleanup. More to follow. --- src/jrd/dyn.epp | 4 ++-- src/jrd/fun.epp | 4 ++-- src/jrd/grant.epp | 4 ++-- src/jrd/jrd.h | 4 ---- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/jrd/dyn.epp b/src/jrd/dyn.epp index 1984199632..2cb6098f38 100644 --- a/src/jrd/dyn.epp +++ b/src/jrd/dyn.epp @@ -137,7 +137,7 @@ void DYN_ddl(Attachment* attachment, jrd_tra* transaction, USHORT length, THREAD_ENTER(); #else #ifdef V4_THREADING - V4_JRD_MUTEX_LOCK(dbb->dbb_mutexes + DBB_MUTX_dyn); + THD_JRD_MUTEX_LOCK(dbb->dbb_mutexes + DBB_MUTX_dyn); #endif #endif @@ -152,7 +152,7 @@ void DYN_ddl(Attachment* attachment, jrd_tra* transaction, USHORT length, THD_MUTEX_UNLOCK(dbb->dbb_mutexes + DBB_MUTX_dyn); #else #ifdef V4_THREADING - V4_JRD_MUTEX_UNLOCK(dbb->dbb_mutexes + DBB_MUTX_dyn); + THD_JRD_MUTEX_UNLOCK(dbb->dbb_mutexes + DBB_MUTX_dyn); #endif #endif diff --git a/src/jrd/fun.epp b/src/jrd/fun.epp index 07625186e2..b76f40ba2c 100644 --- a/src/jrd/fun.epp +++ b/src/jrd/fun.epp @@ -551,7 +551,7 @@ UserFunction* FUN_lookup_function(const Firebird::MetaName& name, bool ShowAcces /* Start by looking for already defined symbol */ #ifdef V4_THREADING - V4_JRD_MUTEX_LOCK(dbb->dbb_mutexes + DBB_MUTX_udf); + THD_JRD_MUTEX_LOCK(dbb->dbb_mutexes + DBB_MUTX_udf); #endif for (Symbol* symbol = Symbol::lookup(name); symbol; symbol = symbol->sym_homonym) { @@ -647,7 +647,7 @@ UserFunction* FUN_lookup_function(const Firebird::MetaName& name, bool ShowAcces REQUEST(irq_l_args) = request_arg; #ifdef V4_THREADING - V4_JRD_MUTEX_UNLOCK(dbb->dbb_mutexes + DBB_MUTX_udf); + THD_JRD_MUTEX_UNLOCK(dbb->dbb_mutexes + DBB_MUTX_udf); #endif return prior; } diff --git a/src/jrd/grant.epp b/src/jrd/grant.epp index fcddba46ea..9b9e5fe850 100644 --- a/src/jrd/grant.epp +++ b/src/jrd/grant.epp @@ -162,7 +162,7 @@ bool GRANT_privileges( thread_db* tdbb, SSHORT phase, DeferredWork* work, Database* dbb = tdbb->tdbb_database; #ifdef V4_THREADING - V4_JRD_MUTEX_LOCK(dbb->dbb_mutexes + DBB_MUTX_grant_priv); + THD_JRD_MUTEX_LOCK(dbb->dbb_mutexes + DBB_MUTX_grant_priv); #endif Firebird::MetaName s_class, owner, default_class; bool view; // unused after being retrieved. @@ -267,7 +267,7 @@ bool GRANT_privileges( thread_db* tdbb, SSHORT phase, DeferredWork* work, } #ifdef V4_THREADING - V4_JRD_MUTEX_UNLOCK(dbb->dbb_mutexes + DBB_MUTX_grant_priv); + THD_JRD_MUTEX_UNLOCK(dbb->dbb_mutexes + DBB_MUTX_grant_priv); #endif break; } diff --git a/src/jrd/jrd.h b/src/jrd/jrd.h index 905c461959..25e8bd105d 100644 --- a/src/jrd/jrd.h +++ b/src/jrd/jrd.h @@ -1157,15 +1157,11 @@ inline void SET_DBB(Jrd::Database* &dbb) { #ifdef V4_THREADING #define V4_JRD_MUTEX_LOCK(mutx) JRD_mutex_lock (mutx) #define V4_JRD_MUTEX_UNLOCK(mutx) JRD_mutex_unlock (mutx) -#define V4_JRD_RW_LOCK_LOCK(wlck, type) JRD_wlck_lock (wlck, type) -#define V4_JRD_RW_LOCK_UNLOCK(wlck) JRD_wlck_unlock (wlck) // BRS. 03/23/2003 // Those empty defines was substituted with #ifdef V4_THREADING //#else //#define V4_JRD_MUTEX_LOCK(mutx) //#define V4_JRD_MUTEX_UNLOCK(mutx) -//#define V4_JRD_RW_LOCK_LOCK(wlck, type) -//#define V4_JRD_RW_LOCK_UNLOCK(wlck) #endif #ifdef ANY_THREADING