tech-kern archive

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

Re: sys/idtype.h unused enumeration values



> Date: Mon, 18 May 2020 21:40:16 +0200
> From: Kamil Rytarowski <n54%gmx.com@localhost>
> 
> If I delete P_TASKID ... P_P_CPUID ones, P_SETID will be reordered (but
> we can force the number anyway). If I delete P_CID there is an inelegant
> hole. Naturally P_SETID -> P_CID can fill the gap.
> 
> This is in theory ABI change, but no users could use in a useful
> approach previously.
> 
> My intention isto g/c unused values and keep this clean and elegant (as
> this is still possible).

Just leave the numbers as they are, and add new ones to the end if you
need.  There are billions of free numbers here.

However inelegant unused numbers are, I think it would be a lot less
elegant to play russian roulette with binary compatibility.  Programs
that use what P_SETID is today -- for whatever reason, even if it's
not useful -- just get no matching process.  Boot a new kernel with
the `clean and elegant' renumbering, and who knows, maybe they'll
accidentally start sending SIGKILL to processes they didn't even mean
to match.  There's no need to waste time even thinking about this if
you just leave the numbers as they are.


Home | Main Index | Thread Index | Old Index