Commit Graph

8207 Commits

Author SHA1 Message Date
WeiY
2e7f579865 stdatomic.h support check when configure 2013-07-17 13:07:33 +02:00
WeiY
d61e54c2e0 update-all-architectures-to-new-atomic-implementation 2013-07-17 13:07:33 +02:00
WeiY
34229d5285 A generic atomic implementation for smp architectures 2013-07-17 13:07:33 +02:00
WeiY
1180099ed9 New atomic API definition based on C11 atomic 2013-07-17 13:07:32 +02:00
Sebastian Huber
7a7f0719d9 posix: Delete unused functions 2013-07-16 19:09:26 +02:00
Sebastian Huber
b71cdd2583 rtems: Delete unused functions 2013-07-16 19:09:26 +02:00
Sebastian Huber
4e5608dd4d arm: Fix exception frame information
Use the right stack pointer value for the exception frame.  Assume that
we do not have a double abort exception.
2013-07-16 08:25:41 +02:00
Ric Claus
818d4b090f bsps/arm: Fix printk args to match format 2013-07-15 09:40:59 +02:00
Joel Sherrill
155ea78d9f threadhandler.c: Add comments 2013-07-09 12:40:51 -05:00
Sebastian Huber
ad83ea03eb mouse: Add shared bsp_get_serial_mouse_device() 2013-07-07 14:44:47 +02:00
Sebastian Huber
6009da1d2b posix: Add comment 2013-07-05 16:01:04 +02:00
Sebastian Huber
a4006feead mouse: Include missing header file 2013-06-29 15:15:50 +02:00
Sebastian Huber
311ba73f3a framebuffer: Add and use FRAMEBUFFER_DEVICE_0_NAME 2013-06-29 15:15:49 +02:00
Sebastian Huber
56435e646c powerpc: Fix Altivec support
Use the right context.
2013-06-26 10:31:43 +02:00
Sebastian Huber
d0d357edeb heap: Add _Heap_Greedy_allocate_all_except_largest
Add rtems_workspace_greedy_allocate_all_except_largest() and
rtems_heap_greedy_allocate_all_except_largest().
2013-06-25 17:03:22 +02:00
Sebastian Huber
c497657ffb heap: Free all delayed blocks during resize 2013-06-25 17:03:21 +02:00
Sebastian Huber
cc0cb7c4a8 heap: Free all delayed blocks during extend 2013-06-25 17:03:21 +02:00
Sebastian Huber
1d48e25d6b heap: Workaround for workspace protection 2013-06-25 17:03:21 +02:00
Chris Johns
1ebffa8914 arm: Fix default exception prologues 2013-06-21 10:26:11 +02:00
Sebastian Huber
4f1da72e7f score: _Heap_Protection_free_all_delayed_blocks()
Add and use _Heap_Protection_free_all_delayed_blocks() to prevent
test suite failures if RTEMS_DEBUG is defined.
2013-06-21 10:26:11 +02:00
Sebastian Huber
9165a5b07d IMFS: Fix reference count for debug enabled 2013-06-21 10:26:11 +02:00
Sebastian Huber
ade27c69eb bsps: Move bsp_generic_fatal_code to new file
Add bsp_generic_fatal().
2013-06-21 10:26:10 +02:00
Joel Sherrill
6520aef1e3 sparc in_cksum: Use __sparc__ which is available in -ansi mode 2013-06-20 10:52:48 -05:00
Jiri Gaisler
1f4ee306d3 Added in_cksum_sparc.h to optimize IP checksum calculations for SPARC. 2013-06-19 08:21:40 -05:00
Sebastian Huber
961669db4e documentation: Fix Doxygen comments 2013-06-14 16:26:09 +02:00
Sebastian Huber
a936aa49b5 scheduler: New simple SMP scheduler implementation
The new Simple SMP Scheduler allocates a processor for the processor
count highest priority ready threads.  The thread priority and position
in the ready chain are the only information to determine the scheduling
decision.  Threads with an allocated processor are in the scheduled
chain.  After initialization the scheduled chain has exactly processor
count nodes.  Each processor has exactly one allocated thread after
initialization.  All enqueue and extract operations may exchange threads
with the scheduled chain.  One thread will be added and another will be
removed.  The scheduled and ready chain is ordered according to the
thread priority order.  The chain insert operations are O(count of ready
threads), thus this scheduler is unsuitable for most real-time
applications.

The thread preempt mode will be ignored.
2013-06-14 16:26:08 +02:00
Sebastian Huber
8f420927ac scheduler: Simplify simple scheduler
Add and use _Scheduler_simple_Insert_priority_fifo_order(),
_Scheduler_simple_Insert_priority_lifo_order(),
_Scheduler_simple_Insert_priority_fifo() and
_Scheduler_simple_Insert_priority_lifo().
2013-06-14 16:26:08 +02:00
Sebastian Huber
a3443088f5 scheduler: Add and use _Scheduler_default_Tick()
Delete _Scheduler_priority_Tick().  Use _SMP_Get_processor_count() for
default tick operation.  Delete _Scheduler_simple_smp_Tick().
2013-06-14 16:26:08 +02:00
Sebastian Huber
6eba7c857b scheduler: Specify thread of yield operation
The yielding thread of the yield operation is now specified by a
parameter.  The tick operation may be performed for each executing
thread in a SMP configuration.
2013-06-14 16:26:08 +02:00
Sebastian Huber
1ccb64e18f scheduler: Add start idle thread operation
Add and use _Scheduler_Start_idle().
2013-06-14 16:26:07 +02:00
Sebastian Huber
477259c4ed score: Simplify _Thread_Create_idle() 2013-06-14 16:26:07 +02:00
Sebastian Huber
edde99bd21 score: Rename rtems_smp_get_number_of_processors()
Rename in rtems_smp_get_processor_count().  Always provide
<rtems/score/smp.h> and <rtems/rtems/smp.h>.  Add
_SMP_Get_processor_count().  This function will be a compile time
constant defined to be one on uni-processor configurations.  This allows
iterations over all processors without overhead on uni-processor
configurations.
2013-06-14 16:26:07 +02:00
Sebastian Huber
5c78940d94 score: Add and use _Thread_Dispatch_if_necessary()
Delete _Thread_Evaluate_is_dispatch_needed().

Use _Thread_Dispatch_is_enabled() in rtems_task_mode() instead of the
system state to determine if a thread dispatch is allowed.  Signales are
now delivered in rtems_task_mode() even if preemption is disabled.  This
is in line with rtems_signal_send().
2013-06-14 16:26:07 +02:00
Sebastian Huber
49cdf40afa score: Add and use _Thread_Dispatch_is_enabled()
Delete _Thread_Dispatch_in_critical_section() and
_Thread_Is_dispatching_enabled().
2013-06-14 16:26:06 +02:00
Sebastian Huber
ec978d97e0 score: Add _Chain_Insert_ordered_unprotected() 2013-06-14 16:26:06 +02:00
Sebastian Huber
7a34ca371b rtems: Simplify rtems_task_mode() 2013-06-14 16:26:06 +02:00
Sebastian Huber
aabfcd0c33 smp: Fix _Thread_Dispatch_decrement_disable_level
We must obtain the processor ID after interrupts are disabled since a
non-optimizing compiler may store the value on the stack and read it
back.
2013-06-12 16:12:54 +02:00
Sebastian Huber
df244cfc30 smp: Protect decrement operation 2013-06-12 16:12:53 +02:00
Sebastian Huber
a8ef3bf053 smp: Add and use _Per_CPU_Lock_acquire()
Add and use _Per_CPU_Lock_release().
2013-06-12 16:12:53 +02:00
Sebastian Huber
f70526a761 score: Avoid cyclic include dependency 2013-06-12 16:12:53 +02:00
Sebastian Huber
127044069b score: Add missing include 2013-06-12 16:12:53 +02:00
Sebastian Huber
65483f807d termios: SMP support 2013-06-12 16:12:50 +02:00
Sebastian Huber
fed92f5f67 termios: Notify driver about inactive transmit
Returning this state in the return value leads to race conditions on
SMP.  The inactive state notification must be inside the critical
section.
2013-06-12 16:11:25 +02:00
Sebastian Huber
7338299c96 termios: Expand critical section
Use interrupt disable/enable to protect the complete refill state
change.  This avoids race conditions for the task driven configuration
and a later SMP support.
2013-06-12 16:11:25 +02:00
Sebastian Huber
58cde54dcb termios: Move wake up writer task action 2013-06-12 16:11:25 +02:00
Sebastian Huber
2a8713aa54 termios: Avoid second return path 2013-06-12 16:11:24 +02:00
Sebastian Huber
c7bc6d44cb rtems: Add interrupt locks
Interrupt locks are low-level lock to protect critical sections accessed
by threads and interrupt service routines.
2013-06-12 16:11:24 +02:00
Sebastian Huber
3ccce23aa4 score: Always provide <rtems/score/smplock.h> 2013-06-12 16:11:24 +02:00
Sebastian Huber
aec0e1958e configure: Documentation 2013-06-12 16:11:24 +02:00
Sebastian Huber
7cf2ec6f0d smp: Set state PER_CPU_STATE_UP on main processor 2013-06-07 17:06:43 +02:00