From: Sven-Thorsten Dietrich <thebigcorporation@gmail.com>
To: ratheesh k <ratheesh.ksz@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org
Subject: Re: preempt_disable and sleep()
Date: Thu, 13 May 2010 11:43:21 -0700 [thread overview]
Message-ID: <1273776201.11899.23.camel@sven.thebigcorporation.com> (raw)
In-Reply-To: <AANLkTinbwZK5Tp6aI4ja38XaiiB5aIyECzHPdMpvkaIy@mail.gmail.com>
On Fri, 2010-05-14 at 00:02 +0530, ratheesh k wrote:
> I am running RT linux .
>
> /* code snippet */
>
> preempt_disable()
> ...........
> sleep(10);
> '............
> preempt_enable()
>
>
> will this sleep() will cause reschedule ?.
>
Why would you do this?
If you had tried this code, you would have seen the corresponding stack
dump on the console.
> if an interrupt comes while premption is disabled , how it is handled ?.
>
Depends on the number of (idle) cores, the setting of CONFIG_PREEMPT_[]
and the type of interrupt.
RT threaded IRQs would not run until preemption is enabled on a single
core system.
> Thanks,
> Ratheesh
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2010-05-13 18:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-13 18:32 preempt_disable and sleep() ratheesh k
2010-05-13 18:43 ` Sven-Thorsten Dietrich [this message]
2010-05-14 2:46 ` ratheesh k
2010-05-14 3:37 ` Paul E. McKenney
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=1273776201.11899.23.camel@sven.thebigcorporation.com \
--to=thebigcorporation@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=ratheesh.ksz@gmail.com \
/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).