Subj : Help with timers/signals To : comp.programming.threads From : vinay Date : Thu Mar 10 2005 02:42 am Hi guys, Im new to programming with linux and its timers and signal handlers.Can any one suggest a possible solution to the problem im having.The problem is described as follows I have an array of queues.Say 10.Now i go thro this array 1 by 1 and dequeue elements from each queue.This is simple.My problem now is this dequeuing.Every element needs to be dequeued at a particular point in time.Hence i need to set different timers/signals for the different times that each element will be dequeued.Is there any way of specifying this functionality using signals/timers.Example:i need to specify an alarm that goes off at 20ms for the 1 element then at 50ms(after 30ms) for the 2nd element then at 10ms(this timer will go off first actually) for the 3 element.And the action for the alarm is the dequeue function that will dequeue the element whose timer expired from the particular queue. Also Can this queue parameter also be passed to the handler function?? cos as per the documentation for the signal handler it takes only 1 argument signum. Is it possible to send more arguments to the handler from the signal call?? I dont know if its possible but is there a way of specifying user defined signals in linux.I was thinking of having 10 user defined signals for the 10 queues that i have.And every time a timer expires in a particular queue i need to send the signal associated with that queue.Is this possible in linux.I have just come across the alarm and some other standard signals which are generated and hence this does not suit my need. Thanx in advance for ur suggestions ...... ive been racking my brains for this one...would indeed be a great help to get some pointers on this. thanx and kind regards vinay .