8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 18:03:04 +01:00
This commit is contained in:
robocop 2008-03-29 11:20:37 +00:00
parent 6a324db7c7
commit dfd10062f6
3 changed files with 6 additions and 6 deletions

View File

@ -132,7 +132,7 @@ bool GlobalRWLock::lock(thread_db* tdbb, locklevel_t level, SSHORT wait, SLONG o
}
}
bool all_compatible = !writer.entry_count && (level == LCK_read || readers.getCount() == 0);
const bool all_compatible = !writer.entry_count && (level == LCK_read || readers.getCount() == 0);
// We own the lock and all present requests are compatible with us
// In case of any congestion we force all requests through the lock

View File

@ -114,7 +114,7 @@ public:
// Change the lock owner. The function doesn't wait.
void changeLockOwner(thread_db* tdbb, locklevel_t level, SLONG old_owner_handle, SLONG new_owner_handle);
SLONG getLockData() {
SLONG getLockData() const {
return cached_lock->lck_data;
}
void setLockData(SLONG lck_data);
@ -160,7 +160,7 @@ private:
class CountersLockHolder : public AstInhibit, public Firebird::MutexLockGuard
{
public:
CountersLockHolder(Firebird::Mutex& mtx)
explicit CountersLockHolder(Firebird::Mutex& mtx)
: AstInhibit(), MutexLockGuard(mtx) { }
};

View File

@ -1800,7 +1800,7 @@ void CCH_mark(thread_db* tdbb, WIN * window, USHORT mark_system, USHORT must_wri
bdb->bdb_flags |= BDB_db_dirty;
#endif
bool was_dirty = bdb->bdb_flags & BDB_dirty;
const bool was_dirty = bdb->bdb_flags & BDB_dirty;
bdb->bdb_flags |= (BDB_dirty | BDB_marked);
if (must_write || dbb->dbb_backup_manager->database_flush_in_progress())
@ -1809,7 +1809,7 @@ void CCH_mark(thread_db* tdbb, WIN * window, USHORT mark_system, USHORT must_wri
if (!was_marked) {
if (was_dirty) {
// Mark can be called many times without release
// Backup lock owner can ba database or attachment
// Backup lock owner can be database or attachment
fb_assert(bdb->bdb_backup_lock_owner == BackupManager::database_lock_handle(tdbb));
dbb->dbb_backup_manager->release_dirty_page(tdbb, bdb->bdb_backup_lock_owner);
}
@ -6243,7 +6243,7 @@ static bool write_page(
/* write out page to main database file, and to any
shadows, making a special case of the header page */
int backup_state = dbb->dbb_backup_manager->get_state();
const int backup_state = dbb->dbb_backup_manager->get_state();
if (bdb->bdb_page >= 0) {
fb_assert(backup_state != nbak_state_unknown);