nearly-tickless-tinc

Guus Sliepen guus at tinc-vpn.org
Fri Jun 3 12:49:18 CEST 2011


On Fri, Jun 03, 2011 at 11:36:58AM +0200, Loïc Grenié wrote:

> > now = time(NULL) should indeed by right after pselect(). Using <= seems better
> > as well.
> 
>     Ok. Please check that that comparison with now in try_harder is
> still correct
>   and check also "diff = " in "expire_events".

They are still correct.

> >> +                   if(next_event <= now || sighup || sigalrm)
> >
> > It shouldn't be necessary to check for sighup or sigalrm at that point; if they
> > are set there then surely pselect() will return with EINTR immediately anyway.
> 
>     It is indeed not necessary because signals are blocked outside pselect
>   and sighup || sigalrm can only be set by the handlers. However if ever they
>   were set pselect would *not* return EINTR (signals have already been
>   caught). I've removed them.

Ah yes.

> diff -ru tinc-1.0.14.orig/config.h.in tinc-1.0.14/config.h.in
> diff -ru tinc-1.0.14.orig/configure tinc-1.0.14/configure

You should not include the diff of these autogenerated files.

> +event_t *peek_next_event(void) {
> +	if (event_tree->head)
> +		return event_tree->head->data;
> +}

My compiler complains that you can reach the end of the function without
returning anything. Other than that, the patch is fine!

-- 
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/20110603/148e0c85/attachment.pgp>


More information about the tinc-devel mailing list