Commit Graph

28 Commits

Author SHA1 Message Date
Joel Sherrill
d865c65efe testsuites/sptests/sp[s-z]*: Change license to BSD-2
Updates #3053.
2022-04-05 13:14:14 -05:00
Sebastian Huber
48898b3a5d rtems: rtems_scheduler_get_processor_set() status
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.
2021-05-06 08:03:58 +02:00
Sebastian Huber
4b7c77bce3 rtems: Change rtems_task_get_affinity() status
In case the processor set is not large enough to contain the processor
affinity set of the task 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 #4393.
2021-04-27 19:40:12 +02:00
Sebastian Huber
180201094e rtems: Add rtems_scheduler_map_priority_from_posix()
Update #3881.
2020-03-03 07:10:55 +01:00
Sebastian Huber
38736c69f8 rtems: Add rtems_scheduler_map_priority_to_posix()
Update #3881.
2020-03-03 07:09:59 +01:00
Sebastian Huber
8f6b7abd1a Move feature macro before "config.h" include
This allows to use header includes in "config.h" to reduce the build
configuration checks.

Update #3818.
2019-12-02 07:46:25 +01:00
Sebastian Huber
7ee64376ef rtems: Add rtems_scheduler_get_maximum_priority()
Update #3636.
2018-12-07 14:22:01 +01:00
Chris Johns
bc0675393d testsuite/sptests: Merged nested Makefile.am files into one Makefile.am
This change is part of the testsuite Makefile.am reorganization.

Update #3382
2018-04-10 08:24:54 +10:00
Sebastian Huber
c4b8b147dd tests: Use simple console driver
Update #3170.
Update #3199.
2017-11-06 07:26:42 +01:00
Sebastian Huber
af4355459e tests: Remove TEST_INIT
The TEST_EXTERN is a used only by the system.h style tests and they use
CONFIGURE_INIT appropriately.

Update #3170.
Update #3199.
2017-10-28 13:33:56 +02:00
Sebastian Huber
0719fc6ec7 sptests/spscheduler01: Test POSIX set/get affinity 2017-10-28 13:13:09 +02:00
Sebastian Huber
8744498752 score: Fix _Scheduler_Set_affinity() 2017-10-28 13:10:47 +02:00
Chris Johns
98c6d50145 testsuite: Use printk for all test output where possible.
- Remove the printf support leaving the direct printk support configured
  with TESTS_USE_PRINTK and all other output goes via a buffered vsniprintf
  call to printk.
- Control the test's single init for functions and global data with
  TEST_INIT and not CONFIGURE_INIT. They are now separate.

Updates #3170.
2017-10-23 16:25:45 +11:00
Sebastian Huber
ecabd38496 rtems: Add rtems_scheduler_ident_by_processor_set
Update #3070.
2017-07-11 14:16:59 +02:00
Sebastian Huber
548d65a52b rtems: Add rtems_scheduler_ident_by_processor()
Update #3069.
2017-07-11 14:16:58 +02:00
Joel Sherrill
7a4b264574 Remove obsolete __RTEMS_HAVE_SYS_CPUSET_H__ 2017-01-11 09:45:32 -06:00
Sebastian Huber
05ca53ddf6 rtems: Add scheduler processor add/remove
Update #2797.
2016-11-10 09:22:09 +01:00
Sebastian Huber
9e7fa07169 score: Relax _Scheduler_Set() restrictions
No longer unconditionally prevent scheduler changes if the thread owns
resources.  Prevent a scheduler change only in case other threads wait
for the resource.
2016-11-03 11:19:34 +01:00
Sebastian Huber
8123cae864 rtems: Add rtems_task_get_priority()
Update #2556.
Update #2784.
2016-09-21 08:59:33 +02:00
Sebastian Huber
c0bd0064ac rtems: Fix rtems_task_set_scheduler() API
Task priorities are only valid within a scheduler instance. The
rtems_task_set_scheduler() directive moves a task from one scheduler
instance to another using the current priority of the thread. However,
the current task priority of the source scheduler instance is undefined
in the target scheduler instance. Add a third parameter to specify the
priority.

Close #2749.
2016-07-01 11:51:49 +02:00
Sebastian Huber
a0b1b5edb8 Delete CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
This define was superfluous, undocumented and used inconsistently.
2014-12-16 11:34:38 +01:00
Sebastian Huber
4030cccfef tests: Add documentation 2014-09-01 11:01:04 +02:00
Sebastian Huber
38b59a6d30 score: Implement forced thread migration
The current implementation of task migration in RTEMS has some
implications with respect to the interrupt latency. It is crucial to
preserve the system invariant that a task can execute on at most one
processor in the system at a time. This is accomplished with a boolean
indicator in the task context. The processor architecture specific
low-level task context switch code will mark that a task context is no
longer executing and waits that the heir context stopped execution
before it restores the heir context and resumes execution of the heir
task. So there is one point in time in which a processor is without a
task. This is essential to avoid cyclic dependencies in case multiple
tasks migrate at once. Otherwise some supervising entity is necessary to
prevent life-locks. Such a global supervisor would lead to scalability
problems so this approach is not used. Currently the thread dispatch is
performed with interrupts disabled. So in case the heir task is
currently executing on another processor then this prolongs the time of
disabled interrupts since one processor has to wait for another
processor to make progress.

It is difficult to avoid this issue with the interrupt latency since
interrupts normally store the context of the interrupted task on its
stack. In case a task is marked as not executing we must not use its
task stack to store such an interrupt context. We cannot use the heir
stack before it stopped execution on another processor. So if we enable
interrupts during this transition we have to provide an alternative task
independent stack for this time frame. This issue needs further
investigation.
2014-05-07 14:26:28 +02:00
Sebastian Huber
c5831a3f9a score: Add clustered/partitioned scheduling
Clustered/partitioned scheduling helps to control the worst-case
latencies in the system.  The goal is to reduce the amount of shared
state in the system and thus prevention of lock contention.  Modern
multi-processor systems tend to have several layers of data and
instruction caches.  With clustered/partitioned scheduling it is
possible to honour the cache topology of a system and thus avoid
expensive cache synchronization traffic.

We have clustered scheduling in case the set of processors of a system
is partitioned into non-empty pairwise-disjoint subsets.  These subsets
are called clusters.  Clusters with a cardinality of one are partitions.
Each cluster is owned by exactly one scheduler instance.
2014-04-15 10:41:44 +02:00
Sebastian Huber
27270b0d6c rtems: Add task get/set scheduler 2014-04-15 09:29:35 +02:00
Sebastian Huber
1b67535d86 rtems: Add scheduler get processors 2014-04-15 09:29:35 +02:00
Sebastian Huber
b427a92adf rtems: Add scheduler identification 2014-04-15 09:29:31 +02:00
Sebastian Huber
0712d172d0 score: Task get/set affinity
Make rtems_task_get_affinity() and rtems_task_set_affinity() available
on non-SMP configurations.  Allow larger CPU sets.
2014-04-15 08:37:12 +02:00