How can I make timeout = 1 second for wait_event_timeout function?
c, linux-kernel, time-wait, timeout
Solution
The function wait_event_timeout takes its timeout value in jiffies. Use the constant `HZ` (number of timer ticks per second) to specify time in jiffies. The expression `HZ` is the equivalent of one second. The expression `30 * HZ` is the equivalent of 30 seconds.
wait_event_timeout (wq,condition,HZ);
Problem
How can I make timeout = 1 second for wait_event_timeout function? Function : `wait_event_timeout (wq,condition,timeout);` How can I make timeout = 1 second. And if call function like that : `wait_event_timeout(queue,flag!='n',30*HZ);` timeout =???