| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
This mutex implementation uses a thread priority queue with a simple
priority inheritance mechanism (similar to the object based mutexes).
The storage space must be supplied by the user (16 bytes on 32-bit
targets).
|
|
|
|
| |
Update #2365.
|
| |
|
|
|
|
|
|
|
|
| |
Replace timestamp implementation with FreeBSD bintime and timecounters.
New test sptests/sptimecounter02.
Update #2271.
|
|
|
|
|
|
| |
New test sptests/timecounter01.
Update #2271.
|
|
|
|
|
|
|
|
|
|
| |
Atomically update the current priority of a thread and the wait queue.
Serialize the scheduler update in a separate critical section with a
generation number.
New test sptests/spintrcritical23.
Close #2310.
|
|
|
|
|
|
| |
Use of deprecated notepads in sp07 needs further work.
Updates #2305.
|
|
|
|
|
|
|
|
| |
Make <rtems/score/atomic.h> available for all RTEMS configurations. Use
inline functions instead of macros. Use ISR disable/enable on
uni-processor configurations to ensure atomicity.
Update #2273.
|
| |
|
| |
|
|
|
|
|
|
| |
Ensure that the global construction is performed in the context of the
first initialization thread. On SMP this was not guaranteed in the
previous implementation.
|
| |
|
|
|
|
|
| |
Use interrupt critical section test support. Do not print end of test
message in case of failure.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
A resource is something that has at most one owner at a time and may
have multiple rivals in case an owner is present. The owner and rivals
are impersonated via resource nodes. A resource is represented via the
resource control structure. The resource controls and nodes are
organized as trees. It is possible to detect deadlocks via such a
resource tree. The _Resource_Iterate() function can be used to iterate
through such a resource tree starting at a top node.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add basic support for the Multiprocessor Resource Sharing Protocol
(MrsP).
The Multiprocessor Resource Sharing Protocol (MrsP) is defined in A.
Burns and A.J. Wellings, A Schedulability Compatible Multiprocessor
Resource Sharing Protocol - MrsP, Proceedings of the 25th Euromicro
Conference on Real-Time Systems (ECRTS 2013), July 2013. It is a
generalization of the Priority Ceiling Protocol to SMP systems. Each
MrsP semaphore uses a ceiling priority per scheduler instance. These
ceiling priorities can be specified with rtems_semaphore_set_priority().
A task obtaining or owning a MrsP semaphore will execute with the
ceiling priority for its scheduler instance as specified by the MrsP
semaphore object. Tasks waiting to get ownership of a MrsP semaphore
will not relinquish the processor voluntarily. In case the owner of a
MrsP semaphore gets preempted it can ask all tasks waiting for this
semaphore to help out and temporarily borrow the right to execute on one
of their assigned processors.
The help out feature is not implemented with this patch.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The function to change a thread priority was too complex. Simplify it
with a new scheduler operation. This increases the average case
performance due to the simplified logic. The interrupt disabled
critical section is a bit prolonged since now the extract, update and
enqueue steps are executed atomically. This should however not impact
the worst-case interrupt latency since at least for the Deterministic
Priority Scheduler this sequence can be carried out with a wee bit of
instructions and no loops.
Add _Scheduler_Change_priority() to replace the sequence of
- _Thread_Set_transient(),
- _Scheduler_Extract(),
- _Scheduler_Enqueue(), and
- _Scheduler_Enqueue_first().
Delete STATES_TRANSIENT, _States_Is_transient() and
_Thread_Set_transient() since this state is now superfluous.
With this change it is possible to get rid of the
SCHEDULER_SMP_NODE_IN_THE_AIR state. This considerably simplifies the
implementation of the new SMP locking protocols.
|
|
|
|
|
| |
Make rtems_task_get_affinity() and rtems_task_set_affinity() available
on non-SMP configurations. Allow larger CPU sets.
|
|
|
|
|
|
| |
Per task variables are inherently unsafe in SMP systems. This
patch disables them from the build and adds warnings in the
appropriate documentation and configuration sections.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Issue a fatal error in case a thread is deleted which still owns
resources (e.g. a binary semaphore with priority inheritance or ceiling
protocol). The resource count must be checked quite late since RTEMS
task variable destructors, POSIX key destructors, POSIX cleanup handler,
the Newlib thread termination extension or other thread termination
extensions may release resources. In this context it would be quite
difficult to return an error status to the caller.
An alternative would be to place threads with a non-zero resource count
not on the zombie chain. Thus we have a resource leak instead of a
fatal error. The terminator thread can see this error if we return an
RTEMS_RESOURCE_IN_USE status for the rtems_task_delete() for example.
|
|
|
|
|
|
|
| |
This fixes an integer underflow problem in case resources are released
after a thread restart.
Add new test sptests/spthreadlife01.
|
|
|
|
|
|
| |
Split sp09 screen 1 into new test sptask_err04.
Split sp09 screen 2 into new tests sptask__err02 and spclock_err01,
as well as moving one verification into sptimer_err01.
|
| |
|
| |
|
|
|
|
|
| |
sp09 screen 5 split into spsem_err01, sp09 screen 6 split into
spsem_err02, and sptask_err01.
|
|
|
|
|
|
| |
spmsgq_err01 test replaces rtems_message_queue_XXX error tests from
sp09 screen 7. spmsgq_err02 replaces rtems_message_queue_XXX error
tests from sp09 screen 8.
|
|
|
|
| |
This test verifies rtems_port_XXX error tests from sp09 screen 9.
|
|
|
|
|
| |
This test moves rtems_signal_send error testing from sp09
screen 9 into its own test.
|
|
|
|
|
| |
This test contains the interrupt catch error tests from sp09
screen 9.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Do not use _TLS_Size here since this will lead GCC to assume that this
symbol is not 0 and the later > 0 test will be optimized away.
|
|
|
|
|
| |
This error case is no longer required since rtems_shutdown_executive()
can be called anytime, anywhere
|
|
|
|
|
|
|
|
|
| |
Add a CPU counter interface to allow access to a free-running counter.
It is useful to measure short time intervals. This can be used for
example to enable profiling of critical low-level functions.
Add two busy wait functions rtems_counter_delay_ticks() and
rtems_counter_delay_nanoseconds() implemented via the CPU counter.
|
|
|
|
|
| |
Tested and implemented on ARM, m68k, PowerPC and SPARC. Other
architectures need more work.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This adds five tests for <sys/cpuset.h>. It does not include
tests for CPU_XXX_S methods. The autotools should be able to
avoid enabling the tests unless the toolset has <sys/cpuset.h>.
|
| |
|
|
|
|
| |
Bug: https://www.rtems.org/bugzilla/show_bug.cgi?id=1216
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|