> Date: Mon, 21 Dec 2020 11:25:28 -0600
> From: Scott Cheloha <[email protected]>
> Content-Type: text/plain; charset=us-ascii
> Content-Disposition: inline
> 
> The manpage for delay(9) suggests that the prototype is:
> 
> void delay(int);
> 
> But on armv7, arm64, hppa, macppc, and powerpc64 the input is unsigned
> or a u_int instead of an int.  Like this:
> 
> void delay(unsigned);
> 
> or this:
> 
> void delay(u_int);

Let me guess; NetBSD switched at some point...

> Can we pick a prototype and stick to it?

Sure.

> An upside of an unsigned input is a larger usable input range.  A
> negative input to delay(9) makes no sense anyway.  On the other hand,
> we could KASSERT a non-negative value and catch bugs if the input were
> signed.  Also, the input should, in general, be small.  We probably
> don't really need the extra range.  A large input might itself
> indicate a bug.
> 
> In any case, I want the prototypes to match up across platforms.
> 
> What do people prefer?  Signed int or unsigned int?

u_int

Reply via email to