summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/schedulerimpl.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-08-03 15:41:31 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-08-04 07:44:47 +0200
commit21bdca49eea9213cc31a497072d01192eed8675e (patch)
treefcfc8e0c3e4f7c38b7c7f06bc6d0076deb10edaf /cpukit/score/include/rtems/score/schedulerimpl.h
parentscore: Fix and simplify thread wait locks (diff)
downloadrtems-21bdca49eea9213cc31a497072d01192eed8675e.tar.bz2
score: Indroduce cancel job scheduler operation
Do not use a deadline value of zero to indicate a job cancellation. Use a dedicated scheduler operation for this.
Diffstat (limited to 'cpukit/score/include/rtems/score/schedulerimpl.h')
-rw-r--r--cpukit/score/include/rtems/score/schedulerimpl.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/score/schedulerimpl.h b/cpukit/score/include/rtems/score/schedulerimpl.h
index f8c29e215c..91fa178d20 100644
--- a/cpukit/score/include/rtems/score/schedulerimpl.h
+++ b/cpukit/score/include/rtems/score/schedulerimpl.h
@@ -508,6 +508,20 @@ RTEMS_INLINE_ROUTINE void _Scheduler_Release_job(
}
/**
+ * @brief Cancels a job of a thread with respect to the scheduler.
+ *
+ * @param[in] the_thread The thread.
+ */
+RTEMS_INLINE_ROUTINE void _Scheduler_Cancel_job(
+ Thread_Control *the_thread
+)
+{
+ const Scheduler_Control *scheduler = _Scheduler_Get( the_thread );
+
+ ( *scheduler->Operations.cancel_job )( scheduler, the_thread );
+}
+
+/**
* @brief Scheduler method invoked at each clock tick.
*
* This method is invoked at each clock tick to allow the scheduler