catching underflow which results in infinite delays is probably very handy.
Scott Cheloha <[email protected]> wrote: > 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); > > Can we pick a prototype and stick to it? > > 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? >
