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:        Tue, 19 May 2020 14:12:31 +0200
    From:        Kamil Rytarowski <n54%gmx.com@localhost>
    Message-ID:  <6874bb63-5146-797f-98b7-b9c497677375%gmx.com@localhost>

  | Rationale for pointless?

There is no point.   What more can I say?

  | My points were:
  |
  |  - Clobbering OS that claims the goals of clean design and clean code
  | with mutant alien bodies without counterparts in the native kernel,
  | without request from any relevant standard body.

Having the extra entries is harmless, there is no point deleting them.

By all means, if you want, add a /* not implemented by NetBSD */ comment
to each of the appropriate ones, but deleting them with the intent that
they could (perhaps) be put back later is just making hard work - the
values of anything that is actually used need to be preserved for ABI
compat, if something occupies the slot of one of the ones to be replaced
later, then the replacement has to be given a different value, making
binary compat with other systems (emulations) much more complex.   And
all just to delete a meaningless line which is harming nothing...

  |  - Collecting garbage in public headers that is unused, misleading and
  | can at best be dummy.

So, mark it as unused/unimplemented, so it will no longer be misleading.
Or replace them with placeholder symbols "was_P_..." if you'd like to
detect at compile time code that might exist that won't work as intended.

Just don't reuse the numeric values that the deleted symbols occupued.

kre



Home | Main Index | Thread Index | Old Index