8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 06:03:02 +01:00

Threading cleanup. More to follow.

This commit is contained in:
dimitr 2006-04-30 17:49:32 +00:00
parent ee21ec2599
commit 61bd8dbc05
4 changed files with 6 additions and 10 deletions

View File

@ -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

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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