MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / LCK_fini

Function LCK_fini

src/jrd/lck.cpp:469–503  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

467
468
469void LCK_fini(thread_db* tdbb, enum lck_owner_t owner_type)
470{
471/**************************************
472 *
473 * L C K _ f i n i
474 *
475 **************************************
476 *
477 * Functional description
478 * Check out with lock manager.
479 *
480 **************************************/
481 SLONG* owner_handle_ptr = NULL;
482
483 SET_TDBB(tdbb);
484 Database* const dbb = tdbb->getDatabase();
485
486 switch (owner_type)
487 {
488 case LCK_OWNER_database:
489 owner_handle_ptr = LCK_OWNER_HANDLE_DBB(tdbb);
490 break;
491
492 case LCK_OWNER_attachment:
493 owner_handle_ptr = LCK_OWNER_HANDLE_ATT(tdbb);
494 break;
495
496 default:
497 bug_lck("Invalid lock owner type in LCK_fini ()");
498 break;
499 }
500
501 if (*owner_handle_ptr)
502 dbb->lockManager()->shutdownOwner(tdbb, owner_handle_ptr);
503}
504
505
506static SLONG get_owner_handle(thread_db* tdbb, enum lck_t lock_type)

Callers 6

finiMethod · 0.85
release_attachmentFunction · 0.85
JRD_shutdown_databaseFunction · 0.85
cache_readerMethod · 0.85
cache_writerMethod · 0.85
garbage_collectorMethod · 0.85

Calls 7

SET_TDBBFunction · 0.85
LCK_OWNER_HANDLE_DBBFunction · 0.85
LCK_OWNER_HANDLE_ATTFunction · 0.85
bug_lckFunction · 0.85
getDatabaseMethod · 0.80
shutdownOwnerMethod · 0.80
lockManagerMethod · 0.80

Tested by

no test coverage detected