Commit Graph

27216 Commits

Author SHA1 Message Date
Sebastian Huber
d7a9469378 rbtree: Remove superfluous NULL pointer checks 2014-07-22 12:31:39 +02:00
Sebastian Huber
6b0a7efc77 rbtree: Format 2014-07-22 12:30:53 +02:00
Sebastian Huber
87894c0743 doc: Update console driver documentation 2014-07-21 17:43:11 +02:00
Joel Sherrill
742402b5e0 m68k/gen68360/include/tm27.h: Correct comment 2014-07-16 15:45:59 -05:00
Joel Sherrill
6e868d8724 Add More Testsuite Configuration Files and Update Existing Ones
The first pass at building these was without networking enabled.
This pass addresses that plus accounts for some new BSPs which
needed testsuite.tcfg files and BSPs which could not link tests
which had been added since the first pass.
2014-07-16 15:45:59 -05:00
Chris Johns
6832a5606a Common ARM A8 code. 2014-07-16 14:17:25 +10:00
Joel Sherrill
0ea6d07a03 Use Shared Method for Thread Unblock Cleanup
When a thread is removed from a thread queue or is unblocked
by receiving an event, the same actions are required.

 + timeout watchdog canceled,
 + thread must be unblocked, and
 + (MP only) proxy cleaned up

This patch makes sure there is only one copy of this code.
2014-07-15 13:42:30 -05:00
Joel Sherrill
3250664700 Thread Queue: Merge discipline subroutines into main methods
There was a lot of duplication between the discipline subroutines.
With the transition to RBTrees for priority discipline, there were
only a few lines of source code manipulating the data structure
for FIFO and priority. Thus is made sense to fold these back
into the main methods.

As part of doing this all of the tests for discipline were changed
to be in the same order.
2014-07-15 13:42:30 -05:00
Joel Sherrill
ed7a02895e Thread Queue Priority Discipline Reimplemented with RBTree 2014-07-15 12:43:44 -05:00
Sebastian Huber
64939bc9ef rbtree: Reduce RBTree_Control size
Remove compare function and is unique indicator from the control
structure.  Rename RBTree_Compare_function to RBTree_Compare.  Rename
rtems_rbtree_compare_function to rtems_rbtree_compare.  Provide C++
compatible initializers.  Add compare function and is unique indicator
to _RBTree_Find(), _RBTree_Insert(), rtems_rbtree_find() and
rtems_rbtree_insert().  Remove _RBTree_Is_unique() and
rtems_rbtree_is_unique().  Remove compare function and is unique
indicator from _RBTree_Initialize_empty() and
rtems_rbtree_initialize_empty().
2014-07-15 10:03:48 -05:00
Sebastian Huber
7e11999038 rbtree: Delete unused functions 2014-07-15 10:03:48 -05:00
Ben Gras
7e60b7d125 uart-output-char.h: extra offset definition.
All,

This patch is submitted as its values are used in my to-be-submitted
beagle bsp.
2014-07-15 10:03:32 -05:00
Joel Sherrill
9ba76ed8de sp59: Fix typos 2014-07-14 19:41:31 -05:00
Joel Sherrill
764e8b11d0 scheduleredfunblock.c: Correct spacing 2014-07-14 19:41:31 -05:00
Joel Sherrill
3a01e8b3e0 semdelete.c: Correct spacing 2014-07-14 19:41:31 -05:00
Joel Sherrill
b6343c6100 Enhance Semaphore Blocking and Readying Time Test Cases
tm02 and tm03 were modified to be reused for multiple configurations
of RTEMS Classic API Semaphores. This added tm31-36.  The messages for
tm02 and tm03 were modified to indicate the semaphore attributes.
tm31 - tm36 were added. This resulted in the following cases:

tm02 - rtems_semaphore_obtain: Counting/FIFO not available caller blocks
tm03 - rtems_semaphore_release: Counting/FIFO task readied preempts caller
tm31 - rtems_semaphore_obtain: Counting/priority not available caller blocks
tm32 - rtems_semaphore_release: Counting/priority task readied preempts caller
tm33 - rtems_semaphore_obtain: Binary/FIFO not available caller blocks
tm34 - rtems_semaphore_release: Binary/FIFO task readied preempts caller
tm35 - rtems_semaphore_obtain: Binary/priority not available caller blocks
tm36 - rtems_semaphore_release: Binary/priority task readied preempts caller
2014-07-14 19:31:00 -05:00
Jennifer Averett
648c86c26a capture01: Add include of assert.h. 2014-07-14 13:12:31 -05:00
Jennifer Averett
247118bf51 smpschedsem01: new test.
This test verifies priority is inherited from a high priority
semaphore by a lower  priority task.
2014-07-11 10:12:48 -05:00
Jennifer Averett
7eb3fd4782 smpschedaffinity05: Add test for worst case migration for affintiy scheduler.
This test uses a combination of priority and affinity to cause
the tasks running on all 4 cores to change due to one task priority
change.
2014-07-11 10:12:48 -05:00
Jennifer Averett
61d26f939d smpschedaffinity04: New test.
This test walks a secondary high prority task across
all the cores.
2014-07-11 10:12:48 -05:00
Jennifer Averett
28d6674966 smpschedaffinity03: New test.
This task walks the affinity of self across all the cores.
2014-07-11 10:12:48 -05:00
Jennifer Averett
0929306933 smpschedaffinity02: New test.
This test checks setting the affinity of a secondary task
on a two core system.
2014-07-11 10:12:48 -05:00
Jennifer Averett
d88b0e7fc8 smpschedaffinity01: New test.
This test verifies that affinity is honored when set prior to task start.
2014-07-11 10:12:47 -05:00
Jennifer Averett
82d137ae21 capture01: New non-interactive test for capture engine. 2014-07-11 09:49:55 -05:00
Jennifer Averett
463de590f0 capture: Fix capture engine to handle new extensions. 2014-07-11 09:48:50 -05:00
Jennifer Averett
1af8634a84 capture: Update comment block style in capture engine.
Doxygen added and comment blocks standardized.
2014-07-11 09:48:35 -05:00
Sebastian Huber
f0c8501e4c score: Scheduler helping proto for affinity sched
The priority affinity scheduler has the nice property that it can
produce more than one scheduled to ready state change in one operation.
Each scheduled to ready state change may lead to one thread in need for
help.  Since it is currently only possible to return at most one thread
in need for help, we have a problem here.

A solution might be to move the check for migrations into the ask for
help mechanism.
2014-07-11 09:55:33 +02:00
Sebastian Huber
27783f6ca8 score: Fix scheduler helping implementation
Do not extract the idle threads from the ready set so that there is
always a thread available for comparison.
2014-07-10 15:29:57 +02:00
Sebastian Huber
333f9426f6 score: Fix assertions 2014-07-10 15:29:57 +02:00
Chris Johns
76ad756c09 FreeBSD standard shell does not support substring expansion.
Switch to using awk to get a string of spaces.
2014-07-10 15:56:11 +10:00
Sebastian Huber
e1f446d3c1 bsps/sparc: Set best baud in APBUART driver
This prevents failures of all tests using rtems_shell_wait_for_input(),
e.g. capture, termios, pppd, etc.
2014-07-09 15:56:43 +02:00
Sebastian Huber
93726e5205 termios: Add rtems_termios_set_best_baud() 2014-07-09 15:56:43 +02:00
Christian Mauderer
8074342c9b termios: Add rtems_termios_get_termios() 2014-07-09 13:33:06 +02:00
Christian Mauderer
8448a4defc bsps/sparc: Move APBUART printk support 2014-07-09 12:07:49 +02:00
Sebastian Huber
21abc43fb5 bsps/sparc: Add and use shared APBUART console
Move the APBUART console driver support to the shared SPARC area so that
it can be reused by other BSPs.  Only the console driver initialization
is now BSP specific.
2014-07-09 12:07:49 +02:00
Sebastian Huber
a0eb21ebab bsps: Basic console driver for Termios devices 2014-07-09 12:07:49 +02:00
Sebastian Huber
a0fb29fb80 termios: PR1279: Use first open status 2014-07-09 12:07:49 +02:00
Sebastian Huber
32fc6a3490 termios: PR1279: Use set attributes status 2014-07-09 12:07:49 +02:00
Sebastian Huber
ef8c00bc88 termios: PR2153: New low-level device API
Add a new low-level device API to Termios that passes the TTY structure
to the low-level device functions.  This greatly simplifies the
low-level device drivers since they are no longer forced to derive their
private data from the minor number.

It makes it possible to use the TTY low-level lock in the device driver
low-level functions which is necessary for proper SMP support.  For
example to set the attributes it is often necessary to perform a
read-modify-write operation on a control register used also by interrupt
routines.

A compatibility layer is provided to support device drivers using the
old callback functions so it is not necessary to modify existing device
drivers.
2014-07-09 11:55:00 +02:00
Sebastian Huber
c6048ee2c5 score: _Scheduler_Thread_get_own_node()
Provide this function also for uni-processor configurations.
2014-07-09 11:22:02 +02:00
Sebastian Huber
9f228beaa6 smptests/smpmrsp01: Add and update test cases 2014-07-09 10:05:21 +02:00
Sebastian Huber
5c3d250959 score: Implement scheduler helping protocol
The following scheduler operations return a thread in need for help

    - unblock,
    - change priority, and
    - yield.

A thread in need for help is a thread that encounters a scheduler state
change from scheduled to ready or a thread that cannot be scheduled in
an unblock operation.  Such a thread can ask threads which depend on
resources owned by this thread for help.

Add a new ask for help scheduler operation.  This operation is used by
_Scheduler_Ask_for_help() to help threads in need for help returned by
the operations mentioned above.  This operation is also used by
_Scheduler_Thread_change_resource_root() in case the root of a resource
sub-tree changes.  A use case is the ownership change of a resource.

In case it is not possible to schedule a thread in need for help, then
the corresponding scheduler node will be placed into the set of ready
scheduler nodes of the scheduler instance.  Once a state change from
ready to scheduled happens for this scheduler node it may be used to
schedule the thread in need for help.
2014-07-09 10:05:17 +02:00
Joel Sherrill
52f8e90d7f schedulerpriorityaffinitysmp.c: Add period at end of sentence 2014-07-08 11:42:57 -05:00
Sebastian Huber
8568341d69 score: Need for help indicator for scheduler ops
Return a thread in need for help for the following scheduler operations

- unblock,
- change priority, and
- yield.

A thread in need for help is a thread that encounters a scheduler state
change from scheduled to ready or a thread that cannot be scheduled in
an unblock operation.  Such a thread can ask threads which depend on
resources owned by this thread for help.
2014-07-08 16:30:48 +02:00
Sebastian Huber
ac532f3350 score: Add _Scheduler_Help()
Manage the help state of threads with respect to scheduling decisions.
2014-07-08 16:30:48 +02:00
Sebastian Huber
08d9760daf score: Rename *_Node_get() to *_Thread_get_node()
This emphasizes that the scheduler node of a thread is returned and this
is not a function working with scheduler nodes like the other *_Node_*()
functions.
2014-07-08 16:30:48 +02:00
Sebastian Huber
19e417678a score: Simplify SMP processor allocation
Avoid copy and paste and set the scheduler node state in one place.
2014-07-08 16:30:48 +02:00
Sebastian Huber
835b88b883 score: Rename _Scheduler_SMP_Update_heir()
Rename and move _Scheduler_SMP_Update_heir() to
_Thread_Dispatch_update_heir() since this function is not scheduler
specific.
2014-07-08 16:30:47 +02:00
Sebastian Huber
5c632c4a18 score: Fix warning 2014-07-07 13:56:18 +02:00
Sebastian Huber
46cd17a3be score: Fix MrsP resource root change
Use the root of the owner for the new root, since the owner may depend
on a resource as well.
2014-07-04 14:52:16 +02:00