tech-kern archive

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

Re: sys/idtype.h unused enumeration values



On 18.05.2020 20:24, Robert Elz wrote:
>     Date:        Mon, 18 May 2020 19:45:55 +0200
>     From:        Kamil Rytarowski <n54%gmx.com@localhost>
>     Message-ID:  <ad8e44bb-3778-67ad-6c6d-7ce0681bebbb%gmx.com@localhost>
> 
>   | I have got a local use-case for another P_type (premature to discuss it
>   | in this thread) and I would rather recycle an unused value.
> 
> Don't do that, it is just a number, use one that hasn't been used
> for this purpose before.
> 
>   | Do we plan to get Solaris feature-parity with all the types? I assume
>   | that the answer is NO. If so, can we delete the P_ values that are not
>   | applicable for NetBSD?
> 
> I have no problem with that - just don't reuse the values for some
> different purpose, keep them reserved (assign them meaningless reserved
> names) just in case there's ever a need to implement one of those things
> (this is very very cheap insurance).
> 
> kre
> 

Solaris ABI compat is something that has small chances of being useful
in future. Solaris is also not a reference for NetBSD here.

Linux uses the POSIX types: P_ALL, P_PID, P_GID + extension P_PIDFD.

https://github.com/torvalds/linux/blob/master/include/uapi/linux/wait.h#L16

FreeBSD already recycled the P_ZONEID value for P_JAILID.

Keeping these unused Solaris values in tree has no added value. If we
want it for the sake of defining it, push this to src/external/.

On 18.05.2020 20:19, Christos Zoulas wrote:
> I copied these from FreeBSD who in turn copied them from solaris and
changed
> P_ZONEID to P_JAILID. The FreeBSD comment is:
> http://bxr.su/FreeBSD/sys/sys/wait.h#100
> I decided to keep all the names too.
>

I propose to delete: P_TASKID, P_PROJID, P_POOLID, P_ZONEID, P_CTID as
they have no equivalent objects in NetBSD. (If they could have, these
objects could be designed differently).

P_CID could be in theory used, but has no users and could be deleted.

P_PSETID shall be used in pset_bind(3)/pset_unbind(3), but it looks like
it was not implemented (and thus, has no users today).

http://netbsd.org/~kamil/patch-00256-cleanup-waitids.txt

I propose to delete P_CID and recycle its place for P_PSETID.

If we will ever have a need for P_CTID or similar, we could readd them
to the enumeration.

Next, I can add my value at the end of list (and before _P_MAXIDTYPE).

Attachment: signature.asc
Description: OpenPGP digital signature



Home | Main Index | Thread Index | Old Index