3 * This is the kernel interface through which objects, interfaces, and
4 * interfaces are opened, created and destroyed. The instantiated objmgr
5 * object is always id 1.
9 guid: "C227980E-EA8B-11D9-84F1-000A95BB581A";
12 struct VStruct virtual {
13 guid: "E2E3AF5F-2858-11DA-9FBB-00112431A05E";
17 // FIXME: make this a built-in ID type that fixes things
18 // up when moving between systems. It can be native word
19 // sized, rather than always long.
25 Bool, Short, Int, Long,
27 FShort, FLong, Octet, Enum,
28 Bitfield, Interface, Struct
31 ID id; // ID of interface, struct, bitfield, or enum (or 0).
32 ulong length; // Type length: bits in bitfield, bytes in
33 // struct, max value of enum, or 0.
36 // Inclusive lower and upper bounds of the array. If the
37 // array has no upper bound, upper should be -1. If the
38 // array has no lower bound, lower should be 0. If this is
39 // not an array, both should be 0.
53 copy:1, /* If input argument references memory, a
54 copy will be made (possibly via copy-on-write)
55 before the method receives control.
56 If the parameter is inout, the changes (if any)
57 will be copied to the original memory area (or
58 the copy-on-write mapping will occur on return
59 from the method). This is an implementation
60 attribute and is incompatible with shared. */
62 shared:1, /* If input argument references memory, the
63 method may continue to access the memory
64 until it explicitly releases it. The memory
65 region must remain valid until then, and all
66 changes to the memory area will be shared by
67 both the caller and the callee. This is an
68 interface attribute and is incompatible with
69 copy. The argument should be page aligned
70 and its size must be a multiple of the page
71 size; otherwise, the caller will have
72 access to data outside the region passed. */
78 ulong entry; /* Address of method entry point */
82 async:1, /* Method is invoked indirectly via message passing,
83 and the caller does not wait for completion. No
84 out parameters may be used in such a method. */
86 ordered:1, /* Method requires strong ordering; all ordered methods
87 from the same thread will be delivered in order, and
88 the next such method will not be delivered until
89 the recipient of the previous invocation message
90 acknowledges it. This flag is only valid on async
91 methods, as synchronous methods are inherently
94 An alternative is to invoke methods through
95 a serialization object, which allows finer
96 control over the level of serialization.
97 This flag may go away in favor of always
98 using explicit serialization objects when
104 ulong[] super; /* superinterface(es) */
105 MethodDesc[] methods;
106 ulong instantiate, subinterface, remove; /* access tokens */
119 guid: "06489629-9C25-4C14-9A5B-6C59639C87D6";
121 new_object(Mem.AddrSpace aspace, ulong entry, ID obj out);
123 // Release "num" references on the object. If exactly "num"
124 // references remain, the object handle is closed and "gone" is
125 // true. If more references remain, the handle is not closed and
126 // "gone" is false. If fewer references than "num" are present
127 // when called, no references are released, and RefCountException
130 // A handle's refcount is incremented whenever a reference is
131 // received via IPC. Objects created with new_object start with
134 release(ID obj, int num, bool gone out);
137 // This is a generic Factory interface; specific factories may
138 // (but do not need to) implement a more specific interface that
139 // guarantees that the generated object will comply with some
140 // particular interface.
143 guid: "9C084DD0-5D69-11DA-BD5A-000A95BB581A";
144 create(Object obj out);