-static void update_lock_dbg(B_DB *mdb)
-{
- if (mdb->allow_transactions) { /* batch connection */
- return;
- }
- if (_db_lock_recurse_count && !pthread_equal(_db_lock_threadid, pthread_self())) {
- Dmsg2(1, "ERROR: not the same threadif %p != %p\n", _db_lock_threadid, pthread_self());
- }
- _db_lock_recurse_count++;
- _db_lock_time = (utime_t) time(NULL);
- _db_lock_threadid = pthread_self();
-}
-
-static void update_unlock_dbg(B_DB *mdb)
-{
- if (mdb->allow_transactions) { /* batch connection */
- return;
- }
- if (!pthread_equal(_db_lock_threadid, pthread_self())) {
- Dmsg2(1, "ERROR: not the same threadid %p != %p", _db_lock_threadid, pthread_self());
- }
- _db_lock_recurse_count--;
- if (!_db_lock_recurse_count) {
- memset(&_db_lock_threadid, 0, sizeof(_db_lock_threadid));
- }
-}
-