summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/score/include')
-rw-r--r--cpukit/score/include/rtems/score/scheduler.h12
-rw-r--r--cpukit/score/include/rtems/score/schedulercbs.h15
-rw-r--r--cpukit/score/include/rtems/score/scheduleredf.h17
-rw-r--r--cpukit/score/include/rtems/score/schedulerimpl.h16
4 files changed, 23 insertions, 37 deletions
diff --git a/cpukit/score/include/rtems/score/scheduler.h b/cpukit/score/include/rtems/score/scheduler.h
index c8a7f87541..0a6d68208a 100644
--- a/cpukit/score/include/rtems/score/scheduler.h
+++ b/cpukit/score/include/rtems/score/scheduler.h
@@ -139,14 +139,14 @@ typedef struct {
void ( *node_destroy )( const Scheduler_Control *, Scheduler_Node * );
/** @see _Scheduler_Release_job() */
- void ( *release_job ) (
+ Thread_Control *( *release_job ) (
const Scheduler_Control *,
Thread_Control *,
uint64_t
);
/** @see _Scheduler_Cancel_job() */
- void ( *cancel_job ) (
+ Thread_Control *( *cancel_job ) (
const Scheduler_Control *,
Thread_Control *
);
@@ -533,8 +533,10 @@ void _Scheduler_default_Node_destroy(
* @param[in] scheduler Unused.
* @param[in] the_thread Unused.
* @param[in] deadline Unused.
+ *
+ * @retval NULL Always.
*/
-void _Scheduler_default_Release_job(
+Thread_Control *_Scheduler_default_Release_job(
const Scheduler_Control *scheduler,
Thread_Control *the_thread,
uint64_t deadline
@@ -545,8 +547,10 @@ void _Scheduler_default_Release_job(
*
* @param[in] scheduler Unused.
* @param[in] the_thread Unused.
+ *
+ * @retval NULL Always.
*/
-void _Scheduler_default_Cancel_job(
+Thread_Control *_Scheduler_default_Cancel_job(
const Scheduler_Control *scheduler,
Thread_Control *the_thread
);
diff --git a/cpukit/score/include/rtems/score/schedulercbs.h b/cpukit/score/include/rtems/score/schedulercbs.h
index bfad633987..c230e08d24 100644
--- a/cpukit/score/include/rtems/score/schedulercbs.h
+++ b/cpukit/score/include/rtems/score/schedulercbs.h
@@ -163,20 +163,7 @@ Scheduler_Void_or_thread _Scheduler_CBS_Unblock(
Thread_Control *the_thread
);
-/**
- * @brief Called when a new job of task is released.
- *
- * This routine is called when a new job of task is released.
- * It is called only from Rate Monotonic manager in the beginning
- * of new period. Deadline has to be shifted and budget replenished.
- *
- * @param[in] scheduler The scheduler instance.
- * @param[in] the_thread is the owner of the job.
- * @param[in] length of the new job from now. If equal to 0,
- * the job was cancelled or deleted.
- */
-
-void _Scheduler_CBS_Release_job (
+Thread_Control *_Scheduler_CBS_Release_job(
const Scheduler_Control *scheduler,
Thread_Control *the_thread,
uint64_t length
diff --git a/cpukit/score/include/rtems/score/scheduleredf.h b/cpukit/score/include/rtems/score/scheduleredf.h
index 5d9b4359c4..81b245e391 100644
--- a/cpukit/score/include/rtems/score/scheduleredf.h
+++ b/cpukit/score/include/rtems/score/scheduleredf.h
@@ -215,26 +215,13 @@ Scheduler_Void_or_thread _Scheduler_EDF_Yield(
Thread_Control *the_thread
);
-/**
- * @brief Called when a new job of task is released.
- *
- * This routine is called when a new job of task is released.
- * It is called only from Rate Monotonic manager in the beginning
- * of new period.
- *
- * @param[in] scheduler The scheduler instance.
- * @param[in] the_thread is the owner of the job.
- * @param[in] deadline of the new job from now. If equal to 0,
- * the job was cancelled or deleted, thus a running task
- * has to be suspended.
- */
-void _Scheduler_EDF_Release_job(
+Thread_Control *_Scheduler_EDF_Release_job(
const Scheduler_Control *scheduler,
Thread_Control *the_thread,
uint64_t deadline
);
-void _Scheduler_EDF_Cancel_job(
+Thread_Control *_Scheduler_EDF_Cancel_job(
const Scheduler_Control *scheduler,
Thread_Control *the_thread
);
diff --git a/cpukit/score/include/rtems/score/schedulerimpl.h b/cpukit/score/include/rtems/score/schedulerimpl.h
index 91fa178d20..1c5a697619 100644
--- a/cpukit/score/include/rtems/score/schedulerimpl.h
+++ b/cpukit/score/include/rtems/score/schedulerimpl.h
@@ -496,29 +496,37 @@ RTEMS_INLINE_ROUTINE void _Scheduler_Node_destroy(
*
* @param[in] the_thread The thread.
* @param[in] deadline The deadline in watchdog ticks since boot.
+ *
+ * @return The thread to hand over to _Thread_Update_priority().
*/
-RTEMS_INLINE_ROUTINE void _Scheduler_Release_job(
+RTEMS_INLINE_ROUTINE Thread_Control *_Scheduler_Release_job(
Thread_Control *the_thread,
uint64_t deadline
)
{
const Scheduler_Control *scheduler = _Scheduler_Get( the_thread );
- ( *scheduler->Operations.release_job )( scheduler, the_thread, deadline );
+ return ( *scheduler->Operations.release_job )(
+ scheduler,
+ the_thread,
+ deadline
+ );
}
/**
* @brief Cancels a job of a thread with respect to the scheduler.
*
* @param[in] the_thread The thread.
+ *
+ * @return The thread to hand over to _Thread_Update_priority().
*/
-RTEMS_INLINE_ROUTINE void _Scheduler_Cancel_job(
+RTEMS_INLINE_ROUTINE Thread_Control *_Scheduler_Cancel_job(
Thread_Control *the_thread
)
{
const Scheduler_Control *scheduler = _Scheduler_Get( the_thread );
- ( *scheduler->Operations.cancel_job )( scheduler, the_thread );
+ return ( *scheduler->Operations.cancel_job )( scheduler, the_thread );
}
/**