tech-kern archive

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

Re: CTLTYPE_UINT?



On Fri, 03 Oct 2014, Justin Cormack wrote:
Back in the sysctl discussion a while back, core group said:

http://mail-index.netbsd.org/tech-kern/2014/03/26/msg016779.html

a) What types are needed?  Currently, CTLTYPE_INT is a signed
  32-bit type, and CTLTYPE_QUAD is an unsigned 64-bit type.
  Perhaps all four possible combinations of signed/unsigned and
  32 bits/64 bits should be supported.

If you add new sysctl types, please use names that describe the size and signedness. For example, rename CTLTYPE_INT to CTLTPE_INT32, keep CTLTYPE_INT as a backward compatible alias for CTLTYPE_INT32, and add CTLTYPE_UINT32. Similarly, rename CTLTYPE_QUAD to CTLTYPE_UINT64, keep CTLTYPE_QUAD as an alias, and add CTLTYPE_INT64. Please don't add a CTLTYPE_UINT with no indication of its size.

A survey of what other OSes do would also be useful.

--apb (Alan Barrett)


Home | Main Index | Thread Index | Old Index