public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: The list for a Better Approach To Mobile Ad-hoc Networking
	<b.a.t.m.a.n@lists.open-mesh.org>
Subject: Re: [B.A.T.M.A.N.] [PATCH] batman-adv: Fixing wrap-around bug in vis
Date: Fri, 12 Mar 2010 08:45:52 +0100	[thread overview]
Message-ID: <20100312074552.GE29010@lunn.ch> (raw)
In-Reply-To: <20100312000931.GB13786@Linus-Debian>

On Fri, Mar 12, 2010 at 01:09:31AM +0100, Linus L??ssing wrote:
> Sorry still does not seem to work :). Despite testing it on a
> setup in batman itself I also tested it with a small c program
> (which does not work as expected either):
> -----
> #include <stdio.h>
> #include <stdint.h>
> 
> #define seq_before(x,y) ((x - y) > 1 << 7 + 8 * (sizeof(x) - 1))
> #define seq_after(x,y) ((y - x) >= 1 << 7 + 8 * (sizeof(x) - 1))
> 
> int main() {
>         uint8_t old = 0;
>         uint8_t new = 1;
>         if (!seq_after(new,old))
>                 printf("foobar\n");
> 
>         return 0;
> }

It is worth taking a look at include/linux/jiffies.h. The macros
time_after(), time_after_eq() etc.

	      Andrew

  reply	other threads:[~2010-03-12  7:45 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-09 23:03 [B.A.T.M.A.N.] vis: (sometimes) missing entries Linus Lüssing
2010-03-11 16:38 ` [B.A.T.M.A.N.] [PATCH] batman-adv: Fixing wrap-around bug in vis Linus Lüssing
2010-03-11 17:14   ` Linus Lüssing
2010-03-11 21:19   ` Linus Lüssing
2010-03-11 21:41     ` Linus Lüssing
2010-03-11 22:06     ` Sven Eckelmann
2010-03-11 22:33       ` Sven Eckelmann
2010-03-11 23:04         ` Sven Eckelmann
2010-03-12  0:09           ` Linus Lüssing
2010-03-12  7:45             ` Andrew Lunn [this message]
2010-03-12  9:04             ` Sven Eckelmann
2010-03-12 15:16               ` Sven Eckelmann
2010-03-12 19:09                 ` Sven Eckelmann
2010-03-14 15:46                   ` Linus Lüssing
2010-03-14 17:51                     ` Marek Lindner
2010-03-12 20:57       ` Simon Wunderlich
2010-03-12 21:06         ` Sven Eckelmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100312074552.GE29010@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox