3 Fid, Fidpool, allocfidpool, freefidpool, allocfid, closefid, lookupfid, removefid,
4 Req, Reqpool, allocreqpool, freereqpool, allocreq, closereq, lookupreq, removereq \- 9P fid, request tracking
17 .ta \w'\fL 'u +\w'\fLulong 'u
21 char omode; /* -1 if not open */
32 .ta \w'\fL 'u +\w'\fLulong 'u
50 Fidpool* allocfidpool(void (*destroy)(Fid*))
51 void freefidpool(Fidpool *p)
52 Fid* allocfid(Fidpool *p, ulong fid)
53 Fid* lookupfid(Fidpool *p, ulong fid)
54 Fid* removefid(Fidpool *p, ulong fid);
61 Reqpool* allocreqpool(void (*destroy)(Req*))
62 void freereqpool(Reqpool *p)
63 Req* allocreq(Reqpool *p, ulong tag)
64 Req* lookupreq(Reqpool *p, ulong tag)
65 Req* removereq(Reqpool *p, ulong tag);
69 These routines provide management of
77 They are primarily used by the 9P server loop
82 structures are intended to represent
83 active fids in a 9P connection, as
85 structures do in the Plan 9 kernel.
88 element is the integer fid used in the 9P
91 is the mode under which the fid was opened, or
93 if this fid has not been opened yet.
94 Note that in addition to the values
100 can contain the various flags permissible in
102 To ignore the flags, use
105 should not be changed by the client.
106 The fid derives from a successful authentication by
109 contains the qid returned in the last successful
113 transaction involving the fid.
114 In a file tree-based server, the
122 corresponding to the fid.
125 member is intended for use by the
126 client to hold information specific to a particular
128 With the exception of
130 these elements should be treated
131 as read-only by the client.
137 destroys such a pool.
143 There must not already be an extant
145 with that number in the pool.
148 has been allocated, it can be looked up by
152 are reference counted: both
156 increment the reference count on the
160 When a reference to a
164 should be called to note the destruction of the reference.
165 When the last reference to a
169 (supplied when creating the fid pool)
170 is not zero, it is called with the
173 It should perform whatever cleanup is necessary
183 Note that due to lingering references,