Skip to content

Commit

Permalink
PR2069: [CBS Scheduler] Memory leak and enqueue problem
Browse files Browse the repository at this point in the history
 Due to the fact that CBS extends the EDF scheduler, most parts of EDF are
 reused. One part is the allocation of the per-thread data. However, the CBS
 per-thread structure defines a further element (while including the rest of
 Scheduler_EDF_Per_thread)
  • Loading branch information
Andreas Heinig authored and gedare committed Aug 6, 2012
1 parent 6c5d6c5 commit 7a9288f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions cpukit/score/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ libscore_a_SOURCES += src/scheduleredf.c \

## SCHEDULERCBS_C_FILES
libscore_a_SOURCES += src/schedulercbs.c \
src/schedulercbsallocate.c \
src/schedulercbsattachthread.c \
src/schedulercbscleanup.c \
src/schedulercbscreateserver.c \
Expand Down
13 changes: 12 additions & 1 deletion cpukit/score/include/rtems/score/schedulercbs.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ extern "C" {
_Scheduler_EDF_Yield, /* yield entry point */ \
_Scheduler_EDF_Block, /* block entry point */ \
_Scheduler_CBS_Unblock, /* unblock entry point */ \
_Scheduler_EDF_Allocate, /* allocate entry point */ \
_Scheduler_CBS_Allocate, /* allocate entry point */ \
_Scheduler_EDF_Free, /* free entry point */ \
_Scheduler_EDF_Update, /* update entry point */ \
_Scheduler_EDF_Enqueue, /* enqueue entry point */ \
Expand Down Expand Up @@ -315,6 +315,17 @@ void _Scheduler_CBS_Budget_callout(
Thread_Control *the_thread
);

/**
* @brief Scheduler CBS Allocate
*
* This routine allocates CBS specific information of @a the_thread.
*
* @param[in] the_thread is the thread the scheduler is allocating
* management memory for.
*/
void *_Scheduler_CBS_Allocate(
Thread_Control *the_thread
);
#ifdef __cplusplus
}
#endif
Expand Down

0 comments on commit 7a9288f

Please sign in to comment.