Commit Graph

8207 Commits

Author SHA1 Message Date
Sebastian Huber
d5ef7ae2a3 smp: Delete _SMP_Request_other_cores_to_dispatch()
Use an event triggered unicast to inform remote processors about a
necessary thread dispatch instead.
2013-07-30 09:53:25 +02:00
Sebastian Huber
3f317e9033 score: Move _Thread_Dispatch_if_necessary()
Rename to _RTEMS_Tasks_Dispatch_if_necessary().
2013-07-30 09:53:25 +02:00
Sebastian Huber
0628824714 posix: Simplify pthread_kill()
Delete _Thread_Signal_notification() since this is a side-effect of
_POSIX_signals_Unblock_thread().
2013-07-30 09:53:25 +02:00
Sebastian Huber
6c0e43d31a score: Add and use _Thread_Signal_notification() 2013-07-30 09:53:25 +02:00
Sebastian Huber
21ff802c7f smp: Delete _ISR_Disable_on_this_core(), etc.
Delete _ISR_Enable_on_this_core(), _ISR_Flash_on_this_core(),
_ISR_SMP_Disable(), _ISR_SMP_Enable(), _ISR_SMP_Flash().

The ISR disable/enable interface has no parameter to pass a specific
object.  Thus it is only possible to implement a single global lock
object with this interface.  Using the ISR disable/enable as the giant
lock on SMP configurations is not feasible.

Potentially blocking resource obtain sequences protected by the thread
dispatch disable level are subdivided into smaller ISR disabled critical
sections.  This works since on single processor configurations there is
only one thread of execution that can block.  On SMP this is different
(image a mutex obtained concurrently by different threads on different
processors).

The thread dispatch disable level is currently used as the giant lock.
There is not need to complicate things with this unused interface.
2013-07-30 09:53:24 +02:00
Sebastian Huber
e4c9176531 smp: Delete _ISR_SMP_Initialize() 2013-07-30 09:53:24 +02:00
Sebastian Huber
10b51ae739 score: Critical section change in _Thread_Dispatch
If we enter _Thread_Dispatch() then _Thread_Dispatch_disable_level must
be zero.  Single processor RTEMS assumes that stores of non-zero values
to _Thread_Dispatch_disable_level are observed by interrupts as non-zero values.

Move the _Thread_Dispatch_set_disable_level( 1 ) out of the first ISR
disabled critical section.  In case interrupts happen between the
_Thread_Dispatch_set_disable_level( 1 ) and _ISR_Disable( level ) then
the interrupt will observe a non-zero _Thread_Dispatch_disable_level and
will not issue a _Thread_Dispatch() and we can enter the ISR disabled
section directly after interrupt processing.

This change leads to symmetry between the single processor and SMP
configuration.
2013-07-30 09:53:24 +02:00
Sebastian Huber
99970a7912 score: Add assert to _Per_CPU_Get()
Thread dispatching must be repressed to use the per CPU control of the
current processor consistently.
2013-07-30 09:53:23 +02:00
Sebastian Huber
4088377398 score: Add _Assert_Thread_dispatching_repressed() 2013-07-30 09:53:23 +02:00
Sebastian Huber
95519eede2 score: New header file <rtems/score/assert.h> 2013-07-30 09:53:23 +02:00
Sebastian Huber
fe52e7c07c smp: Add and use _Per_CPU_Get()
Add and use _Per_CPU_Get_by_index() and _Per_CPU_Get_index().  Add
_Per_CPU_Send_interrupt().  This avoids direct access of
_Per_CPU_Information.
2013-07-30 09:53:23 +02:00
Sebastian Huber
ff63d2dbf9 smp: Use Thread_Control.is_executing
FIXME: This area needs proper locking.
2013-07-30 09:53:22 +02:00
Sebastian Huber
f6efd0bf8a score: Move object content to public API 2013-07-28 14:00:19 +02:00
Sebastian Huber
0a10eb30c2 score: Move object MP content to public API 2013-07-28 14:00:19 +02:00
Chris Johns
681f198539 Return the amount of data written when an error occurs rather than
the error.

The change lets the mrfs_fsrdwr test pass.
2013-07-27 23:57:05 +10:00
Sebastian Huber
91404ded25 libmisc: Provide libutf8proc conditionally 2013-07-26 11:55:48 +02:00
Sebastian Huber
88c74ab115 score: Merge tod implementation into one file
Delete TOD_MICROSECONDS_PER_SECOND, TOD_MICROSECONDS_TO_TICKS() and
TOD_MILLISECONDS_TO_TICKS().
2013-07-26 11:55:47 +02:00
Sebastian Huber
a2e3f33f39 score: Create object implementation header
Move implementation specific parts of object.h and object.inl into new
header file objectimpl.h.  The object.h contains now only the
application visible API.
2013-07-26 11:55:47 +02:00
Sebastian Huber
0c3edbf0cf Include missing <rtems/score/threaddispatch.h> 2013-07-26 11:55:47 +02:00
Sebastian Huber
bfd0d7a337 score: Include missing <rtems/score/thread.h> 2013-07-26 11:55:46 +02:00
Sebastian Huber
0b9f472116 score: Move mppkt implementation into mpciimpl.h 2013-07-26 11:55:46 +02:00
Sebastian Huber
7f04cb18ff score: Create mpci implementation header
Move implementation specific parts of mpci.h into new header file
mpciimpl.h.  The mpci.h contains now only the application visible API.
2013-07-26 11:55:46 +02:00
Sebastian Huber
6cec745f6c rtems: Create signal implementation header
Move implementation specific parts of signal.h into new header file
signalimpl.h.  The signal.h contains now only the application visible
API.
2013-07-26 11:55:46 +02:00
Sebastian Huber
cba15292d9 score: Merge objectmp implementation into one file 2013-07-26 11:55:46 +02:00
Sebastian Huber
3cf392389d rtems: Fix partition includes 2013-07-26 11:55:46 +02:00
Sebastian Huber
9892d677d3 rtems: Use proper header guard 2013-07-26 11:55:45 +02:00
Sebastian Huber
a1123646ac score: Create threadq implementation header
Move implementation specific parts of tqdata.h, threadq.h and
threadq.inl into new header file threadqimpl.h.  The threadq.h contains
now only the application visible API.

Delete tqdata.h.
2013-07-26 11:55:45 +02:00
Sebastian Huber
8d0bf3224b score: Delete threadq.inl 2013-07-26 11:55:45 +02:00
Sebastian Huber
62590a7331 score: Merge threadmp implementation into one file 2013-07-26 11:55:45 +02:00
Sebastian Huber
fe6c170cf5 score: Create states implementation header
Move implementation specific parts of states.h and states.inl into new
header file statesimpl.h.  The states.h contains now only the
application visible API.
2013-07-26 11:55:45 +02:00
Sebastian Huber
5618c37a7a score: Create thread implementation header
Move implementation specific parts of thread.h and thread.inl into new
header file threadimpl.h.  The thread.h contains now only the
application visible API.

Remove superfluous header file includes from various files.
2013-07-26 11:55:44 +02:00
Sebastian Huber
f0bfd7d81d score: Create prioritybitmap implementation header
Move implementation specific parts of prioritybitmap.h and
prioritybitmap.inl into new header file prioritybitmapimpl.h.  The
prioritybitmap.h contains now only the application visible API.

Move content of bitfield.h into prioritybitmapimpl.h.
2013-07-26 11:55:44 +02:00
Sebastian Huber
c6e21ee18f score: Create scheduler implementation header
Move implementation specific parts of scheduler.h and scheduler.inl into
new header file schedulerimpl.h.  The scheduler.h contains now only the
application visible API.
2013-07-26 11:55:44 +02:00
Sebastian Huber
f068384e3c score: Create schedulerpriority impl header
Move implementation specific parts of schedulerpriority.h and
schedulerpriority.inl into new header file schedulerpriorityimpl.h.  The
schedulerpriority.h contains now only the application visible API.

Add missing includes.  Remove superfluous includes.

Move declaration of _Priority_Bit_map to prioritybitmap.inl since this
variable is used only here.

Remove second declaration of  _Priority_Major_bit_map.
2013-07-26 11:55:44 +02:00
Sebastian Huber
bd5606abcb score: Create schedulersimple impl header
Move implementation specific parts of schedulersimple.h and
schedulersimple.inl into new header file schedulersimpleimpl.h.  The
schedulersimple.h contains now only the application visible API.
2013-07-26 11:55:43 +02:00
Sahil Patnayakunii
5711ecffef readdir_r(): Add restrict keyword per Single UNIX Specification 2013-07-24 13:14:29 -05:00
Sahil Patnayakunii
cc86fe1fd2 POSIX Semaphore: Add restrict keyword per Single UNIX Specification 2013-07-24 13:14:29 -05:00
Sahil Patnayakunii
4343f5b4c7 POSIX AIO: Add restrict keyword per Single UNIX Specification 2013-07-24 13:14:29 -05:00
Sahil Patnayakunii
f74a492cf6 POSIX mqueue.h: Add restrict keyword per Single UNIX Specification 2013-07-24 13:14:28 -05:00
Sebastian Huber
4508a5adc1 score: Move _Heap_Area_overhead() definition.
This function is used in bootcard.h.
2013-07-24 15:33:28 +02:00
Sebastian Huber
c9155f7b9b score: Include <rtems/score/cpu.h>
This file uses CPU_ALIGNMENT.
2013-07-24 15:33:18 +02:00
Zhongwei Yao
8fb2bea426 score: Add freechain 2013-07-24 11:11:21 +02:00
Sebastian Huber
df8f9271ea score: Delete priority.inl 2013-07-24 11:11:21 +02:00
Sebastian Huber
39046f766f score: Merge sysstate API into one file 2013-07-24 11:11:21 +02:00
Sebastian Huber
218286bc05 score: Create stack implementation header
Move implementation specific parts of stack.h and stack.inl into new
header file stackimpl.h.  The stack.h contains now only the application
visible API.
2013-07-23 17:19:08 +02:00
Sebastian Huber
f41eeb030b posix: Include missing <stdint.h> 2013-07-23 17:19:08 +02:00
Sebastian Huber
e6f7f81766 score: Create heap implementation header
Move implementation specific parts of heap.h and heap.inl into new
header file heapimpl.h.  The heap.h contains now only the application
visible API.
2013-07-23 17:19:08 +02:00
Sebastian Huber
7121a9faa9 score: Include missing <rtems/score/thread.h> 2013-07-23 17:19:07 +02:00
Sebastian Huber
965ef82015 score: PR1782: CPU_USE_DEFERRED_FP_SWITCH
Do not redefine CPU_USE_DEFERRED_FP_SWITCH.
2013-07-23 17:19:07 +02:00
Sebastian Huber
560efebbd5 score: Include missing <rtems/score/address.h> 2013-07-23 17:19:07 +02:00