From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: <138575260907300825p4b005c50o990df6ff2a0c68cc@mail.gmail.com> Date: Fri, 31 Jul 2009 10:45:29 +0200 Message-ID: <138575260907310145i38305c65u248324bb4af5c72c@mail.gmail.com> From: hugo rivera To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [9fans] 9p fids and references Topicbox-Message-UUID: 335778e2-ead5-11e9-9d60-3106f5b1d025 OK, thanks. 2009/7/30, roger peppe : > 2009/7/30 hugo rivera : > > [...] there's no way two different files point to the > > > same data structure (but maybe two different fids do?) so reference > > counting is unnecessary, am I right? > > > no, because a file can be opened several times. > when you open a file you get a new fid. > > so if you've got resources associated with the file, > as opposed to resources private to the fid, > you have to reference count them (or poison any > fids that point to the file, if you *really* want the > resource to go away) > > -- Hugo