Commit Graph

805 Commits

Author SHA1 Message Date
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
Sebastian Huber
143696acbd basedefs.h: Add and use RTEMS_NO_RETURN 2015-10-26 09:13:19 +01:00
Martin Galvan
41b5c915e3 cpukit/libmisc/dumpbuf/dumpbuf.c: Fix compilation warnings
Compiling dumpbuf.c causes the following warning to be issued:

warning: pointer targets in passing argument 1 of 'snprintf' differ in signedness [-Wpointer-sign]

This happens because line_buffer is declared as unsigned.

Closes #2411.
2015-09-03 16:09:02 -05:00
Martin Galvan
cc93c83e00 cpukit/libmisc/dumpbuf/dumpbuf.c: Fix undefined behavior for sprintf()
I also used the 'n' versions of the string functions, #define'd magic numbers
and added a few comments.

Updates #2405.
2015-09-03 12:33:28 -05:00
Sebastian Huber
9e9e61d27d score: Add self-contained condition implementation 2015-07-30 09:11:18 +02:00
Sebastian Huber
40188718f2 score: Add self-contained futex implementation 2015-07-30 09:11:18 +02:00
Sebastian Huber
7237b3e076 score: Add self-contained semaphore implementation 2015-07-30 09:11:18 +02:00
Sebastian Huber
214d8edd18 score: Add self-contained mutex implementation
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).
2015-07-30 09:11:18 +02:00
Sebastian Huber
9780fa937c monitor: Sort alphabetically 2015-07-24 09:09:18 +02:00
Sebastian Huber
d70f530842 monitor: Add current CPU of thread 2015-07-24 09:09:18 +02:00
Sebastian Huber
0910e9d438 monitor: Print the wait queue to ease debugging 2015-07-24 09:09:18 +02:00
Sebastian Huber
1f199799b2 monitor: Print addresses like identifiers
This avoids the "0x0xabc" output and is more compact.
2015-07-24 09:09:18 +02:00
Sebastian Huber
975e19187d monitor: Remove notepad support 2015-07-24 09:09:18 +02:00
Sebastian Huber
d7665823b2 score: Introduce Thread_queue_Heads
Move the storage for the thread queue heads to the threads.  Each thread
provides a set of thread queue heads allocated from a dedicated memory
pool.  In case a thread blocks on a queue, then it lends its heads to
the queue.  In case the thread unblocks, then it takes a free set of
threads from the queue.  Since a thread can block on at most one queue
this works.  This mechanism is used in FreeBSD.  The motivation for this
change is to reduce the memory demands of the synchronization objects.
On a 32-bit uni-processor configuration the Thread_queue_Control size is
now 8 bytes, compared to 64 bytes in RTEMS 4.10 (other changes reduced
the size as well).
2015-07-23 08:01:13 +02:00
Sebastian Huber
8406d94283 libmisc: Use SMP application by default on SMP 2015-07-08 10:10:28 +02:00
Sebastian Huber
5f31bbe105 libmisc: Simplify <rtems/stackchk.h>
Drop the <rtems/score/percpu.h> include since this file exposes a lot of
implementation details.
2015-06-26 09:16:29 +02:00
Sebastian Huber
48fed9a56e score: Simplify <rtems/system.h>
Drop the <rtems/score/percpu.h> include since this file exposes a lot of
implementation details.
2015-06-26 09:16:25 +02:00
Joel Sherrill
e6b31b27fb Remove use ticks for statistics configure option.
This was obsolete and broken based upon recent time keeping changes.

Thie build option was previously enabled by adding
USE_TICKS_FOR_STATISTICS=1 to the configure command line.

This propagated into the code as preprocessor conditionals
using the __RTEMS_USE_TICKS_FOR_STATISTICS__ conditional.
2015-06-15 13:20:17 -05:00
Chris Johns
a8e4352e6a libmisc/cpuuse: Top support for current load.
The cpuuse top command now supports the current load where the list of
tasks is ordered based on the current load rather than the total cpu usage.
This lets you see what is using the processor at any specific instance.

The ability to sort on a range of thread values is now supported.

Added memory usage stats for unified and separate workspace and C heaps as
well as displaying the allocated stack space.

Added a few more command keys to refresh the display, show all tasks in the
system, control the lines display and a scrolling mode that does not clear
the display on each refresh.

Removed support for tick kernel builds. The tick support in the kernel is to
be removed.
2015-04-29 15:24:00 +10:00
Sebastian Huber
f32935335a score: Fix POSIX thread join
A thread join is twofold.  There is one thread that exists and an
arbitrary number of threads that wait for the thread exit (one-to-many
relation).  The exiting thread may want to wait for a thread that wants
to join its exit (STATES_WAITING_FOR_JOIN_AT_EXIT in
_POSIX_Thread_Exit()).  On the other side we need a thread queue for all
the threads that wait for the exit of one particular thread
(STATES_WAITING_FOR_JOIN in pthread_join()).

Update #2035.
2015-04-23 21:42:13 +02:00
Sebastian Huber
c7a65085d2 Fix build for non-SPARC targets 2015-04-17 09:19:03 +02:00
Daniel Hellstrom
4d3e70f4a6 DRVMGR: KEY_TYPE now a enum drvmgr_kt 2015-04-17 01:10:30 +02:00
Daniel Hellstrom
219d4045e7 DRVMGR: added drvmgr shell command 2015-04-17 01:10:16 +02:00
Daniel Hellstrom
02550220c5 LIBPCI: added PCI shell command 2015-04-17 01:10:15 +02:00
Joel Sherrill
fd50acd54f shell/main_rtrace.c: Fix warning 2015-04-03 15:08:20 -05:00
Sebastian Huber
504e042d86 capture: Define __rtld_tbg_lock 2015-04-02 08:28:12 +02:00
Chris Johns
a300920de1 libmisc/shell: Add the rtrace command for buffered tracing support.
The rtrace command interfaces to the RTEMS Trace Linker's trace
buffering data allowing users to capture and report trace data.
2015-03-31 17:04:43 +11:00
Sebastian Huber
10a699d3fc testsupport: Generate unique worker names 2015-03-25 11:46:20 +01:00
Sebastian Huber
a54866e910 monitor: Fix notepad dump 2015-03-24 14:35:05 +01:00
Joel Sherrill
e02b20a3d3 cpukit/libmisc/utf8proc/utf8proc.c: Avoid overflow 2015-03-24 08:17:13 -05:00
Joel Sherrill
0a9345ed68 shell/utils-cp.c: Avoid redefinition of TIMESPEC_TO_TIMEVAL 2015-03-24 08:16:28 -05:00
Joel Sherrill
54bfbe05bc dummy/default-configuration.c: Tune configuration down for small targets 2015-03-24 08:16:27 -05:00
Joel Sherrill
735efe7e6d capture/capture_support.c: Fix printf() warning and formatting 2015-03-24 08:16:27 -05:00
Joel Sherrill
5cd910bf3a cpukit/libmisc/shell/hexdump-conv.c: Eliminate printf() format warning 2015-03-22 10:29:57 -05:00
Joel Sherrill
5ce776ec62 cpukit/libmisc/shell/main_df.c: Eliminate printf() format warning 2015-03-22 10:29:57 -05:00
Sebastian Huber
d4edbdbcbf Replace www.rtems.com with www.rtems.org 2015-03-20 15:42:34 +01:00
Chris Johns
da30417b24 libmisc/capture: Clean up formatting on ARM.
The printing of 64bit diff's for the timestamp did not work on ARM
so I have changed this to 32bit. A 32bit nano-second diff between
events should be more than enough time.

Print '____' for POSIX thread output.
2015-03-19 18:25:51 +11:00
Sebastian Huber
55243d090e testsupport: Do not suspend worker tasks 2015-03-18 13:51:22 +01:00
Chris Johns
b9d16f713f libmisc/redirector: Fix unlock on exit from the handler. 2015-03-18 16:09:52 +11:00
Joel Sherrill
0a6d12afb4 libmisc/monitor/mon-task.c: Disable deprecated warning for use of notepads 2015-03-17 10:05:06 -05:00
Sebastian Huber
8c7eb0039c testsupport: Add worker setup handler
Add rtems_test_parallel_get_task_id().
2015-03-17 10:32:57 +01:00
Gedare Bloom
a62220fefa shell: remove rtems ifdef, upstream is correct 2015-03-16 13:23:15 -04:00
Gedare Bloom
ce4e691a01 shell: fix printf warnings 2015-03-16 13:01:37 -04:00
Gedare Bloom
ed152a0c4b capture: fix warnings in print 2015-03-16 12:49:47 -04:00
Joel Sherrill
bdf23b6cd4 cpukit: Remove old DESCRIPTION: in comments
These were remnants of pre-Doxygen comment style.
2015-03-11 16:18:29 -05:00
Gedare Bloom
3ac681191e cpukit: deprecate notepads
Deprecate Classic API Notepads. Mark task_set/get_note() with
the deprecated attribute, and also mark the notepads field.

Replace disable with enable option for notepads in confdefs.h,
and make notepads disabled by default. The previous option
CONFIGURE_DISABLE_CLASSIC_API_NOTEPADS is now unused and
will emit a compile-time warning. A new option
CONFIGURE_ENABLE_CLASSIC_API_NOTEPADS is available to turn
on notepads, but it also will emit a compile-time warning
to indicate that notepads are deprecated.

Closes #2265
2015-03-10 12:53:07 -04:00
Joel Sherrill
34e0a56982 cpukit/libmisc/fsmount/fsmount.h: Remove duplicate comments and copyright 2015-03-09 16:56:18 -05:00
Joel Sherrill
cc69334f42 Fix a number of minor Doxygen formatting issues 2015-03-06 10:37:55 -06:00
Alexander Krutwig
33b72fde61 testsupport: Add cascade option to parallel test 2015-03-06 16:20:20 +01:00