Commit Graph

25021 Commits

Author SHA1 Message Date
Sebastian Huber
cf46db8516 bsps: Provide simple console selection 2013-06-17 10:01:35 +02:00
Sebastian Huber
9f868a16ad bsps: Add missing include 2013-06-17 10:01:25 +02:00
Sebastian Huber
961669db4e documentation: Fix Doxygen comments 2013-06-14 16:26:09 +02:00
Sebastian Huber
8b222be707 smptests/smpschedule01: New test 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
6f8adb073b sptests/sp02: Fix maximum task count 2013-06-14 16:26:06 +02:00
Cynthia Rempel
873859a405 Make the default values easier for the configuration GUI to parse 2013-06-12 13:52:55 -04: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
15f3a91858 libchip: Use Termios API change for NS16550
This avoids a race condition on SMP configurations.
2013-06-12 16:12:52 +02:00
Sebastian Huber
6896ca22bb libchip: Delete superfluous assignments 2013-06-12 16:12:52 +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
18e2fbe70d smp: Fix PowerPC context switch 2013-06-07 17:06:43 +02:00
Sebastian Huber
7cf2ec6f0d smp: Set state PER_CPU_STATE_UP on main processor 2013-06-07 17:06:43 +02:00
Sebastian Huber
2d2352bab9 score: Add and use _Objects_Put()
Add and use _Objects_Put_without_thread_dispatch().  These two functions
pair with the _Objects_Get() function.  This helps to introduce object
specific SMP locks to avoid lock contention.
2013-06-07 17:06:43 +02:00
Sebastian Huber
54e9216a0e score: Add _Objects_Put_for_get_isr_disable()
Provide SMP support.  The ISR disable/enable is not enough to ensure
mutual exclusion for SMP configurations.
2013-06-07 17:06:38 +02:00
Sebastian Huber
c398c6603a score: Align _Objects_Get_isr_disable()
Align ISR disable/enable sequence in _Objects_Get_isr_disable() with
thread dispatch disable/enable sequence in _Objects_Get().
2013-06-07 17:02:26 +02:00
Sebastian Huber
4fc370e3c6 score: Move thread dispatch content to new file
Move thread dispatch declarations and inline functions to new header
<rtems/score/threaddispatch.h> to make it independent of the
Thread_Control structure.  This avoids a cyclic dependency in case
thread dispatch functions are used for the object implementation.
2013-06-07 17:02:26 +02:00
Sebastian Huber
4f5baffd75 score: Simplify _CORE_mutex_Seize_interrupt_try* 2013-06-07 17:02:26 +02:00
Sebastian Huber
dcb4daf8e1 score: Simplify _CORE_semaphore_Seize_isr_disable 2013-06-07 17:02:26 +02:00
Sebastian Huber
17ce1034cf score: Simplify _Thread_Create_idle_helper()
The _Thread_Initialize() function has nothing to do with thread
dispatching it simply initializes the thread control.
2013-06-07 17:02:25 +02:00
Sebastian Huber
62da44e6d0 rtems: Move unnest dispatch after ISR enable
This prevents a lock order reversal.
2013-06-07 17:02:25 +02:00
Sebastian Huber
2f49cfdf87 rtems: Fix system event send for remote threads 2013-06-07 17:02:25 +02:00
Sebastian Huber
9bfd7ff09e dosfs: Documentation 2013-06-07 17:02:25 +02:00
Sebastian Huber
1f3ce602f9 termios: Fix warning 2013-06-07 17:02:24 +02:00
Sebastian Huber
36ae561c8e nfsclient: Add rpcSetXIDs() 2013-06-05 17:19:34 +02:00
Sebastian Huber
a2854fd55e nfsclient: Fix warnings 2013-06-05 17:19:33 +02:00
Sebastian Huber
442db915f8 nfsclient: Delete superfluous mask operation 2013-06-05 17:19:33 +02:00
Sebastian Huber
c295e098c6 nfsclient: Delete superfluous assignment 2013-06-05 17:19:33 +02:00
Sebastian Huber
cffa5b7838 libblock: Use UTF-8 converter in media manager 2013-06-04 13:56:19 +02:00