On Mon, Mar 21, 2016 at 10:28 PM, Larry McVoy <lm(a)mcvoy.com> wrote:
So if you think about it you need two levels, the fd
that is per open
that knows the offset, and the fd to the object in question. The file
table is the latter.
Sure, but why does the second thing necessarily have to be a table? Does it?
- Dan C.
On Mon, Mar 21, 2016 at 08:23:43PM -0600, Marc Rochkind wrote:
A ref-counted
data structure organized how, for what language? Integers
are
really easy to work with.
(Perhaps I misunderstood your post.)
On Mon, Mar 21, 2016 at 8:07 PM, Dan Cross <crossd(a)gmail.com> wrote:
> This came up today at work; what's the origin of the open file table?
The
> suggestion was made that, instead, a
ref-counted data structure could
be
> allocated at open() time to serve the same
purpose, and that a table of
> open files was superfluous. My guess was that this made it (relatively)
> easy to look up what files referred to a particular device?
>
--
---
Larry McVoy lm at
mcvoy.com
http://www.mcvoy.com/lm