nearly-tickless-tinc

Guus Sliepen guus at tinc-vpn.org
Wed Jun 1 23:26:03 CEST 2011


On Wed, Jun 01, 2011 at 10:15:26AM +0200, Loïc Grenié wrote:

> >>     However, once again, if pselect() is not available or not compatible or
> >>   whatever it can be emulated with a select:
> >
> > Yes. You can add a check in configure.in for pselect(), and add the necessary
> > #ifdefs to ensure it automatically selects the right thing.
> 
>      What do you think about the racy "glibc pselect" ? Right now I do
>   not test for it. It is probably possible to test for it using
> syscall(2), either
>   at compile time or at runtime.

Well, it is not so critical, and the problem is only with kernels that are more
than five years old. If you really want, you could add a runtime check using
the uname() function.

> > Looks good! If you can add the configure.in checks, and write a description for
> > your patch, I can commit it to the git repository without any changes :)
> 
>        We'll see ! Right now I have hijacked timespec and tv_nsec in net.c
>   -- when not using pselect() -- to streamline mail_loop source code -- it's
>   probably not very good software engineering. What do you prefer ?

Hm, in this case it is better to explicitly use #ifdef ... #else ... #endif in
the main loop, instead of #defining tinc_pselect and friends. With the former
it is more clear what happens.

-- 
Met vriendelijke groet / with kind regards,
     Guus Sliepen <guus at tinc-vpn.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://www.tinc-vpn.org/pipermail/tinc-devel/attachments/20110601/fed52166/attachment.pgp>


More information about the tinc-devel mailing list