Hi Prady, > [..] Ok, as promised. > > Here is a dirty hack that I made which basically resulted in 2 things. > 1) My test programs accurace really really improved. The timeout on > the mq_timedrecieve this time around within the tune of 20-30uS. > 2) My actual application exploded all over the place, with mq_* > functions complaining of timing out etc etc .. Just a bad messup. > > So (1) confirms that sched_hrtimeout could be a good idea. (2) > Confirms that this patch is really terrible and it would be great if > someone could either come up with something that is more robust or I > will be happy to take suggestions on where and how I should make > changes. Does the attached patch work for you? - Fixed error handling - Replaced schedule_timeout() with schedule_hrtimeout() - Let schedule_hrtimeout() handle expired timers Signed-off-by: Carsten Emde