summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/src/taskmode.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Adjust interrupt mode tests for some CPU portsSebastian Huber2019-01-091-1/+3
| | | | | | | In case the robust thread dispatch is enabled by the CPU port, then the interrupt level must not be changed through the task mode. Update #3000.
* rtems: Allow to set ISR level 0 in SMP configSebastian Huber2019-01-091-0/+1
| | | | Update #3000.
* Separate task mode checksSebastian Huber2019-01-091-15/+15
| | | | Update #3000.
* rtems: Move internal structures to tasksdata.hSebastian Huber2018-11-121-1/+1
| | | | Update #3598.
* Use _Thread_Dispatch_direct()Sebastian Huber2018-02-081-1/+1
| | | | | | | Use _Thread_Dispatch_direct() for operations that block the executing thread. This ensures that we get a fatal error (INTERNAL_ERROR_BAD_THREAD_DISPATCH_DISABLE_LEVEL) if we try to block in an invalid context, e.g. during system start or an interrupt handler.
* rtems: Fix rtems_task_mode()Sebastian Huber2018-01-191-8/+0
| | | | | | | | | | | A rtems_configuration_is_smp_enabled() inside a !defined( RTEMS_SMP) block makes no sense. Remove !defined( RTEMS_SMP ) conditions. Test tm04 works now again. Update #3000.
* taskmode.c: Ensure all error checking is done before modifying executingJoel Sherrill2017-12-061-3/+31
| | | | | | | Also use single conditional expressions to simplify error checking. Combined, this all resulted in a block of SMP enabled error checking. Updates #3000.
* score: Use thread state lock for current stateSebastian Huber2016-05-121-2/+2
| | | | | | | In addition protect scheduler of thread by thread state lock. Enables use of scheduler per-instance locks. Update #2555.
* rtems: Use thread state lock for signalsSebastian Huber2016-05-121-2/+4
|
* score: Introduce thread state lockSebastian Huber2016-05-121-1/+3
| | | | Update #2556.
* rtems: Avoid Giant lock for signalsSebastian Huber2016-05-061-2/+2
| | | | Update #2555.
* rtems: Avoid Giant lock in rtems_task_mode()Sebastian Huber2016-03-171-3/+4
| | | | Update #2555.
* score: Untangle thread actionsSebastian Huber2015-12-111-1/+3
| | | | | | | Remove the thread action handler parameter from _Thread_Action_initialize() and instead set it later in _Thread_Add_post_switch_action(). This avoids a dependency on the thread action handler via the thread initialization.
* score: Add scheduler acquire/releaseSebastian Huber2015-03-241-3/+3
| | | | | | | This is currently a global lock for all scheduler instances. It should get replaced with one lock per scheduler instance in the future. Update #2273.
* score: Update _Thread_Heir only if necessarySebastian Huber2015-03-051-35/+15
| | | | | | | | | | | | | | | | | | | | Previously, the _Thread_Heir was updated unconditionally in case a new heir was determined. The _Thread_Dispatch_necessary was only updated in case the executing thread was preemptible or an internal thread was unblocked. Change this to update the _Thread_Heir and _Thread_Dispatch_necessary only in case the currently selected heir thread is preemptible or a dispatch is forced. Move the schedule decision into the change priority operation and use the schedule operation only in rtems_task_mode() in case preemption is enabled or an ASR dispatch is necessary. This is a behaviour change. Previously, the RTEMS_NO_PREEMPT also prevented signal delivery in certain cases (not always). Now, signal delivery is no longer influenced by RTEMS_NO_PREEMPT. Since the currently selected heir thread is used to determine if a new heir is chosen, non-preemptible heir threads currently not executing now prevent a new heir. This may have an application impact, see change test tm04. Document this change in sp04. Update #2273.
* score: Delete _Thread_Ticks_per_timesliceSebastian Huber2014-04-071-1/+2
| | | | Use the Configuration instead.
* rtems: Use thread action for signalsSebastian Huber2014-03-311-0/+4
|
* Change all references of rtems.com to rtems.org.Chris Johns2014-03-211-1/+1
|
* taskmode: Formatting correctionJoel Sherrill2014-03-051-5/+3
|
* smp: Add and use _Assert_Owner_of_giant()Sebastian Huber2013-08-301-2/+2
| | | | | | | | | | | | | | 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.
* smp: Support ASR path in rtems_task_mode()Sebastian Huber2013-08-051-0/+14
|
* score: Move _Thread_Dispatch_if_necessary()Sebastian Huber2013-07-301-1/+20
| | | | Rename to _RTEMS_Tasks_Dispatch_if_necessary().
* score: Create thread implementation headerSebastian Huber2013-07-261-13/+3
| | | | | | | | 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.
* score: Merge sysstate API into one fileSebastian Huber2013-07-241-1/+0
|
* rtems: Create tasks implementation headerSebastian Huber2013-07-231-1/+1
| | | | | | Move implementation specific parts of tasks.h and tasks.inl into new header file tasksimpl.h. The tasks.h contains now only the application visible API.
* rtems: Create asr implementation headerSebastian Huber2013-07-231-0/+1
| | | | | | Move implementation specific parts of asr.h and asr.inl into new header file asrimpl.h. The asr.h contains now only the application visible API.
* rtems: Create modes implementation headerSebastian Huber2013-07-231-1/+1
| | | | | | Move implementation specific parts of modes.h and modes.inl into new header file modesimpl.h. The modes.h contains now only the application visible API.
* score: Error for non-preemptible tasks on SMPSebastian Huber2013-07-221-1/+12
| | | | | | | 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.
* rtems: Use _Thread_Get_executing()Sebastian Huber2013-07-221-1/+1
|
* score: Add and use _Thread_Dispatch_if_necessary()Sebastian Huber2013-06-141-4/+1
| | | | | | | | | 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().
* rtems: Simplify rtems_task_mode()Sebastian Huber2013-06-141-6/+4
|
* rtems misc: Clean up Doxygen GCI Task #7Alex Ivanov2012-12-051-18/+7
| | | | http://www.google-melange.com/gci/task/view/google/gci2012/7950206
* score: Add and use <rtems/score/userextimpl.h>Sebastian Huber2012-11-221-1/+0
| | | | | This file contains the parts of <rtems/score/userext.h> that are only necessary for the RTEMS implementation.
* Remove All CVS Id Strings Possible Using a ScriptJoel Sherrill2012-05-111-2/+0
| | | | | | | | | | | | 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.
* 2010-07-26 Joel Sherrill <joel.sherrilL@OARcorp.com>Joel Sherrill2010-07-271-10/+6
| | | | | | * rtems/src/taskmode.c, score/inline/rtems/score/thread.inl: Rework a bit to eliminate unreachable path for task blocked while calling rtems_task_mode() on itself.
* 2010-06-28 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2010-06-291-1/+0
| | | | | | | | | | | | | | | | | | | PR 1573/cpukit * configure.ac, posix/src/killinfo.c, posix/src/psignalclearprocesssignals.c, posix/src/psignalsetprocesssignals.c, posix/src/psignalunblockthread.c, posix/src/pthreadcreate.c, posix/src/pthreadkill.c, posix/src/pthreadsigmask.c, rtems/src/signalsend.c, rtems/src/taskmode.c, score/Makefile.am, score/preinstall.am, score/include/rtems/system.h, score/include/rtems/score/context.h, score/include/rtems/score/isr.h, score/include/rtems/score/thread.h, score/src/isr.c, score/src/isrthreaddispatch.c, score/src/thread.c, score/src/threaddispatch.c, score/src/threadloadenv.c: Add a per cpu data structure which contains the information required by RTEMS for each CPU core. This encapsulates information such as thread executing, heir, idle and dispatch needed. * score/include/rtems/score/percpu.h, score/src/percpu.c: New files.
* 2009-09-04 Sebastian Huber <Sebastian.Huber@embedded-brains.de>Joel Sherrill2009-09-041-1/+1
| | | | | | | | * rtems/src/taskmode.c, sapi/src/exshutdown.c, score/include/rtems/score/sysstate.h, score/inline/rtems/score/sysstate.inl: Added _System_state_Is_shutdown(). Removed direct uses of _System_state_Current. Documentation.
* Eliminate TRUE/FALSE.Ralf Corsepius2009-01-061-3/+3
|
* Convert to "bool".Ralf Corsepius2008-09-041-5/+5
|
* 2008-08-05 Xudong Guan <xudong.guan@criticalsoftware.com>Joel Sherrill2008-08-051-2/+3
| | | | | | | | | PR 1212/cpukit * rtems/src/taskmode.c, score/src/threadtickletimeslice.c: Time slicing will not happen if the task mode is changed from a non-timeslicing mode to timeslicing mode if it is done by the executing thread (e.g. in its task body). This change includes sp44 to demonstrate the problem and verify the correction.
* Include config.h.Ralf Corsepius2005-01-181-0/+4
|
* 2004-05-06 Joel Sherrill <joel@OARcorp.com>Joel Sherrill2004-05-061-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR 618/rtems * rtems/include/rtems/rtems/status.h, rtems/src/clockget.c, rtems/src/clockset.c, rtems/src/dpmemcreate.c, rtems/src/dpmemexternal2internal.c, rtems/src/dpmeminternal2external.c, rtems/src/eventmp.c, rtems/src/eventreceive.c, rtems/src/eventsend.c, rtems/src/msgqbroadcast.c, rtems/src/msgqcreate.c, rtems/src/msgqflush.c, rtems/src/msgqgetnumberpending.c, rtems/src/msgqreceive.c, rtems/src/msgqsubmit.c, rtems/src/partcreate.c, rtems/src/partdelete.c, rtems/src/partgetbuffer.c, rtems/src/ratemoncancel.c, rtems/src/ratemoncreate.c, rtems/src/ratemondelete.c, rtems/src/ratemongetstatus.c, rtems/src/ratemonident.c, rtems/src/ratemonperiod.c, rtems/src/regioncreate.c, rtems/src/regiondelete.c, rtems/src/regionextend.c, rtems/src/regiongetsegment.c, rtems/src/regiongetsegmentsize.c, rtems/src/regionreturnsegment.c, rtems/src/semcreate.c, rtems/src/semdelete.c, rtems/src/semflush.c, rtems/src/semident.c, rtems/src/taskcreate.c, rtems/src/taskgetnote.c, rtems/src/taskmode.c, rtems/src/taskrestart.c, rtems/src/taskresume.c, rtems/src/tasksetnote.c, rtems/src/tasksuspend.c, rtems/src/taskvariableadd.c, rtems/src/taskvariabledelete.c, rtems/src/taskvariableget.c, rtems/src/taskwakewhen.c, rtems/src/timercreate.c, rtems/src/timerdelete.c, rtems/src/timerfireafter.c, rtems/src/timerfirewhen.c, rtems/src/timerserverfireafter.c, rtems/src/timerserverfirewhen.c, score/include/rtems/score/object.h, score/src/coretodvalidate.c, score/src/objectnametoid.c: Add NULL checks.
* Remove stray white spaces.Ralf Corsepius2004-04-181-1/+1
|
* 2003-09-04 Joel Sherrill <joel@OARcorp.com>Joel Sherrill2003-09-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * include/rtems.h, include/rtems/rtems/asr.h, include/rtems/rtems/attr.h, include/rtems/rtems/cache.h, include/rtems/rtems/clock.h, include/rtems/rtems/config.h, include/rtems/rtems/dpmem.h, include/rtems/rtems/event.h, include/rtems/rtems/eventmp.h, include/rtems/rtems/eventset.h, include/rtems/rtems/intr.h, include/rtems/rtems/message.h, include/rtems/rtems/modes.h, include/rtems/rtems/mp.h, include/rtems/rtems/msgmp.h, include/rtems/rtems/options.h, include/rtems/rtems/part.h, include/rtems/rtems/partmp.h, include/rtems/rtems/ratemon.h, include/rtems/rtems/region.h, include/rtems/rtems/regionmp.h, include/rtems/rtems/rtemsapi.h, include/rtems/rtems/sem.h, include/rtems/rtems/semmp.h, include/rtems/rtems/signal.h, include/rtems/rtems/signalmp.h, include/rtems/rtems/status.h, include/rtems/rtems/support.h, include/rtems/rtems/taskmp.h, include/rtems/rtems/tasks.h, include/rtems/rtems/timer.h, include/rtems/rtems/types.h, inline/rtems/rtems/asr.inl, inline/rtems/rtems/attr.inl, inline/rtems/rtems/dpmem.inl, inline/rtems/rtems/event.inl, inline/rtems/rtems/eventset.inl, inline/rtems/rtems/message.inl, inline/rtems/rtems/modes.inl, inline/rtems/rtems/options.inl, inline/rtems/rtems/part.inl, inline/rtems/rtems/ratemon.inl, inline/rtems/rtems/region.inl, inline/rtems/rtems/sem.inl, inline/rtems/rtems/status.inl, inline/rtems/rtems/support.inl, inline/rtems/rtems/tasks.inl, inline/rtems/rtems/timer.inl, macros/rtems/rtems/asr.inl, macros/rtems/rtems/attr.inl, macros/rtems/rtems/dpmem.inl, macros/rtems/rtems/event.inl, macros/rtems/rtems/eventset.inl, macros/rtems/rtems/message.inl, macros/rtems/rtems/modes.inl, macros/rtems/rtems/options.inl, macros/rtems/rtems/part.inl, macros/rtems/rtems/ratemon.inl, macros/rtems/rtems/region.inl, macros/rtems/rtems/sem.inl, macros/rtems/rtems/status.inl, macros/rtems/rtems/support.inl, macros/rtems/rtems/tasks.inl, macros/rtems/rtems/timer.inl, src/attr.c, src/clockget.c, src/clockset.c, src/clocktick.c, src/dpmem.c, src/dpmemcreate.c, src/dpmemdelete.c, src/dpmemexternal2internal.c, src/dpmemident.c, src/dpmeminternal2external.c, src/event.c, src/eventmp.c, src/eventreceive.c, src/eventseize.c, src/eventsend.c, src/eventsurrender.c, src/eventtimeout.c, src/intr.c, src/intrbody.c, src/intrcatch.c, src/mp.c, src/msg.c, src/msgmp.c, src/msgqallocate.c, src/msgqbroadcast.c, src/msgqcreate.c, src/msgqdelete.c, src/msgqflush.c, src/msgqgetnumberpending.c, src/msgqident.c, src/msgqreceive.c, src/msgqsend.c, src/msgqsubmit.c, src/msgqtranslatereturncode.c, src/msgqurgent.c, src/part.c, src/partcreate.c, src/partdelete.c, src/partgetbuffer.c, src/partident.c, src/partmp.c, src/partreturnbuffer.c, src/ratemon.c, src/ratemoncancel.c, src/ratemoncreate.c, src/ratemondelete.c, src/ratemongetstatus.c, src/ratemonident.c, src/ratemonperiod.c, src/ratemontimeout.c, src/region.c, src/regioncreate.c, src/regiondelete.c, src/regionextend.c, src/regiongetinfo.c, src/regiongetsegment.c, src/regiongetsegmentsize.c, src/regionident.c, src/regionmp.c, src/regionreturnsegment.c, src/rtclock.c, src/rtemsidtoname.c, src/rtemstimer.c, src/sem.c, src/semcreate.c, src/semdelete.c, src/semflush.c, src/semident.c, src/semmp.c, src/semobtain.c, src/semrelease.c, src/semtranslatereturncode.c, src/signal.c, src/signalcatch.c, src/signalmp.c, src/signalsend.c, src/taskcreate.c, src/taskdelete.c, src/taskgetnote.c, src/taskident.c, src/taskinitusers.c, src/taskissuspended.c, src/taskmode.c, src/taskmp.c, src/taskrestart.c, src/taskresume.c, src/tasks.c, src/tasksetnote.c, src/tasksetpriority.c, src/taskstart.c, src/tasksuspend.c, src/taskvariableadd.c, src/taskvariabledelete.c, src/taskvariableget.c, src/taskwakeafter.c, src/taskwakewhen.c, src/timercancel.c, src/timercreate.c, src/timerdelete.c, src/timerfireafter.c, src/timerfirewhen.c, src/timergetinfo.c, src/timerident.c, src/timerreset.c, src/timerserver.c, src/timerserverfireafter.c, src/timerserverfirewhen.c: URL for license changed.
* 2001-01-16 Joel Sherrill <joel@OARcorp.com>Joel Sherrill2002-01-161-2/+3
| | | | | * src/taskmode.c: Ensure the this service does not dispatch before tasking is enabled at initialization time.
* Updated copyright notice.Joel Sherrill1999-11-171-2/+1
|
* Split Task Manager into multiple files. Eventually this effort willJoel Sherrill1999-05-171-0/+122
reduce the size of executables.