How to use reset counter in kernel module programming every second? -


How can I use jiffies interrupt to reset some other kernel variable counters in the kernel module.

I am trying to reset every counter in a few seconds ... just to check that I reach some limit in every second. Not sure how the kernel module reaches such a way in programming.

Some clarifications will be highly appreciated with the example.

Thanks

You can do something like this:

  unsigned long after = JT + 5 * HZ; / * (Jiffies> later) * / if (jiffies> later) / / Alternatively, I would consider using some famous macros because the above code can be overflow.  
  Time-time (J, T) Here the macro return is correct if the time is after JF's J times; Otherwise, it returns incorrectly from time to time (J, T), time-time_a (j, t), time-befier_aq (j, t)  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -