1

We are developing a kernel driver and corresponding test cases (in user land) and used timers in our code. Malloc is almost not available. Timers are set up by SIGEV_THREAD so new threads are created.

According to the instructions here and here, it is hard to implement a general clean up system. So I am trying to define a framework with coding rules to deal with this.

In this method, I need to count the number of running handlers of a specific timer. In kernel, I can use try_to_del_timer_sync() and re-add to achieve this, but I cannot find a method in userland, especially POSIX.

Linux-specific methods are also welcome.

Community
  • 1
  • 1
OstCollector
  • 51
  • 1
  • 5
  • Probably a duplicate to: http://stackoverflow.com/q/3475750/694576 – alk Jun 18 '16 at 13:26
  • I don't think this question is a duplicate. Even I got the number of all threads, I don't know how it is triggered. And I need a method to find out which timer triggered that thread. – OstCollector Jun 22 '16 at 07:27
  • Your questions use-case is "*I need to count the number of running handlers.*" – alk Jun 22 '16 at 14:45

0 Answers0