mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 18:43:03 +01:00
Fixed solx86 build - not always offset_t and UINT64 are the same
This commit is contained in:
parent
9c4c8f4123
commit
6d66c28b13
@ -128,7 +128,8 @@ bool GlobalRWLock::lock(thread_db* tdbb, locklevel_t level, SSHORT wait, SLONG o
|
||||
SET_TDBB(tdbb);
|
||||
|
||||
fb_assert(owner_handle);
|
||||
|
||||
{
|
||||
SignalInhibit si;
|
||||
lockCounters();
|
||||
|
||||
COS_TRACE(("lock type=%i, level=%i, readerscount=%i, owner=%i", cached_lock->lck_type, level, readers.getCount(), owner_handle));
|
||||
@ -185,7 +186,7 @@ bool GlobalRWLock::lock(thread_db* tdbb, locklevel_t level, SSHORT wait, SLONG o
|
||||
internal_blocking++;
|
||||
|
||||
unlockCounters();
|
||||
|
||||
}
|
||||
// There is some congestion. Need to use the lock manager.
|
||||
// Request new lock at the new level. Several concurrent lock requests may
|
||||
// wait here in the same process in parallel.
|
||||
@ -208,6 +209,8 @@ bool GlobalRWLock::lock(thread_db* tdbb, locklevel_t level, SSHORT wait, SLONG o
|
||||
}
|
||||
COS_TRACE(("Lock is got, type=%i", cached_lock->lck_type));
|
||||
|
||||
{
|
||||
SignalInhibit si;
|
||||
lockCounters();
|
||||
|
||||
fb_assert(internal_blocking > 0);
|
||||
@ -257,7 +260,7 @@ bool GlobalRWLock::lock(thread_db* tdbb, locklevel_t level, SSHORT wait, SLONG o
|
||||
}
|
||||
|
||||
unlockCounters();
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -274,7 +277,11 @@ void GlobalRWLock::unlock(thread_db* tdbb, locklevel_t level, SLONG owner_handle
|
||||
if (level == LCK_read) {
|
||||
size_t n;
|
||||
if (!readers.find(owner_handle, n)) {
|
||||
static int x = 0;
|
||||
if (++x > 10)
|
||||
abort();
|
||||
ERR_bugcheck_msg("Attempt to call GlobalRWLock::unlock() while not holding a valid lock for logical owner");
|
||||
--x;
|
||||
}
|
||||
fb_assert(readers[n].entry_count > 0);
|
||||
readers[n].entry_count--;
|
||||
@ -348,6 +355,7 @@ void GlobalRWLock::changeLockOwner(thread_db* tdbb, locklevel_t level, SLONG old
|
||||
if (old_owner_handle == new_owner_handle)
|
||||
return;
|
||||
|
||||
SignalInhibit si;
|
||||
lockCounters();
|
||||
|
||||
if (level == LCK_read) {
|
||||
@ -381,6 +389,7 @@ void GlobalRWLock::changeLockOwner(thread_db* tdbb, locklevel_t level, SLONG old
|
||||
|
||||
bool GlobalRWLock::tryReleaseLock(thread_db* tdbb)
|
||||
{
|
||||
SignalInhibit si;
|
||||
lockCounters();
|
||||
if (!writer.entry_count && !readers.getCount())
|
||||
{
|
||||
|
@ -6610,7 +6610,7 @@ static bool write_page(
|
||||
AST_CHECK();
|
||||
dbb->dbb_writes++;
|
||||
RuntimeStatistics::bumpValue(tdbb, RuntimeStatistics::PAGE_WRITES);
|
||||
fb_assert(dbb->dbb_writes == dbb->dbb_stats.getValue(RuntimeStatistics::PAGE_WRITES));
|
||||
//fb_assert(dbb->dbb_writes == dbb->dbb_stats.getValue(RuntimeStatistics::PAGE_WRITES));
|
||||
|
||||
/* write out page to main database file, and to any
|
||||
shadows, making a special case of the header page */
|
||||
|
@ -65,15 +65,6 @@ enum lck_t {
|
||||
LCK_cancel /* Cancellation lock */
|
||||
};
|
||||
|
||||
/* Lock owner types */
|
||||
|
||||
enum lck_owner_t {
|
||||
LCK_OWNER_process = 1, /* A process is the owner of the lock */
|
||||
LCK_OWNER_database, /* A database is the owner of the lock */
|
||||
LCK_OWNER_attachment, /* An attachment is the owner of the lock */
|
||||
LCK_OWNER_transaction /* A transaction is the owner of the lock */
|
||||
};
|
||||
|
||||
// This is defined in dbt.cpp and nobody calls it.
|
||||
void MP_GDB_print(MemoryPool*);
|
||||
|
||||
|
@ -25,9 +25,9 @@
|
||||
#define JRD_LCK_PROTO_H
|
||||
|
||||
#include "../jrd/lck.h"
|
||||
#include "../lock/lock_proto.h"
|
||||
|
||||
namespace Jrd {
|
||||
enum lck_owner_t;
|
||||
enum lck_t;
|
||||
}
|
||||
|
||||
@ -36,12 +36,12 @@ bool LCK_convert(Jrd::thread_db*, Jrd::Lock*, USHORT, SSHORT);
|
||||
int LCK_convert_non_blocking(Jrd::thread_db*, Jrd::Lock*, USHORT, SSHORT);
|
||||
int LCK_convert_opt(Jrd::thread_db*, Jrd::Lock*, USHORT);
|
||||
int LCK_downgrade(Jrd::thread_db*, Jrd::Lock*);
|
||||
void LCK_fini(Jrd::thread_db*, Jrd::lck_owner_t);
|
||||
void LCK_fini(Jrd::thread_db*, lck_owner_t);
|
||||
SLONG LCK_get_owner_handle(Jrd::thread_db*, Jrd::lck_t);
|
||||
SLONG LCK_get_owner_handle_by_type(Jrd::thread_db*, Jrd::lck_owner_t);
|
||||
SLONG LCK_get_owner_handle_by_type(Jrd::thread_db*, lck_owner_t);
|
||||
SLONG LCK_increment(Jrd::thread_db*, Jrd::Lock*);
|
||||
bool LCK_set_owner_handle(Jrd::thread_db*, Jrd::Lock*, SLONG);
|
||||
void LCK_init(Jrd::thread_db*, Jrd::lck_owner_t);
|
||||
void LCK_init(Jrd::thread_db*, lck_owner_t);
|
||||
int LCK_lock(Jrd::thread_db*, Jrd::Lock*, USHORT, SSHORT);
|
||||
int LCK_lock_non_blocking(Jrd::thread_db*, Jrd::Lock*, USHORT, SSHORT);
|
||||
int LCK_lock_opt(Jrd::thread_db*, Jrd::Lock*, USHORT, SSHORT);
|
||||
|
@ -2044,7 +2044,8 @@ static void check_file(const sort_context* scb, const run_control* temp_run)
|
||||
*
|
||||
**************************************/
|
||||
UINT64 runs = temp_run ? temp_run->run_size : 0;
|
||||
UINT64 free = 0, run_mem = 0;
|
||||
offset_t free = 0,
|
||||
UINT64 run_mem = 0;
|
||||
|
||||
bool ok = scb->scb_space->validate(free);
|
||||
fb_assert(ok);
|
||||
|
Loading…
Reference in New Issue
Block a user