Re: timers in usermode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Tuesday 09 November 2004 08.36, Nilanjan Roychowdhury wrote:
> Actually these functions post a signal to a process but I do not want a
> signal instead of that I want that my callback function should get
> executed and it should post some sort of message to a POSIX thread.
Then implement a timer with pthread_cond_timedwait().
For example, have a timer thread sitting in a loop and calling
pthread_cond_timedwait() inside with the timeout of your timer.
When it gets back the execution it can call a function belonging to
your timer. This function (callback) then can talk to that POSIX
thread.
The timer thread can then go back and wait again to shoot.

Bye,
feketga

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux