bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patch to retrieve send rights for shared memory objects


From: Roland McGrath
Subject: Re: Patch to retrieve send rights for shared memory objects
Date: Tue, 1 Mar 2005 13:11:03 -0800 (PST)

>IMMAP0 IMMAP1  Meaning
> 0     0       Not supported.
> 1     0       Exactly no user.
> 0     1       Maybe only one user (or more).
> 1     1       Definitely more than one user.

That is fine by me, but in that case the two bits are not indicating
independent things.  So it should be a mask of both bits that yields a
value compared against three named constants.  Bottom line, I don't care
what the bits are except that zeros be compatible with "I don't know" for
compatibility, and that the specification not suggest that the filesystem
is making any claims it can't guarantee (like exactly one user).

> This leaves the questions to which number this should be mapped in
> nattach of the shm info structures.

The right way to decide this is based on what actual programs use the
information for.  e.g., if some program (or set of cooperating programs)
does three separate mappings and then checks nattach>3, we should be sure
that it's not nattach==3 unless we're sure noone else has a mapping.

> Someone at the conference (I think it was Olaf) pointed out that the
> actual number of bits required for three states is ln 3 / ln 2 == 1.585,
> not one-and-a-half.  I didn't want to leave this unmentioned ;)

No other topic of discussion in our circles has matched even a fraction of
the gravity and profundity of this observation.  I appreciate it greatly. 


Thanks,
Roland




reply via email to

[Prev in Thread] Current Thread [Next in Thread]