next up previous contents
Next: 11.2 State Up: 11 References Previous: 11 References

11.1 Overview

Fluke reference objects contain a ``link'' to another object. The association of a reference to its object is created either explicitly by fluke_object_reference calls or implicitly by the Fluke implementation when returning state with fluke_object_get_state calls or when receiving references with fluke_ipc_side_receive calls.

There is no operation to return the object that a reference object is associated with (since the referenced object itself may not be mapped into the address space of the querying thread). However, given an unknown reference, an application can create an explicit reference to an object and compare that to the unknown reference to determine if they are equivalent. There is also an operation to determine if a reference is null.

Reference objects are useful for determining equivalence with other references returned in object state (as described above). Some types of object references (port, region) are also used as capabilities. Not all types of objects are referencable.

The immutable hash value associated with all objects (except references) is particularly useful in optimizing object lookups. An application managing Fluke objects can use fluke_object_create_hash to create objects with known hash values and enter the objects in a hash table based on that value. When later receiving a reference to some object, its target can more quickly be determined by calling fluke_ref_hash on the reference to obtain the hash value associated with the referenced object. This value is then used to compare to known values in the hash table. If two hash values are not the same, the objects cannot be equivalent. If the values are the same, a fluke_ref_compare must still be done to verify equivalence (since hash values are not unique).



Utah Flux Research Group