A problem with the select(2) interface
MQ
antinvidia at gmail.com
Mon May 14 14:56:14 UTC 2007
Hi,
I'm writing a network application these days, for compatibility, I choose
the select(2) interface to do event polling. When using it, I'm curious
about the fact that the type of the final parameter is `struct timeval *'. I
skimmed through the codes in /sys/kern/sys_generic.c, there is nothing
written to this address. So, I think if we can use `const struct timeval *'
instead? This type can inform the users explicitly that we do NOT modify the
timeval struct. But I'm not sure if this modification will conflict with the
POSIX standard. Will you please tell me your considerations? Any suggestions
will be appreciated.
Thanks.
MQ
More information about the freebsd-arch
mailing list