| 1807 | |
| 1808 | |
| 1809 | int TRA_state(const UCHAR* bit_vector, TraNumber oldest, TraNumber number) |
| 1810 | { |
| 1811 | /************************************** |
| 1812 | * |
| 1813 | * T R A _ s t a t e |
| 1814 | * |
| 1815 | ************************************** |
| 1816 | * |
| 1817 | * Functional description |
| 1818 | * Get the state of a transaction from a cached |
| 1819 | * bit vector. |
| 1820 | * NOTE: This code is reproduced elsewhere in |
| 1821 | * this module for speed. If changes are made |
| 1822 | * to this code make them in the replicated code also. |
| 1823 | * |
| 1824 | **************************************/ |
| 1825 | const TraNumber base = oldest & ~TRA_MASK; |
| 1826 | const ULONG byte = TRANS_OFFSET(number - base); |
| 1827 | const USHORT shift = TRANS_SHIFT(number); |
| 1828 | |
| 1829 | return (bit_vector[byte] >> shift) & TRA_MASK; |
| 1830 | } |
| 1831 | |
| 1832 | |
| 1833 | void TRA_sweep(thread_db* tdbb) |