linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* interruptible_sleep_on_timeout replacement
@ 2015-11-27 17:37 Mason
  2015-11-27 18:04 ` Russell King - ARM Linux
  0 siblings, 1 reply; 2+ messages in thread
From: Mason @ 2015-11-27 17:37 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Arnd,

I have to port /ancient/ code to v4.1
The problematic line is:

  long timeout_jiffies = US_TO_JIFFIES(wait_param->timeout_microsecond);
  ...
  timeout_jiffies = interruptible_sleep_on_timeout(&(llad_context.irq_queue), timeout_jiffies);
  wait_param->timeout_microsecond = JIFFIES_TO_US(timeout_jiffies);

IIUC, the appropriate replacement is

  wait_event_interruptible_timeout(wq, condition, timeout)

where wq and timeout are the original parameters?

To determine the condition... do I have to examine the corresponding
wake_up_interruptible() calls? I do see several

	if (status & SOME_VAL) {
		if (!test_and_set_bit(LOG2_SOME_VAL, &(llad_context.irq_bits)))
			wake_up_interruptible(&(llad_context.irq_queue));
	}

Also I'm not sure the return value is a direct match?

Regards.

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

end of thread, other threads:[~2015-11-27 18:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-27 17:37 interruptible_sleep_on_timeout replacement Mason
2015-11-27 18:04 ` Russell King - ARM Linux

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).