Commit Graph

26083 Commits

Author SHA1 Message Date
Ralf Kirchner
27545fcac8 network: Add help text for ifconfig 2014-03-13 16:10:52 +01:00
Sebastian Huber
4d3e933466 sapi: Typos 2014-03-13 16:03:55 +01:00
Sebastian Huber
dedc1393f3 bsps/powerpc: Fix GET_INTERRUPT_MASK macro
Use _PPC_INTERRUPT_DISABLE_MASK introduced with
801b5d8032.
2014-03-12 16:40:49 +01:00
Sebastian Huber
0dd025ccb9 psxtests/psxkey07: Do not allocate task IDs 2014-03-12 07:54:57 +01:00
Sebastian Huber
92d261c288 psxtests/psxkey07: Limit workspace size
This avoids large test execution times on targets with a big RAM.
2014-03-12 07:54:57 +01:00
Sebastian Huber
fca27b7272 psxtests/psxkey07: Account for RTEMS_TOO_MANY 2014-03-12 07:54:57 +01:00
Sebastian Huber
0a64eba9b9 psxtests/psxkey08: Limit workspace size
This avoids large test execution times on targets with a big RAM.
2014-03-12 07:54:57 +01:00
Sebastian Huber
610815417d psxtests/psxkey08: Do not allocate task IDs
We have a unified work area.  So depending on the memory layout the

    task_id_p = malloc( sizeof( rtems_id ) );
    rtems_test_assert( task_id_p );

or the

    sc = rtems_task_create(
      rtems_build_name('T','A',created_task_count, ' '),
      1,
      RTEMS_MINIMUM_STACK_SIZE,
      RTEMS_DEFAULT_MODES,
      RTEMS_DEFAULT_ATTRIBUTES,
      task_id_p
    );
    rtems_test_assert(
      (sc == RTEMS_UNSATISFIED) ||
      (sc == RTEMS_TOO_MANY) ||
      (sc == RTEMS_SUCCESSFUL)
    );

may fail.  If we are unlucky then we hit the first case and the test
fails.
2014-03-12 07:54:56 +01:00
Joel Sherrill
2aeeaa00f9 doc: Improve description of rtems_status_text for ToC 2014-03-11 19:04:06 -05:00
Joel Sherrill
89e72a80c9 smp.t: Add Background and Operation Sections 2014-03-11 19:03:53 -05:00
Joel Sherrill
d46ab11bcd Classic API Users Guide: Add SMP and affinity services.
This patch adds the initial version of the SMP chapter to the Users Guide.
2014-03-11 16:27:57 -05:00
Joel Sherrill
4013d25bc2 POSIX Users Guide: Add thread affinity services. 2014-03-11 16:27:57 -05:00
Joel Sherrill
30d1176618 stackchk.t task.t: Change can not to cannot for consistency 2014-03-11 16:27:57 -05:00
Joel Sherrill
48198f1b35 cpright.texi: Update to 2014. 2014-03-11 16:27:56 -05:00
Joel Sherrill
653ed5e151 gen_section: Update for use with new SMP chapters. 2014-03-11 13:21:47 -05:00
Sebastian Huber
b4b86b825a posix: Fix NULL pointer access in pthread_create() 2014-03-11 14:21:42 +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
Sebastian Huber
96c4112d45 posix: Regenerate 2014-03-11 08:06:06 +01:00
Sebastian Huber
0c25ba681f posix: Fix NULL pointer access in pthread_create() 2014-03-10 13:29:23 +01:00
Sebastian Huber
909f61b14a smptests/smppsxaffinity02: Fix end of test message 2014-03-10 13:28:53 +01:00
Sebastian Huber
e7d3967eb1 arm: Fix stack alignment in interrupt handler
According to AAPCS, section 5.2.1.2, "Stack constraints at a public
interface" the stack must be 8 byte aligned.  This was not the case
during interrupt processing.
2014-03-10 08:03:46 +01:00
Sebastian Huber
6b115b3008 bsp/leon3: Use interrupt timestamping counter
Use the interrupt controller timestamping counter for the CPU counter if
available since it runs with a high frequency.
2014-03-10 08:03:46 +01:00
Sebastian Huber
ba15b92370 bsps/sparc: Add missing IRQMP registers 2014-03-10 08:03:46 +01:00
Sebastian Huber
f4accfd466 bsps/sparc: Remove fix for ERC32 with FPU rev. B/C 2014-03-10 08:03:45 +01:00
Joel Sherrill
e6c87f7872 POSIX keys now enabled in all configurations.
Formerly POSIX keys were only enabled when POSIX threads
were enabled. Because they are a truly safe alternative
to per-task variables in an SMP system, they are being
enabled in all configurations.
2014-03-07 13:21:11 -06:00
Jennifer Averett
5c3323492e Remove trailing whitespace in previous patches 2014-03-07 09:15:15 -06:00
Jennifer Averett
2ef0328958 smptests: Add smppsxaffinity02.
This method exercises the ability to dynamically get and set
the affinity of POSIX threads.

NOTE: There is no scheduler support for affinity. This is
simply a data integrity test.
2014-03-07 09:14:33 -06:00
Jennifer Averett
f3e6b18a4a smptests: Add smppsxaffinity01.
This test exercises the ability to obtain and modify
the affinity field of the POSIX thread attributes.
2014-03-07 09:13:35 -06:00
Jennifer Averett
a3e055fe8a smptests: Add smpaffinity01
This test exercises the new Classic API task affinity methods.
2014-03-07 09:13:14 -06:00
Jennifer Averett
c315dbf2f7 psxtests: Added test for pthread_getattr_np(). 2014-03-07 09:13:08 -06:00
Jennifer Averett
6e5f2493a9 posix: Add pthread_getattr_np().
This is a useful POSIX thread API helper which is found in
`GNU/Linux and *BSD.
2014-03-07 09:12:41 -06:00
Jennifer Averett
dd0017c135 posix: Add dynamic pthread get and set affinity.
This patch adds the following methods:

  + pthread_get_affinity_np
  + pthread_set_affinity_np
2014-03-07 09:12:11 -06:00
Jennifer Averett
6e6adafaaa posix: Add pthread_attr_t methods to get/set affinity.
This patch adds the following methods:

  + pthread_attr_get_affinity_np
  + pthread_attr_set_affinity_np
2014-03-07 09:11:32 -06:00
Jennifer Averett
baa426a074 posix: Add support method to compare two pthread attribute structures. 2014-03-07 09:11:28 -06:00
Jennifer Averett
185e46f6a0 posix: Add POSIX thread affinity attribute support.
With the addition of pthread affinity information in pthread_attr_t,
the existing code for pthread_attr_t had to be adjusted.
2014-03-07 09:10:33 -06:00
Jennifer Averett
29cacfdbf3 rtems: Add Classic API get and set affinity methods.
Add the following methods:

  + rtems_task_get_affinity
  + rtems_task_set_affinity
2014-03-07 09:10:01 -06:00
Jennifer Averett
039a189de1 sapi: Moved smp initialization and added cpuset initilization.
SMP must be initialized in order to know the current set of
cores available. Without this, you cannot initialize the
default cpu_set_t associated with Classic API tasks and
POSIX threads.
2014-03-07 09:09:01 -06:00
Jennifer Averett
9db8705cc8 score: Add cpuset support to Score.
This new Score Handler provides a structure to manage a
cpu_set_t plus helper routines to validate the contents
against the current system configuration.
2014-03-07 09:07:59 -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
e5bcb24bd0 smptests: Delete config.h.in 2014-03-06 11:16:57 +01:00
Sebastian Huber
3ca84d0cba score: Fix per-CPU state documentation 2014-03-06 11:12:57 +01:00
Sebastian Huber
825cb1f196 score: Delete _Thread_Dispatch_set_disable_level()
This function was only used in some tests and can be replaced with other
functions.
2014-03-06 09:43:59 +01:00
Sebastian Huber
b323e1fb41 tmtests/tm26: Fix deadlock for SMP configurations
Some _Context_Switch() invocations end up in _Thread_Handler().  Create
the right context for this function.
2014-03-06 09:43:59 +01:00
Sebastian Huber
718124e4e5 rtems: Add RTEMS_INTERRUPT_REPLACE
A new option RTEMS_INTERRUPT_REPLACE is introduced that permits updating
the first interrupt handler for the registered interrupt vector and
matching argument.  If no match is found, the install function fails
with RTEMS_UNSATISFIED.

The Interrupt Manager Extension offers interrupt handlers with an
argument pointer.  It is impossible to update two words (handler and
argument) atomically on most architectures.  In order to avoid an SMP
lock in bsp_interrupt_handler_dispatch() which would degrade the
interrupt response time an alternative must be provided that makes it
possible to tear-down interrupt sources without an SMP lock.

Add RTEMS_INTERRUPT_REPLACE option to Interrupt Manager Extension.  This
enables a clean tear-down of interrupt sources on SMP configurations.
Instead of an interrupt handler removal a replacement handler can be
installed to silence an interrupt source.  This can be used in contexts
that allow no sophisticated synchronization (e.g. in atexit() or fatal
handlers).
2014-03-06 09:43:59 +01:00
Sebastian Huber
e0609ac745 bsps: SMP support for generic interrupt support 2014-03-06 09:43:58 +01:00
Sebastian Huber
8b50a55001 score: Add _Atomic_Fence() 2014-03-06 09:43:58 +01:00
Sebastian Huber
a418b2f8b0 libnetworking: Typo 2014-03-06 09:43:58 +01:00