[Return to Top] [Kernel Objects]

EROS Object Reference

Kernel Objects

Range

D R A F T

Description

The Range key conveys the authority to create and rescind node, and page keys. They are the essential authority used by space banks. Each key controls a particular range of objects.

The range key is not rescindable.


Operations

Check Alleged Key Type (OC = KT)

Returns the alleged type of the key.
ReplyR1AKT_Range: Key is a range key

Query Range (OC = 1)

Obtain the maximum offset controlled by the range key.

ReplyLThe offset of the last object the range key can create.
ResultRC_OKSuccess. The returned offset is the offset of the object within the range.
RC_RequestErrorAn inappropriate number of bytes were passed (must be either 4 or 8 bytes).

Identify (OC = 2)

Determine whether an object is contained in the given range.

RequestSK0The key to be examined.
ReplyR1Indicates the base type of the object named by this capability. Value is meaningless unless result code is RC_OK.
ValueMeaning
1Object is a page
2Object is a capability page
3Object is a node
R2The low-order portion of the value to be passed to Get Object to fabricate a strong key to the object designated by this key, or 0.
R3The high-order portion of the value to be passed to Get Object to fabricate a strong key to the object designated by this key, or 0.
ResultRC_OKSuccess. The returned offset is the offset of the object within the range.
1Key was not within the range. The returned offset value is zero.

Rescind (OC = 3)

Rescind all outstanding keys associated with the passed object.

Note: The rescind operation requires a read-write key to the object. If necessary, the holder of the range key can obtain such a key by first using the Identify operation, constructing a new key, and rescinding that key.

RequestSK0The key to be rescinded.
ResultRC_OKSuccess. All outstanding keys to the object are now void keys. If the passed key was to an object occupied by a thread, the associated thread is destroyed as well.
1Key was not within the range.
RC_RequestErrorThe passed key was read not a strong page or node key

Get Object (OC = 4)
Wait for Object (OC = 5)

Returns a strong key to the Nth object in Fth frame in the range.

If the requested object type does not correspond to the type of the objects currently residing in the designated frame, all objects in that frame are rescinded before the new object is created. For example: if the objects presently in frame 2 are node objects and a page capability is fabricated within this frame, all of the nodes within the frame will be rescinded before the new key is returned.

If the object is not mounted and Wait for Object is used, wait until the required range has been mounted. If the object is not mounted, and Get Object is used, returns an error.

RequestLThe value of (F * OBJECTS_PER_FRAME) + N, where F is a frame within this range, and N is the number of the object within the frame to which a key should be fabricated.
R1Indicates the type of the object to be created:
ValueMeaning
1Fabricate a page
2Fabricate a capability page
3Fabricate a node
ReplyRK0A strong key to the Nth object in the range.
ResultRC_OKSuccess
1Value passed did not correspond to a valid object, either because F was greater than the number of frames covered by this range key or N was too large for the object type requested.
2The object is not mounted (Get Object only).
3There was an unrecoverable I/O error fetching the Nth object. Object is effectively dead.
RC_RequestErrorAn inappropriate number of bytes were passed (must be either 4 or 8 bytes).

Compare Ranges (OC = 6)

Compares two ranges for overlap. If the two ranges overlap, returns the offset at which the overlap occurs. The offset reported, if any is computed as follows:

    if (SK0.start > IK.start)
      offset = SK0.start - IK.start;
    else
      offset = IK.start - SK0.start;

RequestSK0A range key.
ReplyR10 if the ranges do not overlap.

1 if SK0 overlaps the invoked key (IK) from above. That is,

    (SK0.start >= IK.start AND SK0.start < IK.end)

2 if the two ranges have the same starting value.

3 if SK0 overlaps the invoked key (IK) from above. That is,

    (SK0.start < IK.start AND SK0.end > IK.start)
R2The low-order portion of the offset at which the overlap occurs, or zero.
R3The high-order portion of the offset at which the overlap occurs, or zero.
ResultRC_OKOperation completed successfully.


Copyright 1998, 2001 by Jonathan Shapiro. All rights reserved. For terms of redistribution, see the GNU General Public License