Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Jan 2016 16:08:11 +0200
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Boris Astardzhiev <boris.astardzhiev@gmail.com>
Cc:        Jilles Tjoelker <jilles@stack.nl>, net@freebsd.org, threads@freebsd.org
Subject:   Re: Does FreeBSD have sendmmsg or recvmmsg system calls?
Message-ID:  <20160118140811.GW3942@kib.kiev.ua>
In-Reply-To: <CAP=KkTy3J=k7hokGhohcGXv%2BWLnaxJmiAPxqmX9FHt7k0=Dp7Q@mail.gmail.com>
References:  <20160108204606.G2420@besplex.bde.org> <CAJ-Vmom26mukSv3JmsmNiAONvpc6f1bQ%2BujO25qefGHY=5przA@mail.gmail.com> <CAP=KkTwG0SVUmrBuWm33EC-tG4tMTdF5rLZQ_u6G1=-ujnfjkA@mail.gmail.com> <20160113080349.GC72455@kib.kiev.ua> <CAP=KkTxVaqZvigg78Dg%2Bv8kuTCaZyky8x15NHqD9uabuRKRkMw@mail.gmail.com> <20160116195657.GJ3942@kib.kiev.ua> <20160116202534.GK3942@kib.kiev.ua> <20160117211853.GA37847@stack.nl> <20160118044826.GS3942@kib.kiev.ua> <CAP=KkTy3J=k7hokGhohcGXv%2BWLnaxJmiAPxqmX9FHt7k0=Dp7Q@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jan 18, 2016 at 12:37:01PM +0200, Boris Astardzhiev wrote:
> Hello,
> 
> Sorry for the delay of my reply. As far as I understand pthread_testcancel()
> is not necessary in the recvmmsg syscall since cancellation is not quite
> common
> among apps. But if there is cancellation attempts as long as I use
> __sys_recvmsg() instead
> of the interposing approach on a cancel attempt recvmmsg() will return
> EINTR which will get
> me out?
Yes.

The corner case is the cancellation attempt (SIGCANCEL == SIGTHR) coming
while the thread is executing code around the syscall.

> 
> Secondly, I guess it's better to use __sys_sendmmsg() similarly instead of
> the
> insterposing table regarding sendmmsg().
Sure, sendmmsg and recvmmsg are same.

> 
> Lastly, regarding the manpage - should I extend send/recv(2) for the new
> calls or
> create new manpage files?
IMO it is more logical to extend the existing page than write a new one.



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