| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Move all rtems_scheduler_* directives to the new header file
<rtems/rtems/scheduler.h>. Add a Scheduler Manager API and
implementation group.
|
|
|
|
|
|
|
|
|
|
| |
Remove the THREAD_WAIT_STATE_READY_AGAIN and simply use the initial value to
indicate that a thread does not wait on something. Rename
THREAD_WAIT_FLAGS_INITIAL to THREAD_WAIT_STATE_READY. This change is necessary
so that _Thread_Continue() can be called for threads which never waited on
something (for example dormant threads).
Update #4546.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Return an error status for the following error condition in
rtems_scheduler_remove_processor():
While an attempt is made to remove a processor from a scheduler, while
the processor is the only processor owned by the scheduler, if a thread
exists which uses the scheduler as a helping scheduler, then the
processor shall not be removed.
The reason is that ask for help requests and withdraw node requests are
processed asynchronously in any order. An ask for help request carried
out on a scheduler without a processor is undefined behaviour.
Update error status description.
Update #4544.
|
|
|
|
|
|
| |
These external functions rtems_scheduler_get_processor() and
rtems_scheduler_get_processor_maximum() which may be used by bindings
for languages other than C/C++.
|
| |
|
|
|
|
|
| |
Do not write to the object referenced by old_priority in error paths.
This is in line with other directives.
|
|
|
|
|
|
|
| |
We have to use a second thread queue context to acquire and release the
thread wait lock.
Close #4356.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch set replaces the CPU budget algorithm enumeration with a set of CPU
budget operations which implement a particular CPU budget algorithm. This
helps to hide the CPU budget algorithm implementation details from the general
thread handling. The CPU budget callouts are turned into CPU budget
operations. This slightly reduces the size of the thread control block.
All schedulers used the default scheduler tick implementation. The tick
scheduler operation is removed and the CPU budget operations are directly used
in _Watchdog_Tick() if the executing thread uses a CPU budget algorithm. This
is performance improvement for all threads which do not use a CPU budget
algorithm (default behaviour).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The rate monotonic period statistics were affected by
rtems_cpu_usage_reset(). The logic to detect and work around a CPU
usage reset was broken.
The Thread_Contol::cpu_time_used is changed to contain the processor
time used throughout the entire lifetime of the thread. The new member
Thread_Contol::cpu_time_used_at_last_reset is added to contain the
processor time used at the time of the last reset through
rtems_cpu_usage_reset(). This decouples the resets of the CPU usage and
the rate monotonic period statistics.
Update #4528.
|
|
|
|
|
|
|
|
| |
Set the postponed jobs count to zero in rtems_rate_monotonic_cancel() so that
rtems_rate_monotonic_get_status() returns a consistent status for inactive
periods.
Update #4511.
|
|
|
|
|
|
|
| |
Adjust parameter names to match with the declaration. This avoid using
a name reserved by the C standard: "time".
Close #4035.
|
|
|
|
| |
Close #2548.
|
|
|
|
|
|
|
|
|
| |
The rtems_rate_monotonic_get_status() directive returns an arbitrary
number for the count of postponed jobs if it is called for a newly
created period object. Set the count of postponed jobs to zero during
object creation.
Close #4511.
|
|
|
|
|
|
|
|
| |
This simplifies the implementation a bit. Declare _TOD_Days_to_date[] in
<rtems/score/todimpl.h>. Make _TOD_Days_per_month[] and
_TOD_Days_since_last_leap_year[] static.
Update #4338.
|
|
|
|
| |
Split up the multi line if statement into smaller parts.
|
|
|
|
| |
Replace call to removed _Partition_Free() with a call to _Objects_Free().
|
|
|
|
|
|
|
|
| |
Use the new Priority_Group_order enum instead of a boolean to indicated if a
priority should be inserted as the first or last node into its priority group.
This makes the code more expressive. It is also a bit more efficient since a
branch in _Scheduler_Node_set_priority() is avoided and a simple bitwise or
operation can be used.
|
|
|
|
|
|
|
|
| |
The rtems_partition_return_buffer() wrongly accepted which were exactly
at the buffer area end. Use the buffer area limit address for the range
checking.
Close #4490.
|
|
|
|
|
| |
Move common code into _Thread_Exit(). This enables a tail call
optimization in most cases.
|
|
|
|
|
|
|
| |
If rtems_task_delete() is called from within interrupt context, then
return RTEMS_CALLED_FROM_ISR. This makes the behaviour predictable.
Update #4414.
|
|
|
|
|
|
|
|
|
|
|
| |
rtems_task_restart() may be called from within interrupt context. So
checking only that the thread to restart is equal to the executing
thread is insufficient to determine a self restart. We have to also
check that no ISR is in progress. Merge _Thread_Restart_other() and
_Thread_Restart_self() into one _Thread_Restart() since they share a lot
of common code.
Close #4412.
|
|
|
|
| |
This simplifies rtems_task_restart().
|
|
|
|
| |
Close #4410.
|
|
|
|
|
|
| |
Replace defines with an enum.
Update #4406.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a parameter to _TOD_Validate() to disable the validation of the
ticks member.
There are two reasons for this change. Firstly, in
rtems_task_wake_when() was a double check for time_buffer == NULL (one
in rtems_task_wake_when() and one in _TOD_Validate()). Secondly, the
ticks member is ignored by rtems_task_wake_when(). This was done with a
write of zero to the ticks member and thus a modification of the
user-provided structure. Now the structure is no longer modified.
Using a mask parameter is quite efficient. You just have to load an
immediate value and there are no additional branches in _TOD_Validate().
Close #4406.
|
|
|
|
| |
This avoids an integer division at runtime.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes bug #4403. Directives
* rtems_timer_fire_when()
* rtems_timer_server_fire_when()
* rtems_task_wake_when()
are documented to return RTEMS_INVALID_ADDRESS when their time-of-day
argument is NULL. But actually they return RTEMS_INVALID_CLOCK. To fix
the issue this patch changes _TOD_Validate() to return a
status code instead of just true/false.
Close #4403
|
|
|
|
|
|
|
|
| |
Use _Objects_Free_nothing() for rtems_message_queue_construct() to avoid
unreachable code in _CORE_message_queue_Close() in case only
user-provided message buffers are used.
Update #4007.
|
|
|
|
|
|
|
| |
Rename _Stack_Free_nothing() in _Objects_Free_nothing() to make it
reusable for the message queue buffers.
Update #4007.
|
|
|
|
|
|
|
|
|
| |
In case the processor set is not large enough to contain the processor
set owned by the scheduler return RTEMS_INVALID_SIZE instead of
RTEMS_INVALID_NUMBER. This is more in line with other directives since
the issue is related to the size of an object.
Close #4401.
|
|
|
|
| |
Check for a NULL processor set pointer.
|
|
|
|
|
|
|
| |
The allocator mutex is recursive and already used for the task creation
in rtems_timer_initiate_server(). Just use this mutex instead of the
once mutex to serialize the initialization. This avoids a dependency on
condition variables which are not used here.
|
|
|
|
|
|
|
|
|
|
| |
The __builtin_unreachable() cannot be used with current GCC versions to
tell the compiler that a function does not return to the caller, see:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99151
Add a no return variant of _Thread_Dispatch_direct() to avoid generation
of dead code.
|
|
|
|
| |
This may reduce the code size a bit.
|
|
|
|
|
| |
This avoids having conditional statements to get the API-specific status
code.
|
|
|
|
|
| |
This avoids having conditional statements to get the API-specific status
code.
|
|
|
|
|
| |
There is no need to disable thread dispatching to get the affinity of a
task.
|
|
|
|
|
| |
This avoids having conditional statements to get the API-specific status
code.
|
|
|
|
| |
Close #4392.
|
|
|
|
|
|
|
| |
Since there are already excessive NULL pointer checks in the Classic
API, do this also in rtems_task_construct().
Update #3959.
|
|
|
|
|
|
|
| |
Since there are already excessive NULL pointer checks in the Classic
API, do this also in rtems_message_queue_construct().
Update #4007.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes issue #4338 by changing _TOD_Validate()
to only accept years till 2105. This requires another patch
to change the documentation of rtems_clock_set() and other
affected API functions (indicating the end date is 2105 not 2514).
I tried to support till year 2514 but it turned out that
this needs changing the Timer Manager too. That in turn
would mean to change _TOD_Seconds_since_epoch( void )
from 32 to 64 bit. Sebastian pointed out that a naive extension
leads to trouble with 32 bit processors. He deemed a safe
re-implementation too costly performance wise considering
that year 2106 is far away and current binaries using RTEMS
Classic API are unlikely to be in use by 2106.
The constant TOD_SECONDS_AT_2100_03_01_00_00 in
cpukit/rtems/src/clocktodtoseconds.c happens to be wrong by
1 hour. When setting the date 2100-Feb-28 23:59:59 and then
reading the date again you will find yourself in 2100-Feb-27.
Update #4338
|
|
|
|
|
| |
Replace Objects_Name_or_id_lookup_errors with new Status_Control codes.
Get rid of the _Status_Object_name_errors_to_status lookup table.
|
|
|
|
|
|
| |
The value of STATUS_CLASSIC_INTERNAL_ERROR must be equal to
RTEMS_INTERNAL_ERROR. Add static assertions to ensure that the status
codes match.
|
|
|
|
|
|
|
|
| |
Check only for invalid modes if a valid handler is presented to
rtems_signal_catch(). When NULL is used for the handler, ASR processing
is disabled and the mode is not used.
Update #4244.
|
|
|
|
|
|
| |
Do the ASR and preemption mode change only if requested by the mode
mask. The bug was introduced by
508f868237225a75e566d9fd304206363cfe441d.
|
|
|
|
|
|
| |
Do not mix checks for different error indicators (RTEMS_NOT_DEFINED and
RTEMS_INVALID_NUMBER). This simplifies the specification of
rtems_semaphore_create().
|
|
|
|
|
|
|
|
|
| |
MrsP semaphores are a generalization of the priority ceiling semaphores
for SMP configurations. Priority ceiling semaphores are required to use
the priority task wait queue discipline. Require this discipline also
for MrsP semaphores.
Close #4347.
|
|
|
|
|
| |
In uniprocessor configurations, we can simplify rtems_signal_catch().
Add a validation test for the SMP special case.
|
|
|
|
|
| |
Use the invariant that an ASR is only processed if ASR processing is
enabled.
|