Commit Graph
3633 Commits
Author SHA1 Message Date
Chris Johns addf1aa868 testsuite: Fix printk format warnings. 2016-05-25 15:47:34 +10:00
Chris Johns 61ea345158 testsuite: Fix printk formating warning. 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 b1860df53d psxtests/psxmsgq01: Fix typo 2016-05-24 15:39:07 +02:00
Sebastian Huber 4b623d655b score: Fix blocking _CORE_message_queue_Submit()
Close #2718.
2016-05-24 15:37:10 +02:00
Sebastian Huber 7088340957 psxtests/psxmsgq01: Enable test case 2016-05-24 15:32:33 +02:00
Sebastian Huber e266d134eb Replace *_Get_interrupt_disable() with *_Get()
Uniformly use *_Get() to get an object by identifier with a lock
context.
2016-05-20 16:17:00 +02:00
Sebastian Huber 62c528e633 rtems: _Semaphore_Get_interrupt_disable()
Use _Objects_Get_local() for _Semaphore_Get_interrupt_disable() to get
rid of the location parameter.  Move remote object handling to semaphore
MPCI support.
2016-05-20 16:17:00 +02:00
Sebastian Huber ceb0f6597c score: Remove the Giant lock
Update #2555.
2016-05-20 07:50:37 +02:00
Sebastian Huber c2f301b580 score: Rename _ISR_Flash() into _ISR_Local_flash()
This is a preparation to remove the Giant lock.

Update #2555.
2016-05-20 07:50:37 +02:00
Sebastian Huber 2471316321 score: Rename _ISR_Disable() and _ISR_Enable()
Rename _ISR_Disable() into _ISR_Local_disable().  Rename _ISR_Enable()
into _ISR_Local_enable().  Remove _Debug_Is_owner_of_giant().

This is a preparation to remove the Giant lock.

Update #2555.
2016-05-20 07:50:37 +02:00
Sebastian Huber 4b04cb6155 score: Rename _ISR_Disable_without_giant()
Rename _ISR_Disable_without_giant() into _ISR_Local_disable().  Rename
_ISR_Enable_without_giant() into _ISR_Local_enable().

This is a preparation to remove the Giant lock.

Update #2555.
2016-05-20 07:50:34 +02:00
Sebastian Huber dab902d5b2 testsuites: Avoid Giant lock
Replace _Thread_Disable_dispatch() with _Thread_Dispatch_disable().
Replace _Thread_Enable_dispatch() with _Thread_Dispatch_enable().

This is a preparation to remove the Giant lock.

Update #2555.
2016-05-20 07:49:41 +02:00
Sebastian Huber 5eac967651 testsuites: Replace _Thread_Get()
Replace _Thread_Get() with _Thread_Get_interrupt_disable() to avoid the
Giant lock.

Update #2555.
2016-05-20 07:49:40 +02:00
Sebastian Huber 92f6883073 sptests/spintrcritical22: Avoid _Objects_Get()
Use _Semaphore_Get_interrupt_disable() instead.

Update #2555.
2016-05-20 07:49:40 +02:00
Sebastian Huber 33829ce155 score: Avoid Giant lock for _Thread_Start()
Update #2555.
2016-05-20 07:49:39 +02:00
Sebastian Huber 9949d8a7d0 score: Add Thread_Change_life()
Add _Thread_Change_life_locked() as a general function to alter the
thread life state.  Use it to implement _Thread_Set_life_protection() as
a first step.

Update #2555.
Update #2626.
2016-05-20 07:49:37 +02:00
Sebastian Huber 12a1228c59 psxclassic01: Assume correct pthread_detach()
Update #2714.
2016-05-20 07:49:36 +02:00
Sebastian Huber 41ce30a967 SMP: Add Mellor-Crummey and Scott (MCS) lock
Added only for evaluation purposes.  We have to compare the performance
against the ticket lock on the interesting platforms via
smptests/smplock01.

The following GCC shortcoming affects the MCS lock:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66867
2016-05-19 11:50:38 +02:00
Sebastian Huber ae0f048ff3 psxtests/psxualarm: Avoid output in signal handler
Avoid output in signal handler to not disturb the timings which are
checked in this test.  Use asserts to ensure proper signal handler
invocations.
2016-05-18 11:11:21 +02:00
Sebastian Huber 3c20d2810a posix: Fix return states of pthread_kill()
POSIX mandates that an error code is returned and not -1 plus errno.

Close #2715.
2016-05-17 13:41:56 +02:00
Sebastian Huber 9d8ee11e55 psxtests/psxcancel: Add pthread_detach() tests
Update #2714.
2016-05-17 10:58:10 +02:00
Sebastian Huber f014f84eb3 psxtests/psxcancel: Add resource check 2016-05-17 09:41:34 +02:00
Sebastian Huber adc819ef76 sptests/spthreadlife01: Add self delete test case 2016-05-17 09:02:17 +02:00
Sebastian Huber 9fd72713c9 posix: Fix return status of pthread_cancel()
POSIX recommends ESRCH in case no thread exists for the specified
identifier.

Close #2713.
2016-05-17 08:39:30 +02:00
Sebastian Huber 1379d840a4 smptests/smpcapture02: Adjust for clock changes
Fix overall clock tick count.  Change introduced by
90d8567d34.

Update #2554.
2016-05-12 13:24:42 +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 9276fdec2e score: Fix CORE mutex initialization
The priority inheritance and ceiling CORE mutexes wrongly used the FIFO
queueing discipline.  Delete misleading _CORE_mutex_Is_priority().  Bug
introduced by 1e1a91ed11.

Add test sptests/spmutex01, since no existing uni-processor test covered
the thread priority queueing discipline for CORE mutexes.
2016-05-12 13:20:33 +02:00
Sebastian Huber 876dde7a7d score: Make _Objects_Information_table const
The _Objects_Information_table is statically initialized.  So, we can
make it read-only.
2016-05-04 07:24:30 +02:00
Sebastian Huber 1d40d81b4b rtems: Remove task variables
Update #2494.
Update #2555.
2016-05-04 07:24:30 +02:00
Sebastian Huber e4fd35ddcb confdefs.h: Fix named object size estimate
Account for the terminating null character.  Use _POSIX_PATH_MAX instead
of NAME_MAX according to _POSIX_Semaphore_Manager_initialization() and
_POSIX_Message_queue_Manager_initialization().
2016-05-04 07:24:29 +02:00
Sebastian Huber 981eed2176 score: Add dummy Strong APA scheduler
Start with a copy of the Priority SMP scheduler implementation.

Update #2510.
2016-05-02 07:46:17 +02:00
Sebastian Huber 500a8e9c62 score: Delete __RTEMS_STRICT_ORDER_MUTEX__
Remove support for strict order mutexes.

Close #2124.
2016-05-02 07:46:16 +02:00
Sebastian Huber f009ed086d rtems: Avoid Giant lock for semaphores
Update #2555.
2016-05-02 07:46:15 +02:00
Sebastian Huber c8982e5f6a posix: Simplify message queues
The mq_open() function returns a descriptor to a POSIX message queue
object identified by a name.  This is similar to sem_open().  In
contrast to the POSIX semaphore the POSIX message queues use a separate
object for the descriptor.  This extra object is superfluous, since the
object identifier can be used directly for this purpose, just like for
the semaphores.

Update #2702.
Update #2555.
2016-05-02 07:46:15 +02:00
Sebastian Huber b46622684a score: Add _Thread_queue_Is_empty() 2016-04-22 09:25:08 +02:00
Sebastian Huber 36cd27c1e3 score: Simplify _Objects_Get_next()
Remove unused location parameter.
2016-04-21 07:29:40 +02:00
Sebastian Huber f05eeb2091 score: Simplify _Objects_Initialize_information()
Remove unused supports_global parameter.  Convert
_Objects_Initialize_information() to a macro to avoid use of
RTEMS_MULTIPROCESSING define for each caller.
2016-04-21 07:29:39 +02:00
Sebastian Huber 48b04fc388 posix: Avoid Giant lock for mutexes
Delete _POSIX_Mutex_Get().  Use _POSIX_Mutex_Get_interrupt_disable()
instead.

Update #2555.
2016-04-21 07:29:39 +02:00
Sebastian Huber 90f1265e5d score: Fix _CORE_semaphore_Flush()
Use proper CORE_semaphore_Status for _CORE_semaphore_Flush() and
_CORE_semaphore_Destroy() operations.

Close #2696.
2016-04-21 07:29:38 +02:00
Sebastian Huber bdf6cc2a73 sptests/spsysinit01: Fix warning 2016-04-21 07:29:37 +02:00
Joel Sherrill 4cf41fd511 block[08|09|10]/init.c: Include <stdlib.h> to fix warning on exit() 2016-04-20 11:00:57 -05:00
Sebastian Huber 709f38a972 score: Use chain iterator for user extensions
Add a lock and use a chain iterator for safe iteration during concurrent
user extension addition and removal.

Ensure that dynamically added thread delete and fatal extensions are
called in reverse order.

Update #2555.
Update #2692.
2016-04-18 08:20:16 +02:00
Sebastian Huber 8f6c295b94 score: Add Chain_Iterator
Add a chain iterator for safe iteration of chains with concurrent node
extraction.
2016-04-18 08:17:46 +02:00
Joel Sherrill e65c45c4b6 Obsolete rtems_clock_get() directive.
This service was marked as deprecated long prior to the 4.11 release
series and is now being removed.

closes #2676.
2016-04-14 16:36:53 -05:00
Joel Sherrill 8228548d12 Add pthread_getconcurrency() and pthread_setconcurrency()
This is the very simple implementation specified by the Open Group
for implementations with 1:1 kernel thread to user thread mappings.

http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_getconcurrency.html

updates #2680.
2016-04-14 16:28:10 -05:00
Sebastian Huber 6efa349850 posix: Run key destructors during thread restart
POSIX key destructors must be called during thread restart.  Just like
the POSIX cleanup handlers.  This ensures that the TLS object
destructors are called during thread restart for example.  It is
important for the global construction, which uses a thread restart to
run the Init task in a clean environment.

Close #2689.
2016-04-14 08:56:53 +02:00
Sebastian Huber d7e68c96b4 malloc: Fix early realloc() allocation 2016-04-06 13:50:16 +02:00
Sebastian Huber 84f5c0a91b score: Use red-black tree for active global objects
Use a red-black tree to lookup active global objects by identifier or
name.

Update #2555.
2016-04-06 09:08:22 +02:00
Sebastian Huber 84dc9dfb24 score: Use red-black tree for active MP proxies
Update #2555.
2016-04-06 09:08:22 +02:00