summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cpukit/rtems/src/ratemonperiod.c7
-rw-r--r--cpukit/score/include/rtems/score/scheduler.h4
-rw-r--r--cpukit/score/include/rtems/score/schedulercbs.h2
-rw-r--r--cpukit/score/include/rtems/score/scheduleredf.h2
-rw-r--r--cpukit/score/include/rtems/score/schedulerimpl.h6
-rw-r--r--cpukit/score/include/rtems/score/watchdogimpl.h8
-rw-r--r--cpukit/score/src/schedulercbsreleasejob.c2
-rw-r--r--cpukit/score/src/schedulerdefaultreleasejob.c8
-rw-r--r--cpukit/score/src/scheduleredfreleasejob.c5
9 files changed, 24 insertions, 20 deletions
diff --git a/cpukit/rtems/src/ratemonperiod.c b/cpukit/rtems/src/ratemonperiod.c
index 1a1373117b..771f9c15ab 100644
--- a/cpukit/rtems/src/ratemonperiod.c
+++ b/cpukit/rtems/src/ratemonperiod.c
@@ -71,20 +71,21 @@ static void _Rate_monotonic_Release_job(
)
{
Per_CPU_Control *cpu_self;
+ uint64_t deadline;
cpu_self = _Thread_Dispatch_disable_critical( lock_context );
_Rate_monotonic_Release( owner, lock_context );
- _Scheduler_Release_job( owner, next_length );
-
_ISR_lock_ISR_disable( lock_context );
- _Watchdog_Per_CPU_insert_relative(
+ deadline = _Watchdog_Per_CPU_insert_relative(
&the_period->Timer,
cpu_self,
next_length
);
_ISR_lock_ISR_enable( lock_context );
+ _Scheduler_Release_job( owner, deadline );
+
_Thread_Dispatch_enable( cpu_self );
}
diff --git a/cpukit/score/include/rtems/score/scheduler.h b/cpukit/score/include/rtems/score/scheduler.h
index ba9c2b50bb..73e2873de6 100644
--- a/cpukit/score/include/rtems/score/scheduler.h
+++ b/cpukit/score/include/rtems/score/scheduler.h
@@ -145,7 +145,7 @@ typedef struct {
void ( *release_job ) (
const Scheduler_Control *,
Thread_Control *,
- uint32_t
+ uint64_t
);
/** @see _Scheduler_Tick() */
@@ -508,7 +508,7 @@ void _Scheduler_default_Update_priority(
void _Scheduler_default_Release_job(
const Scheduler_Control *scheduler,
Thread_Control *the_thread,
- uint32_t deadline
+ uint64_t deadline
);
/**
diff --git a/cpukit/score/include/rtems/score/schedulercbs.h b/cpukit/score/include/rtems/score/schedulercbs.h
index 4e03e111a6..fea10d54ce 100644
--- a/cpukit/score/include/rtems/score/schedulercbs.h
+++ b/cpukit/score/include/rtems/score/schedulercbs.h
@@ -179,7 +179,7 @@ Scheduler_Void_or_thread _Scheduler_CBS_Unblock(
void _Scheduler_CBS_Release_job (
const Scheduler_Control *scheduler,
Thread_Control *the_thread,
- uint32_t length
+ uint64_t length
);
/**
diff --git a/cpukit/score/include/rtems/score/scheduleredf.h b/cpukit/score/include/rtems/score/scheduleredf.h
index 042143f80d..feaa2efa62 100644
--- a/cpukit/score/include/rtems/score/scheduleredf.h
+++ b/cpukit/score/include/rtems/score/scheduleredf.h
@@ -252,7 +252,7 @@ Scheduler_Void_or_thread _Scheduler_EDF_Yield(
void _Scheduler_EDF_Release_job (
const Scheduler_Control *scheduler,
Thread_Control *the_thread,
- uint32_t deadline
+ uint64_t deadline
);
#ifdef __cplusplus
diff --git a/cpukit/score/include/rtems/score/schedulerimpl.h b/cpukit/score/include/rtems/score/schedulerimpl.h
index 36214729d7..edad0d3fd4 100644
--- a/cpukit/score/include/rtems/score/schedulerimpl.h
+++ b/cpukit/score/include/rtems/score/schedulerimpl.h
@@ -522,16 +522,16 @@ RTEMS_INLINE_ROUTINE void _Scheduler_Update_priority(
* @brief Releases a job of a thread with respect to the scheduler.
*
* @param[in] the_thread The thread.
- * @param[in] length The period length.
+ * @param[in] deadline The deadline in watchdog ticks since boot.
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Release_job(
Thread_Control *the_thread,
- uint32_t length
+ uint64_t deadline
)
{
const Scheduler_Control *scheduler = _Scheduler_Get( the_thread );
- ( *scheduler->Operations.release_job )( scheduler, the_thread, length );
+ ( *scheduler->Operations.release_job )( scheduler, the_thread, deadline );
}
/**
diff --git a/cpukit/score/include/rtems/score/watchdogimpl.h b/cpukit/score/include/rtems/score/watchdogimpl.h
index 2b24cc68e5..b76a51acfa 100644
--- a/cpukit/score/include/rtems/score/watchdogimpl.h
+++ b/cpukit/score/include/rtems/score/watchdogimpl.h
@@ -339,23 +339,27 @@ RTEMS_INLINE_ROUTINE void _Watchdog_Per_CPU_release_critical(
_ISR_lock_Release( &cpu->Watchdog.Lock, lock_context );
}
-RTEMS_INLINE_ROUTINE void _Watchdog_Per_CPU_insert_relative(
+RTEMS_INLINE_ROUTINE uint64_t _Watchdog_Per_CPU_insert_relative(
Watchdog_Control *the_watchdog,
Per_CPU_Control *cpu,
uint32_t ticks
)
{
ISR_lock_Context lock_context;
+ uint64_t expire;
_Watchdog_Set_CPU( the_watchdog, cpu );
_Watchdog_Per_CPU_acquire_critical( cpu, &lock_context );
+ expire = cpu->Watchdog.ticks + ticks;
_Watchdog_Insert(
&cpu->Watchdog.Header[ PER_CPU_WATCHDOG_RELATIVE ],
the_watchdog,
- cpu->Watchdog.ticks + ticks
+ expire
);
_Watchdog_Per_CPU_release_critical( cpu, &lock_context );
+
+ return expire;
}
RTEMS_INLINE_ROUTINE void _Watchdog_Per_CPU_insert_absolute(
diff --git a/cpukit/score/src/schedulercbsreleasejob.c b/cpukit/score/src/schedulercbsreleasejob.c
index b8208292b8..124c02bac0 100644
--- a/cpukit/score/src/schedulercbsreleasejob.c
+++ b/cpukit/score/src/schedulercbsreleasejob.c
@@ -24,7 +24,7 @@
void _Scheduler_CBS_Release_job(
const Scheduler_Control *scheduler,
Thread_Control *the_thread,
- uint32_t deadline
+ uint64_t deadline
)
{
Scheduler_CBS_Node *node;
diff --git a/cpukit/score/src/schedulerdefaultreleasejob.c b/cpukit/score/src/schedulerdefaultreleasejob.c
index 90593abc44..db4ab0e8e1 100644
--- a/cpukit/score/src/schedulerdefaultreleasejob.c
+++ b/cpukit/score/src/schedulerdefaultreleasejob.c
@@ -24,10 +24,10 @@
void _Scheduler_default_Release_job(
const Scheduler_Control *scheduler,
Thread_Control *the_thread,
- uint32_t deadline
+ uint64_t deadline
)
{
- ( void ) scheduler;
- ( void ) the_thread;
- ( void ) deadline;
+ (void) scheduler;
+ (void) the_thread;
+ (void) deadline;
}
diff --git a/cpukit/score/src/scheduleredfreleasejob.c b/cpukit/score/src/scheduleredfreleasejob.c
index 2c3db65b64..b7c83a55ad 100644
--- a/cpukit/score/src/scheduleredfreleasejob.c
+++ b/cpukit/score/src/scheduleredfreleasejob.c
@@ -25,7 +25,7 @@
void _Scheduler_EDF_Release_job(
const Scheduler_Control *scheduler,
Thread_Control *the_thread,
- uint32_t deadline
+ uint64_t deadline
)
{
Priority_Control new_priority;
@@ -35,8 +35,7 @@ void _Scheduler_EDF_Release_job(
if (deadline) {
/* Initializing or shifting deadline. */
- new_priority = (_Watchdog_Ticks_since_boot + deadline)
- & ~SCHEDULER_EDF_PRIO_MSB;
+ new_priority = (uint32_t) deadline & ~SCHEDULER_EDF_PRIO_MSB;
}
else {
/* Switch back to background priority. */