Commit Graph
3815 Commits
Author SHA1 Message Date
Sebastian Huber ca1e546e77 score: Improve scheduler helping protocol
Only register ask for help requests in the scheduler unblock and yield
operations.  The actual ask for help operation is carried out during
_Thread_Do_dispatch() on a processor related to the thread.  This yields
a better separation of scheduler instances.  A thread of one scheduler
instance should not be forced to carry out too much work for threads on
other scheduler instances.

Update #2556.
2017-02-03 10:17:38 +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
Kuan-Hsun Chen 166a9f67cd sprmsched01/spedfsched04: Revise
Instead of using the target time and console driver, both tests now use
assertions and rtems_rate_monotonic_get_status() to verify the count of
postponed jobs.  The setting of spedfsched04 is slightly changed.

Close #2795.
2017-01-31 07:20:06 +01:00
Kuan-Hsun Chen 0794197f72 rtems: Fix _Rate_monotonic_Renew_deadline()
Prepare a precondition to prevent the potential integer overflow.

Remove one redundant parameter in _Rate_monotonic_Renew_deadline().

sptests/sprmsched02: Create
A test case for checking the overflow condition of postponed_jobs
in rtems_rate_monotonic_period_status.

Update #2885.
2017-01-30 07:53:13 +01:00
Sebastian Huber 6f6da82ca0 score: Fix user extensions order
Use forward and reverse order for initial and dynamic extensions.  This
is the behaviour documented in the C Users Guide.  Change thread
terminate order to backward to be in line with the thread delete order.
Change fatal error order to forward to ensure that initial extensions
are called first due the peculiar execution context of fatal error
extensions, see _Terminate() documentation.

Update #2692.
2017-01-26 11:20:45 +01:00
Kuan-Hsun Chen d7feb8677d Remove rtems_rate_monotonic_postponed_job_count()
Add a variable named "count" in rtems_rate_monotonic_period_status
structure.  Revise rtems_rate_monotonic_get_status() for the postponed
job count.

sptests/sp69: Add in the verification of the postponed job count for
rtems_rate_monotonic_get_status().

Update #2795.
2017-01-26 10:00:33 +01:00
Sebastian Huber 7cb7454f93 psxtests: Relax shared memory tests
There is currently no proper mmap() implementation.

Update #2859.
2017-01-25 11:46:51 +01:00
Sebastian Huber 23a11b68cd sptests/spedfsched04: Merge and fix
Merge into one file and fix obvious problems (e.g. out of bounds array
access).

Update #2795.
2017-01-25 11:16:02 +01:00
Sebastian Huber 29e08d41f4 sptests/sprmsched01: Merge and fix
Merge into one file and fix obvious problems (e.g. out of bounds array
access).

Update #2795.
2017-01-24 15:37:04 +01:00
Sebastian Huber 6af2221aac fsscandir01: Check MAXNAMLEN and NAME_MAX
Update #1394.
2017-01-24 10:08:33 +01:00
Sebastian Huber 436a4b384b smptests/smpsignal01: Check signal ISR level
Close #2751.
2017-01-24 09:44:02 +01:00
Gedare Bloom cb2cbecefd classic: adjust names of RM postponed job functions
closes #2795
2017-01-13 13:58:11 -05:00
Kuan-Hsun Chen ad40220f80 sptests: EDF scheduler overrun handling
Update #2795.
2017-01-13 13:58:01 -05:00
Kuan-Hsun Chen 86aa124806 sptests: rate monotonic scheduler overrun handling
Update #2795.
2017-01-13 13:57:34 -05:00
Gedare Bloom ba77628250 posix: shared memory support
Add POSIX shared memory manager (Shm). Includes a hook-based
approach for the backing memory storage that defaults to the
Workspace, and a test is provided using the heap. A test is
also provided for the basic use of mmap'ing a shared memory
object. This test currently fails at the mmap stage due to
no support for mmap.
2017-01-13 11:17:30 -05:00
Gedare Bloom e7eeb38d23 posix: move sys/mman.h to newlib and test it in psxhdrs 2017-01-13 11:05:56 -05:00
Sebastian Huber 9fad437fbe configure: Remove HAVE_STRUCT__THREAD_QUEUE_QUEUE 2017-01-13 11:33:28 +01:00
Sebastian Huber dc7031904d configure: Remove HAVE_THREADS_H support 2017-01-13 09:39:32 +01:00
Sebastian Huber 7c49927911 posix: Add pthread_getname_np(), ...
Add pthread_getname_np() and pthread_setname_np().

Update #2858.
2017-01-13 08:10:28 +01:00
Sebastian Huber 0c431303cc Add rtems_assoc_32_to_string() 2017-01-12 07:44:36 +01:00
Joel Sherrill 7a4b264574 Remove obsolete __RTEMS_HAVE_SYS_CPUSET_H__ 2017-01-11 09:45:32 -06:00
Joel Sherrill ef362818df Add support for posix_devctl() 2017-01-11 09:45:32 -06:00
Sebastian Huber ab834d65e4 JFFS2: RTEMS_JFFS2_ON_DEMAND_GARBAGE_COLLECTION
Update #2844.
2016-12-20 08:28:23 +01:00
Sebastian Huber ade135d455 JFFS2: Add RTEMS_JFFS2_FORCE_GARBAGE_COLLECTION
Add IO control to force a garbage collection.

Update #2844.
2016-12-20 08:26:25 +01:00
Sebastian Huber 07c833f8f9 JFFS2: Add RTEMS_JFFS2_GET_INFO
Add IO control RTEMS_JFFS2_GET_INFO to get some JFFS2 filesystem
instance information.

Update #2844.
2016-12-20 08:26:21 +01:00
Chris Johns c6eead1353 libdl: Add C++ exception support to loaded modules.
This has been tested on SPARC, i386, PowerPC and ARM.

Closes #2767.
2016-12-14 09:07:16 +11:00
Sebastian Huber e203b65e51 Add INTERNAL_ERROR_LIBIO_STDERR_FD_OPEN_FAILED
Update #2825.
2016-12-12 08:03:30 +01:00
Sebastian Huber a5ba08eb4f Add INTERNAL_ERROR_LIBIO_STDOUT_FD_OPEN_FAILED
Update #2825.
2016-12-12 08:03:30 +01:00
Sebastian Huber 9622f7796f Add INTERNAL_ERROR_LIBIO_SEM_CREATE_FAILED
Update #2825.
2016-12-12 08:03:30 +01:00
Sebastian Huber 8252968812 INTERNAL_ERROR_LIBIO_USER_ENV_KEY_CREATE_FAILED
Update #2825.
2016-12-12 08:03:29 +01:00
Sebastian Huber 0a81a58254 Add INTERNAL_ERROR_POSIX_INIT_THREAD_CREATE_FAILED
Update #2825.
2016-12-12 08:03:29 +01:00
Sebastian Huber 279d5260c3 Add INTERNAL_ERROR_RTEMS_INIT_TASK_CREATE_FAILED
Update #2825.
2016-12-12 08:03:29 +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 b6606e8d99 score: Remove fatal is internal indicator
The fatal is internal indicator is redundant since the fatal source and
error code uniquely identify a fatal error.  Keep the fatal user
extension is internal parameter for backward compatibility and set it to
false always.

Update #2825.
2016-12-09 08:47:51 +01:00
Sebastian Huber 05006c9017 cdtest: Print proper begin/end of test messages 2016-12-09 08:26:47 +01:00
Chris Johns 8c637ee324 cdtest: Add std::runtime_error() test case
Update #2830.
2016-12-09 08:26:47 +01:00
Sebastian Huber 16bd9e0a9e sptimecounter02: Add plot script 2016-12-08 14:46:32 +01:00
Sebastian Huber 3672f9a202 sptimecounter02: Update screen file
Data obtained on QorIQ T4240 running with 1500MHz.
2016-12-08 14:46:12 +01:00
Sebastian Huber ccda60bdb6 smplock01: Fix plot scripts 2016-12-07 11:22:00 +01:00
Chris Johns 28fda6279b testsuite: Add test states to the testsuit configuration files.
Change the testsuite configuration files to hold state information about
a test. The states are:

 exclude        - Do not build the test
 expected-fail  - The test is expected to fail
 indeterminate  - The test may pass or may fail

A message is printed just after the test's BEGIN message to indicate
there is a special state for the test. No state message means the test
is expected to pass.

This support requires tests are correctly written to the use standard
support to begin and end a test.
2016-12-07 17:22:41 +11:00
Sebastian Huber 4b579c5f51 score: Simplify linker set API
Resurrect RTEMS_LINKER_SET_BEGIN() and RTEMS_LINKER_SET_END().

Add new macros RTEMS_LINKER_SET_ITEM_COUNT(),
RTEMS_LINKER_SET_IS_EMPTY(), and
RTEMS_LINKER_SET_FOREACH().

Remove confusing RTEMS_LINKER_SET_ASSIGN_BEGIN() and
RTEMS_LINKER_SET_ASSIGN_END().

Fix RTEMS_LINKER_SET_SIZE() to return the size in characters as
specified by the documentation.

Update #2408.
Update #2790.
2016-12-06 11:37:20 +01:00
Sebastian Huber 38bc13f809 smplock01: Fix fairness plot script 2016-12-05 14:47:19 +01:00
Sebastian Huber b07e642a2b smpthreadlife01: Fix due to robust thread dispatch
Update #2811.
2016-12-02 13:56:04 +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 a0d4e9933c cpukit: Add libdebugger, a remote debugger agent for GDB. 2016-11-29 08:50:40 +11:00
Sebastian Huber c09db57f37 score: Fix thread queue context initialization
Initialize the thread queue context with invalid data in debug
configurations to catch missing set up steps.
2016-11-28 16:08:43 +01:00
Sebastian Huber 73f9c2c27b smptests/smpfatal03: Use timer to provoke error
Avoid use of internal _Thread_Dispatch_disable() function.

Update #2825.
2016-11-23 13:44:22 +01:00
Sebastian Huber bee0323279 score: Uncomment unused internal error codes
Update #2825.
2016-11-23 12:52:07 +01:00
Sebastian Huber c42be504c9 posix: Add self-contained pthread spinlock
Turn pthread_spinlock_t into a self-contained object.  On uni-processor
configurations, interrupts are disabled in the lock/trylock operations
and the previous interrupt status is restored in the corresponding
unlock operations.  On SMP configurations, a ticket lock is a acquired
and released in addition.

The self-contained pthread_spinlock_t object is defined by Newlib in
<sys/_pthreadtypes.h>.

typedef struct {
  struct _Ticket_lock_Control _lock;
  __uint32_t                  _interrupt_state;
} pthread_spinlock_t;

This implementation is simple and efficient.  However, this test case of
the Linux Test Project would fail due to call of printf() and sleep()
during spin lock ownership:

https://github.com/linux-test-project/ltp/blob/master/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_lock/1-2.c

There is only limited support for profiling on SMP configurations.

Delete CORE spinlock implementation.

Update #2674.
2016-11-23 12:52:06 +01:00
Sebastian Huber 125f248231 score: Add thread queue enqueue callout
Replace the expected thread dispatch disable level with a thread queue
enqueue callout.  This enables the use of _Thread_Dispatch_direct() in
the thread queue enqueue procedure.  This avoids impossible exection
paths, e.g. Per_CPU_Control::dispatch_necessary is always true.
2016-11-23 12:52:06 +01:00