How does macro time_after(unknown,known) avoid wrap around ?
A stupid question :(
I'm reading the LKD.There is example like this:
......
if(timeout>jiffies){
/*not timeout*/
}else{
/*timeout*/
}......
This will cause wrap around,yes i know.
BUT why the macro
#define time_after(unknown,known) ((long)(unknown) - (long)(known)<0))
will not?
Stupid ?
___________________________________________________________
Mp3疯狂搜-新歌热歌高速下
http://music.yahoo.com.cn/?source=mail_mailbox_footer
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors
A stupid question :(
I'm reading the LKD.There is example like this:
......
if(timeout>jiffies){
/*not timeout*/
}else{
/*timeout*/
}......
This will cause wrap around,yes i know.
BUT why the macro
#define time_after(unknown,known) ((long)(unknown) - (long)(known)<0))
will not?
Stupid ?
___________________________________________________________
抢注雅虎免费邮箱-3.5G容量,20M附件!
http://cn.mail.yahoo.com
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors