This is the mail archive of the
ecos-devel@sourceware.org
mailing list for the eCos project.
Re: [ECOS] Miss calling ASR in sched.cxx
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)
-------------------