Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 May 2007 22:29:15 +0800
From:      MQ <antinvidia@gmail.com>
To:        freebsd-arch@freebsd.org
Subject:   A problem with the select(2) interface
Message-ID:  <be0088ce0705140729m4c24f2cbr21f6f050aac75c89@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?be0088ce0705140729m4c24f2cbr21f6f050aac75c89>