something about jiffies wraparound overflow
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 6 lines · jeff shia
we use the following to solve the problem of jiffies wraparound.
#definetime_after(a,b)\
(typecheck(unsigned long, a)&& \typecheck(unsigned long, b)&& \
((long)(b) - (long)(a) < 0))
#definetime_before(a,b)time_after(b,a)
[...]
Quoted 11 lines
But I cannot understand it has some differences comparing with the following code.
/* code 2*/
unsigned long timeout = jiffies + HZ/2;
if(timeout < jiffies)
questions:
1.why the macros oftime_aftercan solve the jiffies wraparound problem?
Because the overflows get compensated. It's a property of Galois Fields.
Quoted 2 lines
2.Is there any other possibilities for the "code 2" to overflow
except the jiffies overflow?
timeout might overflow, too.
Signature · 2 lines
Ich danke GMX dafür, die Verwendung meiner Adressen mittels per SPF verbreiteten Lügen zu sabotieren.