From: Mathieu Desnoyers Date: Thu, 17 Sep 2009 15:11:42 +0000 (-0400) Subject: qsbr: portability fixes: use unsigned long for the gp counters. X-Git-Tag: v0.1~78 X-Git-Url: http://git.liburcu.org/?a=commitdiff_plain;h=f0f7dbdd9ba9bff3860d8aea63a3e01b158351de;hp=f0f7dbdd9ba9bff3860d8aea63a3e01b158351de;p=urcu.git qsbr: portability fixes: use unsigned long for the gp counters. unsigned wraps properly in C (modulo ULONG_MAX + 1), IOW ULONG_MAX + 2 _is_ defined and is 1. Rewrite rcu_gp_ongoing test to work in the unsigned case: a - b < 0 becomes a - b > ULONG_MAX / 2 This test actually means a - b > 0x7f....f which is exactly what we want to test for in the first place, but in a portable way. Signed-off-by: Pierre Habouzit Signed-off-by: Mathieu Desnoyers ---