Does FreeBSD have sendmmsg or recvmmsg system calls?
Luigi Rizzo
rizzo at iet.unipi.it
Tue Jan 26 17:06:42 UTC 2016
On Tue, Jan 26, 2016 at 5:40 AM, Konstantin Belousov
<kostikbel at gmail.com> wrote:
> On Mon, Jan 25, 2016 at 11:22:13AM +0200, Boris Astardzhiev wrote:
>> +ssize_t
>> +recvmmsg(int s, struct mmsghdr *__restrict msgvec, size_t vlen, int flags,
>> + const struct timespec *__restrict timeout)
>> +{
>> + size_t i, rcvd;
>> + ssize_t ret;
>> +
>> + if (timeout != NULL) {
>> + fd_set fds;
>> + int res;
> Please move all local definitions to the beginning of the function.
This style recommendation was from 30 years ago and is
bad programming practice, as it tends to complicate analysis
for the human and increase the chance of improper usage of
variables.
We should move away from this for new code.
cheers
luigi
More information about the freebsd-net
mailing list