mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* missing wait_event_timeout
@ 2004-08-24 21:31 Steve French
  2004-08-24 22:23 ` Steve French
  0 siblings, 1 reply; 2+ messages in thread
From: Steve French @ 2004-08-24 21:31 UTC (permalink / raw)
  To: linux-kernel

Is there a reason why there is no wait_event_timeout function in kernel.
There is only the __wait_event_timeout_interruptible in wait.h
It seems the easiest way to fix the few remaining pieces of code which
call the deprecated sleep_on_timeout.

ie something like:


> #define __wait_event_timeout(wq, condition, ret)
> do {			
> 	DEFINE_WAIT(__wait);	
> 				
> 	for (;;) {		
> 		prepare_to_wait(&wq, &__wait, TASK_UNINTERRUPTIBLE);
> 		if (condition)				
> 			break;				
> 		ret = schedule_timeout(ret);	
> 		if (!ret)			
> 			break;			
> 	}						
> 	finish_wait(&wq, &__wait);					
> } while (0)




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-08-24 22:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-24 21:31 missing wait_event_timeout Steve French
2004-08-24 22:23 ` Steve French

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®