From: Huang Yi <linuxjoy@gmail.com>
To: "Jürgen Lambrecht" <J.Lambrecht@televic.com>
Cc: ecos-devel@sourceware.org
Subject: Re: [ECOS] Miss calling ASR in sched.cxx
Date: Tue, 03 May 2011 07:04:00 -0000 [thread overview]
Message-ID: <BANLkTim_DSXO=Fk82ohUn6B5F0ONkxmpcw@mail.gmail.com> (raw)
In-Reply-To: <4DBFA2E4.3040603@televic.com>
Thanks. But at the mail archive, I found my original mail :
http://ecos.sourceware.org/ml/ecos-devel/2011-04/msg00008.html
The patch is present at the end of the mail.
I paste the same patch text here:
------------------------------[PATCH START] ------------------------------------
Index: packages/kernel/current/src/sched/sched.cxx
===================================================================
RCS file: /cvs/ecos/ecos/packages/kernel/current/src/sched/sched.cxx,v
retrieving revision 1.20
diff -u -8 -p -r1.20 sched.cxx
--- packages/kernel/current/src/sched/sched.cxx 29 Jan 2009 17:49:50
-0000 1.20
+++ packages/kernel/current/src/sched/sched.cxx 22 Apr 2011 02:42:06 -0000
@@ -131,16 +131,20 @@ inline void *operator new(size_t size, v
// have when it reschedules this thread back, and leaves this function.
// When it is non-zero, and the thread is rescheduled, no ASRS are run,
// or DSRs processed. By doing this, it makes it possible for threads
// that want to go to sleep to wake up with the scheduler lock in the
// same state it was in before.
void Cyg_Scheduler::unlock_inner( cyg_ucount32 new_lock )
{
+#ifdef CYGSEM_KERNEL_SCHED_ASR_SUPPORT
+ cyg_bool call_asr = false;
+#endif
+
#ifdef CYGDBG_KERNEL_TRACE_UNLOCK_INNER
CYG_REPORT_FUNCTION();
#endif
do {
CYG_PRECONDITION( new_lock==0 ? get_sched_lock() == 1 :
((get_sched_lock() == new_lock) ||
(get_sched_lock() == new_lock+1)),
@@ -229,23 +233,21 @@ void Cyg_Scheduler::unlock_inner( cyg_uc
}
if( new_lock == 0 )
{
#ifdef CYGSEM_KERNEL_SCHED_ASR_SUPPORT
// Check whether the ASR is pending and not inhibited. If
- // we can call it, then transfer this info to a local
+ // we can call it, then transfer this info to a
// variable (call_asr) and clear the pending flag. Note
// that we only do this if the scheduler lock is about to
// be zeroed. In any other circumstance we are not
// unlocking.
-
- cyg_bool call_asr = false;
if( (current->asr_inhibit == 0) && current->asr_pending )
{
call_asr = true;
current->asr_pending = false;
}
#endif
------------------------------[PATCH END] ------------------------------------
2011/5/3 Jürgen Lambrecht <J.Lambrecht@televic.com>:
> This is the correct list, but your attachment got lost.
> Regards, Jürgen
--
Huang Yi (kiron)
-------------------
prev parent reply other threads:[~2011-05-03 7:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-22 2:51 kiron
2011-05-03 1:18 ` Huang Yi
2011-05-03 6:38 ` Jürgen Lambrecht
2011-05-03 7:04 ` Huang Yi [this message]
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='BANLkTim_DSXO=Fk82ohUn6B5F0ONkxmpcw@mail.gmail.com' \
--to=linuxjoy@gmail.com \
--cc=J.Lambrecht@televic.com \
--cc=ecos-devel@sourceware.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 read-only IMAP folder(s) and NNTP newsgroup(s).