Commit Graph

890 Commits

Author SHA1 Message Date
Sebastian Huber
36338fb312 monitor: Do not zero sema id and name 2017-03-07 13:42:21 +01:00
Sebastian Huber
661be20777 shell: Fix warnings 2017-02-15 13:05:27 +01:00
Sebastian Huber
468e9a4d99 monitor: Print short and long task names
Print wait object identifier only if it exists.

Update #2858.
2017-02-14 11:12:00 +01:00
Sebastian Huber
54835ae9b3 Rename CONFIGURE_SMP_MAXIMUM_PROCESSORS
Rename CONFIGURE_SMP_MAXIMUM_PROCESSORS to CONFIGURE_MAXIMUM_PROCESSORS
since the SMP part is superfluous.

Update #2894.
2017-02-14 09:52:05 +01:00
Sebastian Huber
5eee7184ad shell: Fix warnings 2017-02-14 08:46:22 +01:00
Sebastian Huber
f95fa38764 Remove CONFIGURE_SMP_APPLICATION
Enable the SMP support if CONFIGURE_SMP_MAXIMUM_PROCESSORS > 1.

Update #2893.
2017-02-02 09:07:08 +01:00
Sebastian Huber
f7ba2945d3 monitor: Add support for BSD wakeup messages 2017-01-31 09:38:08 +01:00
Sebastian Huber
e366f774a7 score: Add _Thread_queue_Object_name
Add the special thread queue name _Thread_queue_Object_name to mark
thread queues embedded in an object with identifier.  Using the special
thread state STATES_THREAD_QUEUE_WITH_IDENTIFIER is not reliable for
this purpose since the thread wait information and thread state are
protected by different SMP locks in separate critical sections.  Remove
STATES_THREAD_QUEUE_WITH_IDENTIFIER.

Add and use _Thread_queue_Object_initialize().

Update #2858.
2017-01-31 09:38:07 +01:00
Stavros Passas
575c2e21e2 Complete STACK_CHECKER_EXTENSION. Fixes #2889 2017-01-30 11:50:47 +01:00
Sebastian Huber
2711914f82 Use <sys/endian.h>
Update #2803.
2017-01-24 08:39:22 +01:00
Sebastian Huber
7ced9d9bb2 score: Add and use _Thread_Get_name()
Update #2858.
2017-01-13 08:10:24 +01:00
Sebastian Huber
61c14a31c8 cpuuse: Call printer only once 2017-01-12 14:19:05 +01:00
Sebastian Huber
a3730b38cc Add and use rtems_assoc_thread_states_to_string() 2017-01-12 07:44:37 +01:00
Sebastian Huber
d063e7b3d8 score: Replace STATES_DELAYING
Replace STATES_DELAYING with STATES_WAITING_FOR_TIME.

There is no need for separate timeout thread states.  The
Thread_Control::Timer::header and Watchdog_Control::cpu members can be
used to figure out the kind of timeout.
2017-01-12 07:44:36 +01:00
Sebastian Huber
9a448aabe6 score: Add STATES_THREAD_QUEUE_WITH_IDENTIFIER
Add thread state bit to identify thread queues that are embedded in an
object with identifier.
2017-01-11 08:16:27 +01:00
Sebastian Huber
c6000d2b54 score: Delete STATES_WAITING_FOR_BUFFER 2017-01-11 08:16:27 +01:00
Sebastian Huber
6a9282d9bb Rename is_internal to always_set_to_false
Update #2825.
2016-12-12 08:03:14 +01:00
Sebastian Huber
5b6c290ed0 score: Initialize thread queue context early
Initialize thread queue context early preferably outside the critical
section.

Remove implicit _Thread_queue_Context_initialize() from
_Thread_Wait_acquire().
2016-12-02 12:41:03 +01:00
Chris Johns
3a30c6fa5c Fix untar mkdir when the directory exists. 2016-11-18 09:10:20 +11:00
Sebastian Huber
86d3a2e8a0 testsupport: Determine worker index via processor
Determine worker index via the current processor index to get consistent
job runs with respect to the cache topology.
2016-11-03 10:02:39 +01:00
Sebastian Huber
2dd098a635 score: Introduce Thread_Scheduler_control::home
Replace Thread_Scheduler_control::control and
Thread_Scheduler_control::own_control with new
Thread_Scheduler_control::home.

Update #2556.
2016-11-02 10:05:45 +01:00
Sebastian Huber
3a27248054 score: First part of new MrsP implementation
Update #2556.
2016-11-02 10:05:43 +01:00
Sebastian Huber
4cf58905b8 cpuuse: Use rtems_task_iterate()
Update #2423.
2016-11-02 08:46:48 +01:00
Sebastian Huber
d271c3bb78 rtems: Add rtems_task_iterate()
Update #2423.
2016-11-02 08:46:47 +01:00
Chris Johns
826f3afaf3 libmisc/xz: Add xz decompression.
Add support to untar XZ compressed files.
2016-10-13 13:11:40 +11:00
Sebastian Huber
9b0445685b monitor: Support priority inheritance queues 2016-09-30 07:54:29 +02:00
Sebastian Huber
300f6a481a score: Rework thread priority management
Add priority nodes which contribute to the overall thread priority.

The actual priority of a thread is now an aggregation of priority nodes.
The thread priority aggregation for the home scheduler instance of a
thread consists of at least one priority node, which is normally the
real priority of the thread.  The locking protocols (e.g. priority
ceiling and priority inheritance), rate-monotonic period objects and the
POSIX sporadic server add, change and remove priority nodes.

A thread changes its priority now immediately, e.g. priority changes are
not deferred until the thread releases its last resource.

Replace the _Thread_Change_priority() function with

 * _Thread_Priority_perform_actions(),
 * _Thread_Priority_add(),
 * _Thread_Priority_remove(),
 * _Thread_Priority_change(), and
 * _Thread_Priority_update().

Update #2412.
Update #2556.
2016-09-21 08:59:26 +02:00
Sebastian Huber
b20b736382 score: Introduce _Thread_Get_priority()
Avoid direct access to thread internal data fields.
2016-09-08 09:55:28 +02:00
Sebastian Huber
84e960e951 stackchk: Fix stack checker thread initialization
Commit 0fd6f25507 relaxed the thread begin
extension execution environment.  This broke the stack check which only
partially initialized the stack pattern in its create extension.  Move
the part of the begin extension to the create extension.
2016-09-08 07:43:02 +02:00
Sebastian Huber
8bb9d4100c stackchk: Use a const pattern to check 2016-09-08 07:43:02 +02:00
Sebastian Huber
bba988d313 stackchk: Remove superfluous internal header file 2016-09-08 07:43:02 +02:00
Sebastian Huber
1dd8ffff9f capture: Use proper accessor functions 2016-09-06 10:52:19 +02:00
Sebastian Huber
7af6b58c5c capture: Workaround to avoid misaligned access
Move the 64-bit field to a not 64-bit aligned structure offset to stop
the compiler from generating 64-bit load/store operations.
2016-09-06 09:53:08 +02:00
Chris Johns
1c18ebf0d6 libmisc/capture: Remove the reserved _t in the types. 2016-09-01 11:11:45 +10:00
Chris Johns
6da06c559f libmisc/capture: Fix the capture engine on SMP.
This patches some issues with the capture engine:

 1. Check is the engine is open in ctrace commands.
 2. Check all record open and appends for overflow.
 3. Fix the record open to take the size of user data and
    not the record header.
 4. Use packed structs for data being written to the per
    cpu buffers.
 5. Remove direct struct access to the capture buffers to
    avoid misaligned accesses.
 6. Add support to extract records, no struct access to the
    capture buffers.
 7. Update ctrace to extract records from the capture buffers.
 8. Add support to ctrace to always print the task name if it
    has one.
 9. Add support to manage names or the lack of a name.
10. Range of minor fixes.
11. Fix a long standing bug in ctset's handling of args.

Closes #2780.
2016-09-01 11:11:22 +10:00
Chris Johns
b0f08c83e2 libmisc/untar: Set the perms to the value in the tar file.
This patch parses the mode field in the tar header and sets the
directory or file to the mode value in the header.

Closes #2768.
2016-08-09 17:22:26 +10:00
Sebastian Huber
1fcac5adc5 score: Turn thread lock into thread wait lock
The _Thread_Lock_acquire() function had a potentially infinite run-time
due to the lack of fairness at atomic operations level.

Update #2412.
Update #2556.
Update #2765.
2016-07-27 10:55:30 +02:00
Alexander Krutwig
6a174c024a Add Untar_FromGzChunk_Print() + Test 2016-07-26 10:00:04 +02:00
Alexander Krutwig
1a8fe67acf Add Untar_FromChunk_Print() + Test 2016-07-26 10:00:04 +02:00
Sebastian Huber
77ff5599e0 score: Introduce map priority scheduler operation
Introduce map/unmap priority scheduler operations to map thread priority
values from/to the user domain to/from the scheduler domain.  Use the
map priority operation to validate the thread priority.  The EDF
schedulers use this new operation to distinguish between normal
priorities and priorities obtain through a job release.

Update #2173.
Update #2556.
2016-06-22 14:36:40 +02:00
Sebastian Huber
c82835a231 rtems: Rework RTEMS API to SuperCore priority
Use same structure as POSIX API for thread priority conversion to/from
SuperCore.
2016-06-22 14:00:28 +02:00
Sebastian Huber
f153157410 Rename rtems_test_print() into rtems_test_printf() 2016-06-22 07:45:48 +02:00
Sebastian Huber
506bfc8580 Move printer initialization to separate header
The RTEMS print user need to know nothing about a particular printer
implementation.  In particular get rid of the <stdio.h> include which
would be visible via <rtems.h>.
2016-06-22 07:29:26 +02:00
Sebastian Huber
ede1a4182d Make rtems/print.h independent of rtems/bspIo.h 2016-06-22 07:29:26 +02:00
Sebastian Huber
e8020d1914 Rename and move RTEMS_PRINTF_ATTRIBUTE()
Rename RTEMS_PRINTF_ATTRIBUTE() into RTEMS_PRINTFLIKE() (similar to
<sys/cdefs.h> __printflike()) and move it to <rtems/score/basedefs.h>.
2016-06-22 07:29:26 +02:00
Alexander Krutwig
a2597f3160 shell: Add rtems_shell_wait_for_explicit_input() 2016-06-06 12:57:07 +02:00
Chris Johns
d84e346b26 libmisc/untar: Support directory create and overwrites. Share the common code.
Support creating directories for files with a path depth greater than 1. Some
tar files can have files with a path depth greater than 1 and no directory
entry in the tar file to create a directory.

Support overwriting existing files and directories failing in a similar
way to tar on common hosts. If a file is replaced with a file delete the
file and create a new file. If a directory replaces a file remove the file
and create the directory. If a file replaces a directory remove the directory,
and if the directory is not empty and cannot be removed report an error. If a
directory alreday exists do nothing leaving the contents untouched.

The untar code now shares the common header parsing and initial processing
with the actual writes still separate. No changes to the IMFS have been made.

Updates #2415.
Closes #2207.
2016-06-03 18:14:20 +10:00
Chris Johns
560db81027 libmisc/stackchk: Fix printk warnings. 2016-06-03 17:28:59 +10:00
Sebastian Huber
a9cc6a84c5 smptests/smpatomic01: New test cases
Demonstrate that a read-modify-write atomic operation may be necessary
on some archtitectures to observe the latest value written.
2016-06-01 09:53:43 +02:00
Sebastian Huber
01cb5540bd shell: Add CPUINFO command
Update #2723.
2016-05-31 10:10:36 +02:00