Commit Graph

159 Commits

Author SHA1 Message Date
WeiY
27a034ef13 delete smpatomic0-7 test cases 2013-10-08 16:07:21 +02:00
WeiY
fee154be37 add simple atomic test cases into smpatomic08 2013-10-08 16:06:59 +02:00
Sebastian Huber
4a8c334fb2 smptests/smpatomic08: Add initialization test case 2013-09-03 11:07:37 +02:00
Sebastian Huber
29f7d31782 score: Use unsigned long for atomic integers
Use unsigned long instead of uint_fast32_t since C11 provides only a
ATOMIC_LONG_LOCK_FREE macro constant.  This makes it also possible to
use properly typed integer literals like 123UL.  It is now clear which
compatible type should be used for the atomic integer.
2013-09-03 11:07:36 +02:00
Sebastian Huber
47b6fad012 smptests/smpatomic08: Avoid copy and paste 2013-09-01 15:18:11 +02:00
Sebastian Huber
7136d7f1af smptests/smpatomic08: Simplify or/and test case
Renamed and use common integer variables.
2013-09-01 15:17:02 +02:00
Sebastian Huber
d39ccd69f1 smptests/smpatomic08: Fix compare and exchange 2013-09-01 15:17:01 +02:00
WeiY
4238affc5f add atomic sub, and, or, compare_exchange test cases into smpatomic08 2013-09-01 15:17:01 +02:00
Sebastian Huber
e127c4c9ea smptests/smpatomic08: Fix race conditions 2013-08-29 10:05:16 +02:00
Sebastian Huber
79d03e30bf smptests/smpatomic08: New test 2013-08-28 14:58:51 +02:00
Sebastian Huber
2bbcb644f9 smptests: Move ATOMIC conditional to top-level 2013-08-28 14:58:50 +02:00
Sebastian Huber
518d82b6d3 smp: Disable restart of threads other than self 2013-08-20 11:03:38 +02:00
Sebastian Huber
99b35052ae smp: Add Deterministic Priority SMP Scheduler 2013-08-20 10:17:35 +02:00
Sebastian Huber
aea4a91993 smp: Optimize Simple SMP scheduler
Add Thread_Control::is_in_the_air field if configured for SMP.  This
helps to simplify the extract operation and avoids superfluous
inter-processor interrupts.  Move the processor allocation step into the
enqueue operation.

Add and use _Scheduler_simple_smp_Get_highest_ready().  Add and use
_Scheduler_SMP_Get_lowest_scheduled().
2013-08-20 10:14:04 +02:00
WeiY
6931037e1d correct memory model in smpatomic test case 2013-08-19 14:35:38 +02:00
Sebastian Huber
806f84c8ee smptests/smpswitchextension01: Fix start sequence
Start the toggler after the context is initialized.
2013-08-09 23:02:45 +02:00
Sebastian Huber
d19cce29dc score: Per-CPU thread dispatch disable level
Use a per-CPU thread dispatch disable level.  So instead of one global
thread dispatch disable level we have now one instance per processor.
This is a major performance improvement for SMP.  On non-SMP
configurations this may simplifiy the interrupt entry/exit code.

The giant lock is still present, but it is now decoupled from the thread
dispatching in _Thread_Dispatch(), _Thread_Handler(),
_Thread_Restart_self() and the interrupt entry/exit.   Access to the
giant lock is now available via _Giant_Acquire() and _Giant_Release().
The giant lock is still implicitly acquired via
_Thread_Dispatch_decrement_disable_level().

The giant lock is only acquired for high-level operations in interrupt
handlers (e.g. release of a semaphore, sending of an event).

As a side-effect this change fixes the lost thread dispatch necessary
indication bug in _Thread_Dispatch().

A per-CPU thread dispatch disable level greatly simplifies the SMP
support for the interrupt entry/exit code since no spin locks have to be
acquired in this area.  It is only necessary to get the current
processor index and use this to calculate the address of the own per-CPU
control.  This reduces the interrupt latency considerably.

All elements for the interrupt entry/exit code are now part of the
Per_CPU_Control structure: thread dispatch disable level, ISR nest level
and thread dispatch necessary.  Nothing else is required (except CPU
port specific stuff like on SPARC).
2013-08-09 23:02:38 +02:00
Sebastian Huber
c8670f50d7 smptests/smpmigration01: Fix start sequence
Start the runner after the context is initialized.
2013-08-08 14:11:23 +02:00
Sebastian Huber
015bd1b818 smptests/smp07: Use suspend instead of delete 2013-08-06 11:03:11 +02:00
Sebastian Huber
20bb89d3eb smptests/smpswitchextension01: New test 2013-08-05 13:45:37 +02:00
Sebastian Huber
b9000fd571 smptests/smpmigration01: New test 2013-08-05 13:45:36 +02:00
Sebastian Huber
876dcd02e0 smptests/smppsxsignal01: New test 2013-07-30 09:53:24 +02:00
Sebastian Huber
d4f13d1479 smptests/smpsignal01: New test 2013-07-30 09:53:24 +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
d8dd80e8a6 smptests/smp08: Print missing newline 2013-07-22 16:57:22 +02:00
Sebastian Huber
05e82bd76b score: Error for non-preemptible tasks on SMP
A common use case for disabled preemption was to ensure mutual exclusion
on single-processor configurations.  On SMP this does not work.

To abandon non-preemptible tasks simplifies the scheduler.
2013-07-22 16:46:01 +02:00
Sebastian Huber
79d9523f19 rtems: Error for task variables on SMP
Task variables are not supported on SMP.
2013-07-22 16:46:01 +02:00
Sebastian Huber
50ccf988c2 rtems: Error for task delete on SMP
Task deletion is currently not implemented on SMP configurations.
2013-07-22 16:46:01 +02:00
Sebastian Huber
f913c796ff sapi: Add rtems_configuration_is_smp_enabled()
Add a configuration field which indicates if the SMP mode of operation
is enabled.  This can be used to disable features unsupported on SMP,
e.g task variables.
2013-07-22 16:46:01 +02:00
Sebastian Huber
57c8805648 smptests: Be successful on one processor 2013-07-22 16:45:58 +02:00
Sebastian Huber
39e51758c8 smp: Add and use _CPU_SMP_Get_current_processor()
Add and use _SMP_Get_current_processor() and
rtems_smp_get_current_processor().

Delete bsp_smp_interrupt_cpu().

Change type of current processor index from int to uint32_t to match
_SMP_Processor_count type.
2013-07-17 13:09:49 +02:00
WeiY
2e7f579865 stdatomic.h support check when configure 2013-07-17 13:07:33 +02:00
WeiY
5186b55180 smpatomic test case update 2013-07-17 13:07:33 +02:00
Sebastian Huber
010e4058e5 smptests/smpschedule01: Update due to API change 2013-06-17 10:22:30 +02:00
Sebastian Huber
8b222be707 smptests/smpschedule01: New test 2013-06-14 16:26:09 +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
bbed18668f smptests/smplock01: New test 2013-05-31 15:20:32 +02:00
Sebastian Huber
ac2bb464a5 smptests: Use priority ceiling for locked print
In case the printf() blocks on a semaphore it was possible to end up in
a livelock.
2013-05-31 15:20:30 +02:00
Sebastian Huber
10fd953347 smptests/smp09: Add missing newline 2013-05-27 12:49:14 +02:00
Sebastian Huber
b734b9e8b0 smptests/smp01: Do not assume CPU 0 runs Init 2013-05-27 12:49:14 +02:00
Sebastian Huber
db0cede12c smptests/smp01: Fix semaphore count
The locked print needs one semaphore.
2013-05-27 12:49:14 +02:00
Gedare Bloom
fad2d38a9f RTEMS: Delete ChangeLog files.
This commit deletes all RTEMS ChangeLog files. These files have been abandoned
since converting to git version control. The historical data may be recovered
by checking out any commit before this one. Most of the contents of these
ChangeLog files can also be found in the git log.

Two external ChangeLog files, ChangeLog.slac and ChangeLog.zlib, remain.
2013-03-08 15:55:06 -05:00
WeiY
7e02305018 tests: atomic support for RTEMS. SMP tests for atomic operations. 2013-02-07 17:02:12 -05:00
WeiY
9d23df2fbc score: atomic support for RTEMS automake and autoconf changes 2013-02-07 17:02:12 -05:00
Ralf Corsépius
bb2b8259ea Require automake-1.12.2. 2012-07-19 15:47:55 +02:00
Ralf Corsépius
0f772813aa Require autoconf-2.69. 2012-07-19 15:44:32 +02:00
Joel Sherrill
9b4422a251 Remove All CVS Id Strings Possible Using a Script
Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines
  next to each other after Id string line removed.
+ remove entire comment blocks which only exited to
  contain CVS Ids
+ If the processing left a blank line at the top of
  a file, it was removed.
2012-05-11 08:44:13 -05:00
Joel Sherrill
33a105fb69 Revert: Remove CVS Ids
See http://www.rtems.org/pipermail/rtems-devel/2012-May/001006.html
for details.
2012-05-07 11:08:48 -05:00
Ralf Corsépius
2376237f4c Remove CVS-Ids. 2012-05-04 09:36:24 +02:00
Ralf Corsépius
5f38f20d28 Remove. 2012-05-04 09:29:07 +02:00