| 698 | } |
| 699 | |
| 700 | inline bool checkGCActive(thread_db* tdbb, record_param* rpb, int& state) |
| 701 | { |
| 702 | Lock temp_lock(tdbb, sizeof(SINT64), LCK_record_gc); |
| 703 | temp_lock.setKey(((SINT64) rpb->rpb_page << 16) | rpb->rpb_line); |
| 704 | |
| 705 | ThreadStatusGuard temp_status(tdbb); |
| 706 | |
| 707 | if (!LCK_lock(tdbb, &temp_lock, LCK_SR, LCK_NO_WAIT)) |
| 708 | { |
| 709 | rpb->rpb_transaction_nr = LCK_read_data(tdbb, &temp_lock); |
| 710 | state = tra_active; |
| 711 | return true; |
| 712 | } |
| 713 | |
| 714 | LCK_release(tdbb, &temp_lock); |
| 715 | rpb->rpb_flags &= ~rpb_gc_active; |
| 716 | state = tra_dead; |
| 717 | return false; |
| 718 | } |
| 719 | |
| 720 | inline void waitGCActive(thread_db* tdbb, const record_param* rpb) |
| 721 | { |
no test coverage detected