Commit Graph

885 Commits

Author SHA1 Message Date
Chris Johns
c49985691f Change all references of rtems.com to rtems.org. 2014-03-21 08:10:47 +11:00
Sebastian Huber
53ad908a64 score: Add SMP lock profiling support 2014-03-14 08:46:49 +01:00
Sebastian Huber
29c9eb601e sapi: Add per-CPU profiling application level data 2014-03-14 08:46:49 +01:00
Sebastian Huber
4dad4b8411 sapi: Add profiling application level support 2014-03-14 08:46:49 +01:00
Sebastian Huber
28779c70ff score: Add function to destroy SMP locks 2014-03-11 10:58:09 +01:00
Sebastian Huber
d50acdbb6c score: Add local context to SMP lock API
Add a local context structure to the SMP lock API for acquire and
release pairs.  This context can be used to store the ISR level and
profiling information.  It may be later used to enable more
sophisticated lock algorithms, e.g. MCS locks.

There is only one lock that cannot be used with a local context.  This
is the per-CPU lock since here we would have to transfer the local
context through a context switch which is very complicated.
2014-03-11 10:58:09 +01:00
Sebastian Huber
ae88aa7927 sapi: Use one SMP lock for all chains
This partially reverts commit 1215fd4d94.

In order to support profiling of SMP locks and provide a future
compatible SMP locks API it is necessary to add an SMP lock destroy
function.  Since the commit above adds an SMP lock to each chain control
we would have to add a rtems_chain_destroy() function as well.  This
complicates the chain usage dramatically.  Thus revert the patch above.
A global SMP lock for all chains is used to implement the protected
chain operations.

Advantages:

* The SAPI chain API is now identical on SMP and non-SMP
  configurations.

* The size of the chain control is reduced and is then equal to the
  Score chains.

* The protected chain operations work correctly on SMP.

Disadvantage:

* Applications using many different chains and the protected operations
  may notice lock contention.

The chain control size drop is a huge benefit (SAPI chain controls are
66% larger than the Score chain controls).  The only disadvantage is not
really a problem since these applications can use specific interrupt
locks and unprotected chain operations to avoid this issue.
2014-03-11 10:58:09 +01:00
Sebastian Huber
b1196e3268 printk: Add support for long long 2014-03-11 10:58:05 +01:00
Jennifer Averett
5c3323492e Remove trailing whitespace in previous patches 2014-03-07 09:15:15 -06:00
Jennifer Averett
13ab94be6c spcpuset01: Add check for sys/cpuset.h.
If <sys/cpuset.h> is not provided by the toolset, the test
cannot be compiled.
2014-03-07 09:07:17 -06:00
Sebastian Huber
e1d7bf002e rtems: Add cache size functions
Add rtems_cache_get_data_cache_size() and
rtems_cache_get_instruction_cache_size().
2014-02-28 09:06:16 +01:00
Sebastian Huber
e7549ff4a1 rtems: Use size_t for cache line size
A cache line cannot have a negative size.
2014-02-28 08:59:02 +01:00
Sebastian Huber
31494ab264 sptests/spcache01: Detect write-through cache 2014-02-28 08:59:02 +01:00
Sebastian Huber
3378be955a sptests/spcache01: New test 2014-02-24 16:12:03 +01:00
Sebastian Huber
95d0c98cac score: Fix thread TLS area initialization
Do not use _TLS_Size here since this will lead GCC to assume that this
symbol is not 0 and the later > 0 test will be optimized away.
2014-02-24 12:50:32 +01:00
Sebastian Huber
07dc9709a4 sptests/spcpucounter01: Adjust test
Adjust test to work with clock driver based CPU counters.  They have a
period equal to the clock tick interval.
2014-02-24 12:49:45 +01:00
Sebastian Huber
83bf105486 score: Rename _Internal_error_Occurred()
Rename _Internal_error_Occurred() into _Terminate().
2014-02-21 09:38:24 +01:00
Sebastian Huber
9eec2f33e9 score: Add RTEMS_FATAL_SOURCE_SMP
Use rtems_fatal() instead of _CPU_Fatal_halt() to shutdown processors in
SMP configurations since this allows intervention of BSP or application
specific fatal extensions.
2014-02-19 09:59:40 +01:00
Sebastian Huber
33cb8bf64d score: Add RTEMS_FATAL_SOURCE_BSP
Merge RTEMS_FATAL_SOURCE_BSP_GENERIC and RTEMS_FATAL_SOURCE_BSP_SPECIFIC
into new fatal source RTEMS_FATAL_SOURCE_BSP.  This makes it easier to
figure out the code position given a fatal source and code.
2014-02-19 09:59:39 +01:00
Sebastian Huber
b39e055a49 score: Delete INTERNAL_ERROR_SHUTDOWN_WHEN_NOT_UP
This error case is no longer required since rtems_shutdown_executive()
can be called anytime, anywhere
2014-02-19 09:59:39 +01:00
Sebastian Huber
514705d2f1 score: Delete _Thread_BSP_context
Do not return to BSP context in the exit() shutdown path.  This makes it
possible to re-use the initialization stack.  It can be used for the
interrupt stack for example.  On targets with a small RAM this is a
considerable benefit.

This change eliminates also some special cases and simplifies the code.

Delete _Thread_Set_global_exit_status(),
_Thread_Get_global_exit_status() and _Thread_Stop_multitasking().
2014-02-19 09:59:39 +01:00
Sebastian Huber
92f50c3b29 score: Add SYSTEM_STATE_TERMINATED
Merge systems states SYSTEM_STATE_SHUTDOWN and SYSTEM_STATE_FAILED into
new system state SYSTEM_STATE_TERMINATED.  This reflects that all system
termination paths end up in _Internal_error_Occurred().
2014-02-19 09:59:38 +01:00
Sebastian Huber
24bf11eca1 score: Add CPU counter support
Add a CPU counter interface to allow access to a free-running counter.
It is useful to measure short time intervals.  This can be used for
example to enable profiling of critical low-level functions.

Add two busy wait functions rtems_counter_delay_ticks() and
rtems_counter_delay_nanoseconds() implemented via the CPU counter.
2014-02-14 10:28:29 +01:00
Sebastian Huber
bab16de267 score: Change debug helper functions
Rename rtems_internal_error_description() to
rtems_internal_error_text().  Rename rtems_fatal_source_description() to
rtems_fatal_source_text().  Rename rtems_status_code_description() to
rtems_status_text().  Remove previous implementation of
rtems_status_text().
2014-02-12 09:18:00 +01:00
Sebastian Huber
920a43e639 rtems: Add rtems_status_code_description() 2014-02-06 08:47:02 +01:00
Sebastian Huber
67f2a28e69 sptests/spsem0[12]: Use rtems_test_exit() 2014-02-05 12:55:19 +01:00
Sebastian Huber
022851aba5 Add thread-local storage (TLS) support
Tested and implemented on ARM, m68k, PowerPC and SPARC.  Other
architectures need more work.
2014-02-04 10:06:35 +01:00
Sebastian Huber
a850d040ab score: Add _Workspace_Allocate_aligned() 2014-02-04 10:06:34 +01:00
HailinGuo
05b3db65f9 spsize/size.c: Fix typo.
From pull request at fc07a4c501
2014-01-09 09:50:18 -06:00
Toma Radu
540b771a07 sp16, sp17, and sp20: Documentation Fixes
Fix the documentation for the sp16, sp17 and sp20 tests.
2014-01-08 15:24:09 -06:00
Joel Sherrill
f3f3049824 spfifo02: Clean up output 2014-01-07 18:01:55 -06:00
Joel Sherrill
4470ae9bb9 sp09: Remove partition specific parts 2014-01-04 11:08:10 -06:00
Joel Sherrill
f17a9269d3 spregion_err01: Clean up comments 2014-01-04 11:06:20 -06:00
Joel Sherrill
7132d3d498 sppartition_err01: Remove dead parts, reduce, and clean up.
Also fix naming issues.
2014-01-04 11:04:51 -06:00
Mandar Juvekar
12f81c09ec pskey09, sp17: documentation cleanup. 2014-01-03 08:25:14 -06:00
Mandar Juvekar
255178ec35 sptests: Refactor sp09 into sppartition_err01 and sp09. 2014-01-02 13:22:36 -06:00
Joel Sherrill
1953027120 sp09: Remove region test references 2013-12-30 09:53:31 -06:00
Joel Sherrill
8211b9f3b0 spregion_err01: Remove unneeded fluff copied from sp09
The goal is to shrink the individual tests to have no unneeded
resources and to follow the structure of a normal test.
2013-12-30 09:53:31 -06:00
Mandar Juvekar
dfcb3ace79 spregion_err01: New test refactored from sp09 2013-12-30 09:18:51 -06:00
Toma Radu
7183e01dfc Test suite documentations corrections and fixes.
Correct the sp02.doc, sp05.doc, sp06.doc, sp07.doc, sp08.doc files.
2013-12-28 17:37:31 -06:00
Mandar Juvekar
d2d4a8f99d utf8proc1/spedgsched01: minor fixes in test document files 2013-12-25 16:10:26 -06:00
Chirayu Desai
7b5f6643b2 sptests: refactor sp09/screen13 into a new test spclock_err02 2013-12-24 09:53:59 -05:00
Chris Johns
2d1bdc8f79 cpukit/rtems: Add rtems_clock_get_uptime_nanoseconds to the RTEMS API.
Add Timestamp support in the score to return a timestamp in nanoseconds.
Add a test.
Update the RTEMS API documentation.
2013-12-24 16:46:19 +11:00
Jennifer Averett
fe011a59a4 sptests/spcpuset*: Add tests for fixed size cpu_set_t operations.
This adds five tests for <sys/cpuset.h>. It does not include
tests for CPU_XXX_S methods. The autotools should be able to
avoid enabling the tests unless the toolset has <sys/cpuset.h>.
2013-12-19 14:11:09 -06:00
Daniel Ramirez
07f4edc14b sptests: refactored sp09/screen14.c into two new tests 2013-12-11 20:11:08 -05:00
Sebastian Huber
ce8363d363 sptests/spfifo01: Add test case for mknod() 2013-12-11 10:23:44 +01:00
Sebastian Huber
98e5c954bd PR2160: imfs: Use ENOSYS for unsupported nodes
Return an error status with errno set to ENOSYS during node creation for
nodes not available in the current configuration.
2013-12-11 09:39:09 +01:00
Gedare Bloom
03130cd068 sppagesize: fix copyright 2013-12-06 11:25:02 -05:00
Chirayu Desai
54da1243eb sptests: add a test for page size
Bug: https://www.rtems.org/bugzilla/show_bug.cgi?id=1216
2013-12-06 10:45:28 -05:00
Chirayu Desai
262e250756 sptest: sp2038: Add a test for leap year
Bug test case for PR 1422
2013-12-05 11:46:04 -05:00