DIRECTORY Basics, DB USING [InternalError], DBCommon, PrincOpsUtils; DBStorageTID: CEDAR DEFINITIONS IMPORTS DB, PrincOpsUtils = BEGIN TID: TYPE = DBCommon.TID; 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 DB.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 Changed by Cattell on November 10, 1983 2:14 am Changed by Willie-Sue on February 14, 1985 ΦFile DBStorageTID.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Last edited by MBrown on 1-Mar-81 11:21:34 Cattell on January 14, 1983 2:09 pm Willie-Sue, February 15, 1985 11:09:04 am PST Widom, July 16, 1985 3:34:42 pm PDT Donahue, October 4, 1985 8:55:52 am PDT This interface contains definitions that relate to tuple IDs (TIDs). "Pointer" to a tuple in the database. Structure is given by the procedures below: Breaks a TID into the DBPage where the tuple's slot is, and the number of the slot on that page. Makes a TID from the DBPage where the tuple's slot is, and the number of the slot on that page. Masks that define the maximum number of slots allowed per page. Must agree with DBSegmentPrivate.BitsUnused. Module History Moved TID-related stuff here from DBStoragePrivateA. Defined error code BadSlotIndex. Defined DBPageIncrement, for use in Segment block allocator. InlineDefs -> Inline. Inline is gone. Made Cedar, added tioga formatting ΚŸ˜šœ™Jšœ Οmœ1™<—šœ™Jšœ™šœ#™#J™-J™#—Icode™'J˜J˜—šΟk ˜ J˜Jšžœžœ˜J˜ J˜J˜J˜—šœžœž ˜J˜Jšžœžœ˜JšœD™DJ˜Jšœž˜J˜šžœžœ žœ˜JšœK™KJšœ™J˜—šΟn œž œžœ˜!š žœΟcœ  œžœžœž˜EJšœI™IJšœ™Jšœ žœ˜Jšž˜šœ ˜ Jšœžœžœ5˜Ršžœ(˜0Jšœžœžœ8˜U——J˜Jšžœ˜——Jšžœ ˜J˜šŸœž œ žœ˜;š žœ œžœžœž˜#JšœH™HJšœ™Jšžœžœžœ ˜GJšžœ˜——Jšžœ  ˜ J˜Jšœ žœ˜J˜Jšœ?™?Jšœ,™,J˜Jšœžœ˜!Jšœžœ  ˜9Jšœžœžœžœ  ˜BJ˜J˜—Jšžœ ˜J˜J˜Jšœ™J˜Jšœ)ž˜+Jšœ4™4J˜Jšœ/ž˜1Jšœ ™ J˜Jšœ,ž˜.Jšœ<™