| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Per task variables are inherently unsafe in SMP systems. This
patch disables them from the build and adds warnings in the
appropriate documentation and configuration sections.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The thread deletion is now supported on SMP.
This change fixes the following PRs:
PR1814: SMP race condition between stack free and dispatch
PR2035: psxcancel reveals NULL pointer access in _Thread_queue_Extract()
The POSIX cleanup handler are now called in the right context (should be
called in the context of the terminating thread).
http://pubs.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_09.html
Add a user extension the reflects a thread termination event. This is
used to reclaim the Newlib reentrancy structure (may use file
operations), the POSIX cleanup handlers and the POSIX key destructors.
|
|
|
|
|
| |
The thread restart is now supported on SMP. New test
smptests/smpthreadlife01.
|
|
|
|
|
|
|
|
|
|
| |
Thread actions are the building block for efficient implementation of
- Classic signals delivery,
- POSIX signals delivery,
- thread restart notification,
- thread delete notification,
- forced thread migration on SMP configurations, and
- the Multiprocessor Resource Sharing Protocol (MrsP).
|
| |
|
|
|
|
|
|
|
| |
Formerly POSIX keys were only enabled when POSIX threads
were enabled. Because they are a truly safe alternative
to per-task variables in an SMP system, they are being
enabled in all configurations.
|
| |
|
|
|
|
|
|
| |
This new Score Handler provides a structure to manage a
cpu_set_t plus helper routines to validate the contents
against the current system configuration.
|
|
|
|
|
| |
Tested and implemented on ARM, m68k, PowerPC and SPARC. Other
architectures need more work.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add and use _ISR_Disable_without_giant() and
_ISR_Enable_without_giant() if RTEMS_SMP is defined.
On single processor systems the ISR disable/enable was the big hammer
which ensured system-wide mutual exclusion. On SMP configurations this
no longer works since other processors do not care about disabled
interrupts on this processor and continue to execute freely.
On SMP in addition to ISR disable/enable an SMP lock must be used.
Currently we have only the Giant lock so we can check easily that ISR
disable/enable is used only in the right context.
|
|
|
|
|
|
|
|
|
|
| |
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().
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Do not redefine CPU_USE_DEFERRED_FP_SWITCH.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Delete _Thread_libc_reent and add __getreent() instead according to
__DYNAMIC_REENT__ define.
For SMP configurations __DYNAMIC_REENT__ must be defined.
A Newlib including the following patch is required:
2013-07-09 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libc/include/sys/config.h (__DYNAMIC_REENT__): Define for RTEMS.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Add and use _Scheduler_Start_idle().
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move the SMP lock implementation to the CPU port. An optimal SMP lock
implementation is highly architecture dependent. For example the memory
models may be fundamentally different.
The new SMP lock API has a flaw. It does not provide the ability to use
a local context for acquire and release pairs. Such a context is
necessary to implement for example the Mellor-Crummey and Scott (MCS)
locks. The SMP lock is currently used in _Thread_Disable_dispatch() and
_Thread_Enable_dispatch() and makes them to a giant lock acquire and
release. Since these functions do not pass state information via a
local context there is currently no use case for such a feature.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
This patch is a task from GCI 2012 which improves the Doxygen
comments in the RTEMS source.
http://www.google-melange.com/gci/task/view/google/gci2012/8013204
|
|
|
|
|
|
|
| |
This patch is a task from GCI 2012 which improves the Doxygen
comments in the RTEMS source.
http://www.google-melange.com/gci/task/view/google/gci2012/7983216
|
|
|
|
|
|
|
| |
This patch is a task from GCI 2012 which improves the Doxygen
comments in the RTEMS source.
https://google-melange.appspot.com/gci/task/view/google/gci2012/7977211
|
|
|
|
|
|
|
| |
This patch is a task from GCI 2012 which improves the Doxygen
comments in the RTEMS source.
https://google-melange.appspot.com/gci/task/view/google/gci2012/7986214
|
|
|
|
|
|
|
| |
This patch is a task from GCI 2012 which improves the Doxygen
comments in the RTEMS source.
http://www.google-melange.com/gci/task/view/google/gci2012/7976215
|
| |
|
|
|
|
|
|
|
| |
This patch is a task from GCI 2012 which improves the Doxygen
comments in the RTEMS source.
http://www.google-melange.com/gci/task/view/google/gci2012/7985215
|
|
|
|
|
|
|
| |
This patch is a task from GCI 2012 which improves the Doxygen
comments in the RTEMS source.
http://www.google-melange.com/gci/task/view/google/gci2012/7982215
|
|
|
|
|
|
|
| |
This patch is a task from GCI 2012 which improves the Doxygen
comments in the RTEMS source.
http://www.google-melange.com/gci/task/view/google/gci2012/7986213
|
|
|
|
|
|
| |
This patch is a task from GCI 2012 which improves the Doxygen
comments in the RTEMS source.
https://google-melange.appspot.com/gci/task/view/google/gci2012/7978208
|
|
|
|
| |
At the previous location, uint32_t was not available.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
PR 1938/cpukit
* score/include/rtems/score/thread.h: Removed obsolete suspend_count
field from Thread_Control.
|
|
|
|
|
| |
* score/include/rtems/score/thread.h: Ensure CBS builds with POSIX
disabled.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* rtems/include/rtems/rtems/types.h,
score/include/rtems/score/address.h,
score/include/rtems/score/apiext.h,
score/include/rtems/score/bitfield.h,
score/include/rtems/score/context.h,
score/include/rtems/score/corebarrier.h,
score/include/rtems/score/coremsg.h,
score/include/rtems/score/coremutex.h,
score/include/rtems/score/corerwlock.h,
score/include/rtems/score/coresem.h,
score/include/rtems/score/corespinlock.h,
score/include/rtems/score/interr.h, score/include/rtems/score/isr.h,
score/include/rtems/score/mpci.h, score/include/rtems/score/mppkt.h,
score/include/rtems/score/objectmp.h,
score/include/rtems/score/percpu.h,
score/include/rtems/score/priority.h,
score/include/rtems/score/rbtree.h,
score/include/rtems/score/scheduler.h,
score/include/rtems/score/smp.h, score/include/rtems/score/smplock.h,
score/include/rtems/score/stack.h,
score/include/rtems/score/states.h,
score/include/rtems/score/thread.h,
score/include/rtems/score/threadq.h,
score/include/rtems/score/threadsync.h,
score/include/rtems/score/timespec.h,
score/include/rtems/score/timestamp.h,
score/include/rtems/score/timestamp64.h,
score/include/rtems/score/tod.h, score/include/rtems/score/tqdata.h,
score/include/rtems/score/watchdog.h,
score/include/rtems/score/wkspace.h: Mark Score files as in Score
Group to improve Doxygen output.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* libcsupport/include/rtems/malloc.h, libmisc/stackchk/stackchk.h,
posix/include/rtems/posix/time.h, rtems/include/rtems/rtems/object.h,
score/include/rtems/score/apiext.h,
score/include/rtems/score/interr.h, score/include/rtems/score/mpci.h,
score/include/rtems/score/objectmp.h,
score/include/rtems/score/thread.h,
score/include/rtems/score/threadmp.h,
score/include/rtems/score/threadq.h,
score/include/rtems/score/timespec.h,
score/include/rtems/score/timestamp.h,
score/include/rtems/score/timestamp64.h,
score/include/rtems/score/tod.h,
score/include/rtems/score/watchdog.h,
score/include/rtems/score/wkspace.h: Make @brief formatting more
consistent.
* score/include/rtems/score/rbtree.h: Also reformat.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PR 1819/cpukit
* rtems/src/clocktick.c, score/Makefile.am,
score/include/rtems/score/scheduler.h,
score/include/rtems/score/schedulerpriority.h,
score/include/rtems/score/schedulersimple.h,
score/include/rtems/score/schedulersimplesmp.h,
score/include/rtems/score/thread.h,
score/inline/rtems/score/scheduler.inl: Add a scheduler entry point
which is invoked at each clock tick. _Thread_Tickle_timeslice() is
now a method owned by the Deterministic Priority Scheduler and shared
by the Simple Priority Scheduler. The Simple SMP Scheduler has its
own variation on this which does timeslicing bookkeeping on all
cores.
* score/src/schedulerprioritytick.c,
score/src/schedulersimplesmptick.c: New files.
* score/src/threadtickletimeslice.c: Removed.
|
| |
|
|
|
|
|
|
|
| |
* score/Makefile.am, score/include/rtems/score/thread.h,
score/inline/rtems/score/thread.inl: Add smp support to dispable
dispatch level accesses.
* score/src/threaddispatchdisablelevel.c: New file.
|
|
|
|
|
|
|
|
| |
PR 1788/cpukit
* score/include/rtems/score/percpu.h,
score/include/rtems/score/thread.h: Make time of last context switch
part of per cpu information since each core has a different context
switch to track.
|
|
|
|
|
|
|
| |
PR 1782/cpukit
* score/include/rtems/score/thread.h: Disable deferred FPU context
switches when SMP is enabled. Per code tracking of deferred contexts
is not implemented.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PR 1777/cpukit
* libcsupport/src/malloc_deferred.c, libcsupport/src/realloc.c,
score/Makefile.am, score/cpu/lm32/irq.c, score/cpu/nios2/irq.c,
score/include/rtems/score/coremutex.h,
score/include/rtems/score/thread.h,
score/inline/rtems/score/thread.inl, score/src/heapfree.c,
score/src/pheapwalk.c, score/src/smp.c, score/src/threaddispatch.c:
Consolidated access to _Thread_Dispatch_disable_level.
* score/src/threaddisabledispatch.c, score/src/threadenabledispatch.c:
New files.
|
|
|
|
|
|
|
| |
* rtems/src/taskresume.c, score/Makefile.am,
score/include/rtems/score/thread.h: Convert _Thread_Resume and
_Thread_Suspend into macros.
* score/src/threadresume.c, score/src/threadsuspend.c: Removed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* sapi/include/confdefs.h, score/Makefile.am,
score/include/rtems/score/scheduler.h,
score/include/rtems/score/schedulerpriority.h,
score/include/rtems/score/thread.h,
score/inline/rtems/score/scheduler.inl,
score/inline/rtems/score/schedulerpriority.inl,
score/src/scheduler.c, score/src/schedulerpriority.c,
score/src/schedulerpriorityblock.c,
score/src/schedulerpriorityschedule.c,
score/src/schedulerpriorityunblock.c,
score/src/schedulerpriorityyield.c, score/src/threadchangepriority.c,
score/src/threadclose.c, score/src/threadinitialize.c,
score/src/threadsetpriority.c, score/src/threadsettransient.c:
Significant clean up on Scheduler Plugin Interface. Names were
shortened. Missing operations added. Many scheduler files had
unneeded includes removed. Made pointer to scheduler information in
Thread_Control and Scheduler_Control a void * pointer because the
thread and scheduler wrapper should be unaware of scheduler types AND
this is broken for user provided schedulers.
* score/src/schedulerpriorityallocate.c,
score/src/schedulerpriorityenqueue.c,
score/src/schedulerpriorityenqueuefirst.c,
score/src/schedulerpriorityextract.c,
score/src/schedulerpriorityfree.c,
score/src/schedulerpriorityupdate.c: New files.
* score/src/schedulerprioritythreadschedulerallocate.c,
score/src/schedulerprioritythreadschedulerfree.c,
score/src/schedulerprioritythreadschedulerupdate.c: Removed.
|