From: slash.tmp@free.fr (Mason)
To: linux-arm-kernel@lists.infradead.org
Subject: interruptible_sleep_on_timeout replacement
Date: Fri, 27 Nov 2015 18:37:47 +0100 [thread overview]
Message-ID: <565894EB.7040200@free.fr> (raw)
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.
next reply other threads:[~2015-11-27 17:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-27 17:37 Mason [this message]
2015-11-27 18:04 ` interruptible_sleep_on_timeout replacement Russell King - ARM Linux
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=565894EB.7040200@free.fr \
--to=slash.tmp@free.fr \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).