[Bug 2069] [CBS Scheduler] Memory leak and enqueue problem

bugzilla-daemon at rtems.org bugzilla-daemon at rtems.org
Mon Jun 18 14:29:20 UTC 2012


https://www.rtems.org/bugzilla/show_bug.cgi?id=2069

Andreas Heinig <andreas.heinig at cs.tu-dortmund.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #1478|threadqenqueuepriority.patc |scheduleredfallocate.patch
           filename|h                           |

--- Comment #2 from Andreas Heinig <andreas.heinig at cs.tu-dortmund.de> 2012-06-18 09:29:20 CDT ---
Comment on attachment 1478
  --> https://www.rtems.org/bugzilla/attachment.cgi?id=1478
Correctly initialize EDF and CBS per-threas structure

diff --git a/cpukit/score/src/scheduleredfallocate.c
b/cpukit/score/src/scheduleredfallocate.c
index 5e6ff6a..1993bbb 100644
--- a/cpukit/score/src/scheduleredfallocate.c
+++ b/cpukit/score/src/scheduleredfallocate.c
@@ -15,6 +15,7 @@
 #include <rtems/config.h>
 #include <rtems/score/scheduler.h>
 #include <rtems/score/scheduleredf.h>
+#include <rtems/score/schedulercbs.h>
 #include <rtems/score/wkspace.h>

 void *_Scheduler_EDF_Allocate(
@@ -22,15 +23,15 @@ void *_Scheduler_EDF_Allocate(
 )
 {
   void *sched;
-  Scheduler_EDF_Per_thread *schinfo;
-
-  sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) );
+  Scheduler_CBS_Per_thread *schinfo;

+  sched = _Workspace_Allocate(sizeof(Scheduler_CBS_Per_thread));
   if ( sched ) {
     the_thread->scheduler_info = sched;
-    schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info);
-    schinfo->thread = the_thread;
-    schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN;
+    schinfo = (Scheduler_CBS_Per_thread *)(the_thread->scheduler_info);
+    schinfo->edf_per_thread.thread = the_thread;
+    schinfo->edf_per_thread.queue_state =
SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN;
+    schinfo->cbs_server = NULL;
   }

   return sched;

-- 
Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the bugs mailing list