Commit Graph
29365 Commits
Author SHA1 Message Date
Sebastian Huber 8a77ef63de rtems: Simplify rtems_semaphore_flush()
Due to the unified status codes, we can now use a common flush method
for semaphore and mutex variants.
2016-05-30 16:16:22 +02:00
Sebastian Huber 09c5ca4cb4 score: Simplify CORE mutex
Remove superfluous support for simple binary semaphores.  With this we
can get rid of the CORE_MUTEX_NESTING_BLOCKS variant.
2016-05-30 16:16:22 +02:00
Sebastian Huber 2581a563f9 score: Add semaphore variants 2016-05-30 16:16:21 +02:00
Sebastian Huber 3ca6e61851 rtems: Simplify rtems_semaphore_delete() 2016-05-30 16:16:21 +02:00
Sebastian Huber af746b093a score: Use thread queue lock for MrsP
Replace the ISR lock in MRSP_Control with a thread queue.  This
simplifies the Classic semaphore implementation.  Only the lock part of
the thread queue is used.
2016-05-30 16:16:21 +02:00
Sebastian Huber 93306058c0 score: _CORE_mutex_Check_dispatch_for_seize()
Move the safety check performed by
_CORE_mutex_Check_dispatch_for_seize() out of the performance critical
path and generalize it.  Blocking on a thread queue with an unexpected
thread dispatch disabled level is illegal in all system states.

Add the expected thread dispatch disable level (which may be 1 or 2
depending on the operation) to Thread_queue_Context and use it in
_Thread_queue_Enqueue_critical().
2016-05-30 16:16:21 +02:00
Sebastian Huber 0e1d11f3f0 score: Add _Thread_queue_Context_set_MP_callout()
Add _Thread_queue_Context_set_MP_callout() to simplify
_Thread_queue_Context_initialize().  This makes it possible to more
easily add additional fields to Thread_queue_Context.
2016-05-30 16:16:21 +02:00
Sebastian Huber dfcc8bb2a6 score: Adjust thread queue layout
Adjust thread queue layout according to Newlib.  This makes it possible
to use the same implementation for <sys/lock.h> and CORE mutexes in the
future.
2016-05-30 14:36:18 +02:00
Sebastian Huber 868cd24dcd score: Use Newlib provided <machine/endian.h> 2016-05-30 08:11:39 +02:00
Sebastian Huber cb2651d17b network: Align with Newlib type definitions 2016-05-30 08:11:39 +02:00
Sebastian Huber fd6fde85a9 score: Add libatomic support
Close #2695.
2016-05-30 08:11:39 +02:00
Sebastian Huber dce487912d score: Add Status_Control for all APIs
Unify the status codes of the Classic and POSIX API to use the new enum
Status_Control.  This eliminates the Thread_Control::Wait::timeout_code
field and the timeout parameter of _Thread_queue_Enqueue_critical() and
_MPCI_Send_request_packet().  It gets rid of the status code translation
tables and instead uses simple bit operations to get the status for a
particular API.  This enables translation of status code constants at
compile time.  Add _Thread_Wait_get_status() to avoid direct access of
thread internal data structures.
2016-05-26 21:44:31 +02:00
Sebastian Huber d887c1b5b3 posix: Fix sem_init() with too large initial value
Close #2721.
2016-05-26 21:44:30 +02:00
Sebastian Huber 39bcf7417e Fix semaphore post overflow status
Close #2720.
2016-05-26 21:44:30 +02:00
Sebastian Huber dbedcf93f0 testsuites: Fix locked_printf() test printer 2016-05-26 21:41:47 +02:00
Chris Johns 3039e1840c testsuite: Fix networking samples to use the RTEMS printer. 2016-05-26 15:52:19 +10:00
Sebastian Huber 9ec7d492b9 posix: Fix pthread_spin_unlock() error status
Close #2719.
2016-05-25 12:43:54 +02:00
Sebastian Huber 631b3c8967 score: Move thread queue MP callout to context
Drop the multiprocessing (MP) dependent callout parameter from the
thread queue extract, dequeue, flush and unblock methods.  Merge this
parameter with the lock context into new structure Thread_queue_Context.
This helps to gets rid of the conditionally compiled method call
helpers.
2016-05-25 12:43:54 +02:00
Sebastian Huber c3d8d9e0bf score: Get rid of mp_id parameter
Get rid of the mp_id parameter used for some thread queue methods.  Use
THREAD_QUEUE_QUEUE_TO_OBJECT() instead.
2016-05-25 12:43:53 +02:00
Sebastian Huber 8866e6222f score: Move thread queue object support 2016-05-25 12:43:53 +02:00
Sebastian Huber 0e9d5b69cc mpci: Fix thread queue flush method
We must call the MP callout for proxies if we unblock them after a
thread queue extraction.  This was missing in
_Thread_queue_Flush_critical().  Move thread remove timer and unblock
code to new function _Thread_Remove_timer_and_unblock().
2016-05-25 12:43:53 +02:00
Sebastian Huber 25e28d84d7 confdefs.h: Fix heap alloc size estimate
Account for the heap minimum block size.
2016-05-25 12:43:53 +02:00
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 62cba156f6 libmisc: Fix printk format warnings. 2016-05-25 15:47:34 +10:00
Chris Johns 458e4c4ef4 score/i386: Fix printk format warnings. 2016-05-25 15:47:34 +10:00
Chris Johns 75e3e0ebc1 libcsupport: Fix printk warnings. 2016-05-25 15:47:34 +10:00
Chris Johns 8f9d07bbbc bsp/shared: Fix printk warnings. 2016-05-25 15:47:34 +10:00
Chris Johns c16e54a983 libfs/jff2: Avoid printk format warnings.
This change does not fix the printk format warnings rather
it ignores them.
2016-05-25 15:47:34 +10:00
Chris Johns 1503c1c382 i386/pc386: Fix printk formatting warnings. 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 16dbcdcd7c score: _CORE_message_queue_Seize()
Delete unused parameter.
2016-05-24 14:06:17 +02:00
Sebastian Huber 7af4d676f3 mpci: Add missing return statements 2016-05-24 14:06:07 +02:00
Sebastian Huber bdb3b7fa2f score: _CORE_semaphore_Seize()
Delete unused parameter.
2016-05-20 16:17:00 +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 582bb23c74 score: Rename _Objects_Get_local()
Rename _Objects_Get_local() into _Objects_Get().  Confusions with the
previous _Objects_Get() function are avoided since the Objects_Locations
parameter is gone.
2016-05-20 16:17:00 +02:00
Sebastian Huber 4bae341dc9 score: Delete unused _Objects_Get_isr_disable()
Delete now unused Objects_Locations.
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 641b44c225 rtems: _Message_queue_Get_interrupt_disable()
Use _Objects_Get_local() for _Message_queue_Get_interrupt_disable() to
get rid of the location parameter.  Move remote object handling to
message queue MPCI support.
2016-05-20 16:16:59 +02:00
Sebastian Huber 0a00b2b5f6 rtems: Remove location from _Partition_Get()
Use _Objects_Get_local() for _Partition_Get() to get rid of the location
parameter.  Move remote object handling to partition MPCI support.
2016-05-20 16:16:59 +02:00
Sebastian Huber 516ee758df mpci: Delete unused region support 2016-05-20 16:16:59 +02:00
Sebastian Huber 956b8e5047 mpci: Simplify _Objects_MP_Is_remote() 2016-05-20 16:16:59 +02:00
Sebastian Huber 0cc60718d0 posix: Add const to _POSIX_Keys_Key_value_find() 2016-05-20 16:16:59 +02:00
Sebastian Huber 61340d1723 score: Add const to _RBTree_Find_inline() 2016-05-20 16:16:58 +02:00
Sebastian Huber 0cc91daa20 score: Delete unused _Objects_Get_local_object() 2016-05-20 16:16:58 +02:00
Sebastian Huber 28ba7e20aa posix: Remove dead code and shrink comment 2016-05-20 16:16:58 +02:00
Sebastian Huber 05f9b02e3c posix: Add and use _POSIX_Get_object_body() 2016-05-20 16:16:26 +02:00