Commit Graph
853 Commits
Author SHA1 Message Date
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
Sebastian Huber 5e072f6d35 cpuuse: Hide implementation details 2016-05-31 10:10:36 +02:00
Sebastian Huber 73f2ddb915 rtems: Fix semaphore field name 2016-05-30 16:16:24 +02:00
Sebastian Huber 3692095f2c rtems: Move MrsP semaphore operations
Move MrsP semaphore operations to a less prominent location.  Fix field
name.
2016-05-30 16:16:23 +02:00
Sebastian Huber 0b713f8940 score: Rework CORE inherit priority mutex
Provide dedicated seize and surrender methods for inherit priority
mutexes.  This eliminates CORE_mutex_Attributes.
2016-05-30 16:16:23 +02:00
Sebastian Huber 5a598ac99b score: Add CORE mutex variants
Add CORE_recursive_mutex_Control and CORE_ceiling_mutex_Control to avoid
the run-time evaluation of attributes to figure out how a particular
mutex methods should behave.  Start with the no protocol variants.  This
eliminates the CORE_MUTEX_DISCIPLINES_FIFO and
CORE_MUTEX_DISCIPLINES_PRIORITY disciplines.
2016-05-30 16:16:23 +02:00
Chris Johns 62cba156f6 libmisc: Fix printk format warnings. 2016-05-25 15:47:34 +10:00
Chris Johns 24d0ee57a4 cpukit, testsuite: Add rtems_printf and rtems_printer support.
This change adds rtems_printf and related functions and wraps the
RTEMS print plugin support into a user API. All references to the
plugin are removed and replaced with the rtems_printer interface.

Printk and related functions are made to return a valid number of
characters formatted and output.

The function attribute to check printf functions has been added
to rtems_printf and printk. No changes to remove warrnings are part
of this patch set.

The testsuite has been moved over to the rtems_printer. The testsuite
has a mix of rtems_printer access and direct print control via the
tmacros.h header file. The support for begink/endk has been removed
as it served no purpose and only confused the code base. The testsuite
has not been refactored to use rtems_printf. This is future work.
2016-05-25 15:47:34 +10:00
Sebastian Huber 862a0eeb11 score: Rework _Thread_Restart_other()
Rework _Thread_Restart_other() to use _Thread_Change_life_locked().
Cope with concurrent change requests by means of a pending request
counter.

Update #2555.
Update #2626.
2016-05-20 07:49:38 +02:00
Sebastian Huber 232147ddc1 score: Add _Thread_Join() and _Thread_Cancel()
Split _Thread_Close() into _Thread_Join() and _Thread_Cancel() to
prepare for a re-use in pthread_join() and pthread_cancel().

Update #2555.
Update #2626.
2016-05-20 07:49:37 +02:00
Sebastian Huber df23f464be capture: Fix use of per-processor data
Get the current processor index only once and with interrupts disabled.

Close #2707.
2016-05-12 13:24:43 +02:00
Sebastian Huber d449c12df3 capture: Remove superfluous includes 2016-05-12 13:24:43 +02:00
Sebastian Huber 7bd18697f8 capture: Compact rtems_capture_record_t
Order fields according to alignment to reduce structure internal
padding.
2016-05-12 13:24:42 +02:00
Sebastian Huber 2f11d4a014 capture: Fix buffer allocation and free
Do not use function static variables.  Remove superfluous volatile
qualifiers.  Use proper integer types.

Close #2706.
2016-05-12 13:24:42 +02:00
Sebastian Huber e135271b93 score: Avoid Giant lock _Scheduler_Set_affinity()
Update #2555.
2016-05-12 13:24:41 +02:00
Sebastian Huber bd12dda405 score: Use thread state lock for current state
In addition protect scheduler of thread by thread state lock.  Enables
use of scheduler per-instance locks.

Update #2555.
2016-05-12 13:24:41 +02:00
Sebastian Huber 36cd27c1e3 score: Simplify _Objects_Get_next()
Remove unused location parameter.
2016-04-21 07:29:40 +02:00
Sebastian Huber f2ffd646fa shell: Fix warning visible with latest Newlib
Works also with previous Newlib versions.
2016-04-12 07:36:19 +02:00
Sebastian Huber c39da818c7 rtems: Delete Region_Control::page_size 2016-04-12 07:36:19 +02:00
Sebastian Huber 60a2387552 rtems: Delete Region_Control::length 2016-04-12 07:36:19 +02:00
Sebastian Huber acf7cf3bdb rtems: Delete Region_Control::starting_address 2016-04-12 07:36:19 +02:00
Sebastian Huber b4b062f4df rtems: Delete Region_Control::number_of_used_blocks
Use Heap_Statistics::used_blocks instead.
2016-04-12 07:36:19 +02:00
Sebastian Huber 97312fcc6d score: Delete Thread_Wait_information::id
This field was only by the monitor in non-multiprocessing
configurations.  Add new field Thread_Wait_information::remote_id in
multiprocessing configurations and use it for the remote procedure call
thread queue.

Add _Thread_Wait_get_id() to obtain the object identifier for debug and
system information tools.  Ensure the object layout via static asserts.
Add test cases to sptests/spthreadq01.
2016-04-06 09:08:20 +02:00
Sebastian Huber 97bbf028e6 score: Use constant for maximum count of CORE sema 2016-03-29 07:26:43 +02:00
Joel Sherrill 85f690189b shell/hexdump-odsyntax.c: Add define of _GNU_SOURCE to avoid warnings 2016-03-24 11:41:22 -05:00
Joel Sherrill 037f7a6096 shell/hexdump-conv.c: Disable sccsid to avoid unused warning 2016-03-24 11:41:22 -05:00
Joel Sherrill 020c4c07d4 libmisc/shell/main_hexdump.c: Disable unused copyright string 2016-03-24 11:41:21 -05:00
Joel Sherrill c4e317f360 libmisc/monitor/mon-prmisc.c: Remove unused rtems_monitor_events_assoc 2016-03-24 11:41:21 -05:00
Joel Sherrill 7f9e067f54 cpuuse/cpuusagetop.c: Fix unused variable warning 2016-03-24 11:41:20 -05:00
Sebastian Huber d37adfe5dd score: Fix CPU time used by executing threads
The CPU time used of a thread was previously maintained per-processor
mostly during _Thread_Dispatch().  However, on SMP configurations the
actual processor of a thread is difficult to figure out since thread
dispatching is a highly asynchronous process (e.g. via inter-processor
interrupts).  Only the intended processor of a thread is known to the
scheduler easily.  Do the CPU usage accounting during thread heir
updates in the context of the scheduler operations.  Provide the
function _Thread_Get_CPU_time_used() to get the CPU usage of a thread
using proper locks to get a consistent value.

Close #2627.
2016-03-17 08:27:47 +01:00
Sebastian Huber df91dd9f34 monitor: Use object allocator lock
Use object allocator lock instead of disabled thread dispatching.

Update #2555.
2016-03-14 12:31:12 +01:00
Sebastian Huber 18ff889624 score: Use ISR lock for IO driver registration
Create implementation header file.

Update #2555.
2016-03-14 10:56:22 +01:00
Sebastian Huber d297c81dd9 score: Delete Thread_CPU_usage_t
This type is superfluous since all operations with it are done via the
_Timestamp_*() functions.
2016-03-01 07:40:33 +01:00
Sebastian Huber ccd54344d9 score: Introduce Thread_Entry_information
This avoids potential dead code in _Thread_Handler().  It gets rid of
the dangerous function pointer casts.

Update #2514.
2016-01-11 08:47:01 +01:00
Aun-Ali Zaidi d5154d0f6a api: Remove deprecated Notepads
Notepads where a feature of RTEMS' tasks that simply functioned in
the same way as POSIX keys or threaded local storage (TLS). They were
introduced well before per task variables, which are also deprecated,
and were barely used in favor of their POSIX alternatives.

In addition to their scarce usage, Notepads took up unnecessary memory.
For each task:

 - 16 32-bit integers were allocated.
 - A total of 64 bytes per task per thread.

This is especially critical in low memory and safety-critical applications.

They are also defined as uint32_t, and therefore are not guaranteed to
hold a pointer.

Lastly, they are not portable solutions for SMP and uniprocessor systems,
like POSIX keys and TLS.

updates #2493.
2015-12-24 16:52:34 -06:00
Nick Withers 7a0c4854c6 libmisc: Include missing header file, fix warnings 2015-12-15 07:47:27 +01:00
Pavel Pisa 9394aa5ed7 untar: do not exit with error when created directory already exists.
The problem exists for both RTEMS untar implementations and their
variants: Untar_FromMemory(), Untar_FromFile() and rtems_tarfs_load().

If filesystem object already exists at extracted directory path
then if it is directory, creation is ignored. Attempt
to delete/unlink object and make directory is tried for other cases.

This simple approach problem reported in ticket fixes #2413.
Behavior follows GNU tar and BSD tar practice for directories
but much more work is required to achieve full semantics
of the full featured tar implementation still.
2015-11-23 10:40:15 -05:00
Sebastian Huber f97536dcd3 basdefs.h: Add and use RTEMS_UNUSED 2015-10-26 09:13:19 +01:00