<> <> <> <> <> <> DIRECTORY Basics, DBCommon, DBEnvironment USING[InternalError], PrincOpsUtils; DBStorageTID: CEDAR DEFINITIONS IMPORTS DBEnvironment, PrincOpsUtils <> = BEGIN TID: TYPE = LONG CARDINAL; <<"Pointer" to a tuple in the database. Structure is given by the procedures>> <> DecomposeTID: PROCEDURE[tid: TID] RETURNS[--p-- DBCommon.DBPage, --slotIndex-- CARDINAL] = INLINE BEGIN <> <> slotIndex: CARDINAL; TRUSTED { slotIndex _ PrincOpsUtils.BITAND[LOOPHOLE[tid, num Basics.LongNumber].lowbits, TIDSlotMask]; LOOPHOLE[tid, num Basics.LongNumber].lowbits _ PrincOpsUtils.BITAND[LOOPHOLE[tid, num Basics.LongNumber].lowbits, TIDLowPageMask]; }; RETURN[tid, slotIndex]; END;--DecomposeTID ConsTID: PROCEDURE[p: DBCommon.DBPage, slotIndex: CARDINAL] RETURNS[--tid-- TID] = INLINE BEGIN <> <> IF slotIndex > TIDSlotMask THEN ERROR DBEnvironment.InternalError; -- BadSlotIndex RETURN[p + slotIndex]; END;--ConsTID NullTID: TID = 0; <> <> DBPageIncrement: CARDINAL = 100B; TIDSlotMask: CARDINAL = DBPageIncrement - 1; --000077B TIDLowPageMask: CARDINAL = LAST[CARDINAL] - TIDSlotMask; --177700B END. -- DBStorageTID <> Created by MBrown on June 10, 1980 3:56 PM <> Changed by MBrown on September 26, 1980 11:13 AM <> Changed by MBrown on December 8, 1980 1:48 PM <> Changed by MBrown on 1-Mar-81 11:22:17 < Inline.>> Changed by Cattell on November 10, 1983 2:14 am <> <<>> Changed by Willie-Sue on February 14, 1985 <>