Marking select(2) as restrict
sblachmann at gmail.com
Sun Feb 25 05:52:57 UTC 2018
The Linux manual pages do not mention restrict for select().
glibc select() itself returns just ENOSYS(), if there is no alias for select().
So I guess what actually gets called is this:
Which in turn appears to call __sys_select:
If I understand correctly, the *only* place that defines the
optimizations actually being done is the static functions itself:
So maybe the actual prototypes being used for the
functions for which the interpose array is used are irrelevant:
I not yet found out which functions are actually weakly aliased in,
but I could imagine that adding the restrict keyword to the prototypes
of the functions listed there, is possibly only
of cosmetical importance, without any actual effect.
If this is correct, one could be "Posix compliant" without causing any
disruptive "optimization" :)
Have a nice Sunday!
P.S.: Maybe it would be better to avoid adding the restrict keyword in the
__thr_select() function itself mentioned above, as Linux' select
function seems to have no restrict:
On 2/25/18, Eitan Adler <lists at eitanadler.com> wrote:
> On 24 February 2018 at 10:55, Conrad Meyer <cem at freebsd.org> wrote:
>> On Sat, Feb 24, 2018 at 10:35 AM, Eitan Adler <lists at eitanadler.com>
>>> After this entire thread here is the summary. If I've misrepresented
>>> you here please let me know.
>>> kib@ - no benefit; concerned fallout could be hard to observe
>>> cem@ - concerned about warnings
>> Consider me a +1 to kib at . I did not voice those concerns explicitly
>> in earlier email because kib did already and I didn't anticipate you
>> would ignore him.
> I am not ignoring him. As I stated above I do not believe fallout is
> likely since most other major libc implementations have already done
> glibc: already done -
> openbsd: already done
> dragonflyBSD: alredy done:
> netbsd: already done:
> As a further check I went through the search results on github for
> select() and did not see any failures in the top few pages.
> Eitan Adler
> freebsd-hackers at freebsd.org mailing list
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"
More information about the freebsd-standards