skip to main | skip to sidebar

空白

Saturday, May 17, 2008

jiffies comparison

If you want to compare time in kernel module, you can user flowing macro to avoid jiffies overflow :
/*in kernel/linux/include/linux/jiffies.h*/
time_after(a,b)
time_before(a,b)
time_after_eq(a,b)
time_before_eq(a,b)

If you compare jiffies directly, you will get wrong result sometimes.
Posted by Mango at 3:28 PM
Labels: linux, programming

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

About Me

Mango
View my complete profile

Blog Archive

  • ►  2016 (2)
    • ►  May (1)
    • ►  April (1)
  • ►  2012 (2)
    • ►  December (1)
    • ►  March (1)
  • ►  2011 (3)
    • ►  December (1)
    • ►  May (1)
    • ►  January (1)
  • ►  2010 (3)
    • ►  May (2)
    • ►  January (1)
  • ►  2009 (3)
    • ►  October (1)
    • ►  September (1)
    • ►  August (1)
  • ▼  2008 (21)
    • ►  December (1)
    • ►  November (2)
    • ►  October (4)
    • ►  July (1)
    • ►  June (3)
    • ▼  May (2)
      • Chang default IGMP version in Linux
      • jiffies comparison
    • ►  February (1)
    • ►  January (7)
  • ►  2007 (15)
    • ►  December (3)
    • ►  November (6)
    • ►  October (4)
    • ►  August (1)
    • ►  July (1)
  • ►  2006 (29)
    • ►  September (1)
    • ►  July (1)
    • ►  March (3)
    • ►  February (13)
    • ►  January (11)

Links

  • Dilbert
  • FoxTrot by Bill Amend
  • GROW CUBE

Labels

  • java (5)
  • linux (19)
  • misc (16)
  • network (9)
  • programming (18)
  • python (7)
  • sip installtion linux (1)
  • tools (11)
  • web development (12)
  • windows (9)
  • xml (1)
Powered By Blogger

Noise

    follow me on Twitter