summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/src/tasks.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2022-02-28cpukit/rtems/src/[s-z]*.c: Change license to BSD-2Joel Sherrill1-3/+22
Updates #3053.
2020-12-02rtems: Canonicalize Doxygen @file commentsSebastian Huber1-3/+5
Use common phrases for the file brief descriptions. Update #3706.
2020-04-16Canonicalize config.h includeSebastian Huber1-1/+1
Use the following variant which was already used by most source files: #ifdef HAVE_CONFIG_H #include "config.h" #endif
2018-12-14score: Static Objects_Information initializationSebastian Huber1-81/+5
Statically allocate the objects information together with the initial set of objects either via <rtems/confdefs.h>. Provide default object informations with zero objects via librtemscpu.a. This greatly simplifies the workspace size estimate. RTEMS applications which do not use the unlimited objects option are easier to debug since all objects reside now in statically allocated objects of the right types. Close #3621.
2018-10-29score: Remove bogus thread object name supportSebastian Huber1-3/+1
Update #2514.
2016-05-20rtems: Avoid Giant lock for rtems_task_delete()Sebastian Huber1-2/+22
Update #2555.
2016-05-12rtems: Use thread state lock for signalsSebastian Huber1-47/+1
2016-05-04rtems: Remove task variablesSebastian Huber1-87/+5
Update #2494. Update #2555.
2016-04-21score: Simplify _Objects_Initialize_information()Sebastian Huber1-4/+0
Remove unused supports_global parameter. Convert _Objects_Initialize_information() to a macro to avoid use of RTEMS_MULTIPROCESSING define for each caller.
2016-02-03Use linker set for Classic User Tasks initSebastian Huber1-16/+0
Update #2408.
2016-02-03Optional POSIX Keys initializationSebastian Huber1-6/+0
Update #2408.
2016-02-03Optional Classic Tasks initializationSebastian Huber1-1/+10
Update #2408.
2016-01-08rtems: Fix warningSebastian Huber1-1/+0
2015-12-15score: Initialize thread control to zeroSebastian Huber1-15/+0
This reduces the code size of the thread initialization.
2015-12-11score: Untangle thread actionsSebastian Huber1-1/+1
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.
2015-07-23score: Introduce Thread_queue_HeadsSebastian Huber1-4/+2
Move the storage for the thread queue heads to the threads. Each thread provides a set of thread queue heads allocated from a dedicated memory pool. In case a thread blocks on a queue, then it lends its heads to the queue. In case the thread unblocks, then it takes a free set of threads from the queue. Since a thread can block on at most one queue this works. This mechanism is used in FreeBSD. The motivation for this change is to reduce the memory demands of the synchronization objects. On a 32-bit uni-processor configuration the Thread_queue_Control size is now 8 bytes, compared to 64 bytes in RTEMS 4.10 (other changes reduced the size as well).
2015-03-17Disable deprecated warning on implementation of deprecated methodsJoel Sherrill1-1/+13
2015-03-05score: Implement fine-grained locking for eventsSebastian Huber1-2/+0
Use the ISR lock of the thread object to protect the event state and use the Giant lock only for the blocking operations. Update #2273.
2014-05-07rtems: Fix ASR SMP supportSebastian Huber1-3/+14
Initialize the ISR lock only once and destroy it properly.
2014-04-15score: Simplify thread control initializationSebastian Huber1-36/+4
The thread control block contains fields that point to application configuration dependent memory areas, like the scheduler information, the API control blocks, the user extension context table, the RTEMS notepads and the Newlib re-entrancy support. Account for these areas in the configuration and avoid extra workspace allocations for these areas. This helps also to avoid heap fragementation and reduces the per thread memory due to a reduced heap allocation overhead.
2014-04-04Disable per task variables when SMP is enabledJoel Sherrill1-13/+28
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.
2014-03-31score: Thread life cycle re-implementationSebastian Huber1-12/+17
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.
2014-03-31rtems: Use thread action for signalsSebastian Huber1-1/+3
2014-03-21Change all references of rtems.com to rtems.org.Chris Johns1-1/+1
2014-03-18rtems: Include missing header fileSebastian Huber1-1/+2
2014-03-07POSIX keys now enabled in all configurations.Joel Sherrill1-1/+6
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.
2013-07-26score: Merge tod implementation into one fileSebastian Huber1-1/+0
Delete TOD_MICROSECONDS_PER_SECOND, TOD_MICROSECONDS_TO_TICKS() and TOD_MILLISECONDS_TO_TICKS().
2013-07-26score: Create object implementation headerSebastian Huber1-1/+0
Move implementation specific parts of object.h and object.inl into new header file objectimpl.h. The object.h contains now only the application visible API.
2013-07-26score: Create threadq implementation headerSebastian Huber1-1/+0
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.
2013-07-26score: Create states implementation headerSebastian Huber1-1/+0
Move implementation specific parts of states.h and states.inl into new header file statesimpl.h. The states.h contains now only the application visible API.
2013-07-24score: Merge sysstate API into one fileSebastian Huber1-1/+0
2013-07-23rtems: Create tasks implementation headerSebastian Huber1-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.
2013-07-23rtems: Create event implementation headerSebastian Huber1-0/+1
Move implementation specific parts of event.h, event.inl, eventset.h and eventset.inl into new header file eventimpl.h. The event.h contains now only the application visible API.
2013-07-23rtems: Create asr implementation headerSebastian Huber1-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.
2012-12-05rtems: Add signal post switch extension on the flySebastian Huber1-50/+0
2012-12-05score: Add API extensions post switch listSebastian Huber1-4/+7
Move post switch hook from API_extensions_Control to new API_extensions_Post_switch_control. Rename _API_extensions_Run_postswitch() in _API_extensions_Run_post_switch(). Add _API_extensions_Post_switch_list and _API_extensions_Add_post_switch().
2012-12-02score misc: Clean up Doxygen #12 (GCI 2012)Alex Ivanov1-23/+7
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/8025203
2012-11-22score: Add and use <rtems/score/userextimpl.h>Sebastian Huber1-1/+1
This file contains the parts of <rtems/score/userext.h> that are only necessary for the RTEMS implementation.
2012-10-30rtems: Add system eventsSebastian Huber1-0/+2
System events are similar to normal events. They offer a second set of events. These events are intended for internal RTEMS use and should not be used by applications (with the exception of the transient system event).
2012-10-30rtems: Reusable event implementationSebastian Huber1-2/+2
Change event implementation to enable reuse for system events.
2012-10-30rtems: Remove unused event_condition memberSebastian Huber1-1/+0
2012-05-11Remove All CVS Id Strings Possible Using a ScriptJoel Sherrill1-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.
2011-12-052011-12-05 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius1-1/+1
* rtems/src/tasks.c: Fix typos.
2011-12-022011-12-02 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius1-5/+5
* rtems/src/tasks.c: Make _RTEMS_tasks_Create_extension, _RTEMS_tasks_Start_extension, _RTEMS_tasks_Delete_extension, _RTEMS_tasks_Switch_extension, _RTEMS_tasks_Post_switch_extension static. * score/src/scheduleredf.c: Make _Scheduler_EDF_RBTree_compare_function static.
2011-07-242011-07-24 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill1-14/+7
* ftpd/ftpd.c, libcsupport/src/geteuid.c, libcsupport/src/getgroups.c, libcsupport/src/getpgrp.c, libcsupport/src/getpid.c, libcsupport/src/getppid.c, libcsupport/src/setpgid.c, libcsupport/src/setsid.c, libcsupport/src/utsname.c, libmisc/stackchk/check.c, posix/include/rtems/posix/mqueue.h, posix/inline/rtems/posix/cond.inl, posix/inline/rtems/posix/mqueue.inl, posix/inline/rtems/posix/mutex.inl, posix/inline/rtems/posix/pthread.inl, posix/inline/rtems/posix/semaphore.inl, posix/inline/rtems/posix/timer.inl, posix/src/alarm.c, posix/src/barrierattrdestroy.c, posix/src/barrierattrgetpshared.c, posix/src/barrierattrinit.c, posix/src/barrierattrsetpshared.c, posix/src/cleanuppop.c, posix/src/cleanuppush.c, posix/src/clockgetcpuclockid.c, posix/src/clockgetenableattr.c, posix/src/clockgetres.c, posix/src/clockgettime.c, posix/src/clocksetenableattr.c, posix/src/clocksettime.c, posix/src/cond.c, posix/src/condattrdestroy.c, posix/src/condattrgetpshared.c, posix/src/condattrinit.c, posix/src/condattrsetpshared.c, posix/src/condbroadcast.c, posix/src/conddefaultattributes.c, posix/src/conddestroy.c, posix/src/condinit.c, posix/src/condsignal.c, posix/src/condsignalsupp.c, posix/src/condtimedwait.c, posix/src/condwait.c, posix/src/condwaitsupp.c, posix/src/keygetspecific.c, posix/src/keyrundestructors.c, posix/src/keysetspecific.c, posix/src/mprotect.c, posix/src/mqueue.c, posix/src/mqueuecreatesupp.c, posix/src/mqueuedeletesupp.c, posix/src/mqueuegetattr.c, posix/src/mqueuenotify.c, posix/src/mqueuereceive.c, posix/src/mqueuesend.c, posix/src/mqueuesendsupp.c, posix/src/mqueuesetattr.c, posix/src/mqueuetimedreceive.c, posix/src/mqueuetimedsend.c, posix/src/mqueuetranslatereturncode.c, posix/src/mqueueunlink.c, posix/src/mutex.c, posix/src/mutexattrdestroy.c, posix/src/mutexattrgetprioceiling.c, posix/src/mutexattrgetprotocol.c, posix/src/mutexattrgetpshared.c, posix/src/mutexattrinit.c, posix/src/mutexattrsetprioceiling.c, posix/src/mutexattrsetprotocol.c, posix/src/mutexattrsetpshared.c, posix/src/mutexdestroy.c, posix/src/mutexgetprioceiling.c, posix/src/mutexinit.c, posix/src/mutexlock.c, posix/src/mutexlocksupp.c, posix/src/mutexsetprioceiling.c, posix/src/mutextimedlock.c, posix/src/mutextrylock.c, posix/src/mutexunlock.c, posix/src/nanosleep.c, posix/src/psignal.c, posix/src/psignalchecksignal.c, posix/src/psignalclearprocesssignals.c, posix/src/psignalclearsignals.c, posix/src/psignalsetprocesssignals.c, posix/src/psignalunblockthread.c, posix/src/pthreadinitthreads.c, posix/src/rwlockattrdestroy.c, posix/src/rwlockattrgetpshared.c, posix/src/rwlockattrinit.c, posix/src/rwlockattrsetpshared.c, posix/src/semaphore.c, posix/src/semaphoredeletesupp.c, posix/src/semaphorenametoid.c, posix/src/semaphorewaitsupp.c, posix/src/semclose.c, posix/src/semdestroy.c, posix/src/semgetvalue.c, posix/src/seminit.c, posix/src/semopen.c, posix/src/sempost.c, posix/src/semtimedwait.c, posix/src/semtrywait.c, posix/src/semunlink.c, posix/src/semwait.c, posix/src/sysconf.c, posix/src/testcancel.c, posix/src/ualarm.c, rtems/src/clockgetuptime.c, rtems/src/clockset.c, rtems/src/clocksetnsecshandler.c, rtems/src/clocktick.c, rtems/src/clocktodtoseconds.c, rtems/src/clocktodvalidate.c, rtems/src/dpmem.c, rtems/src/dpmemcreate.c, rtems/src/dpmemdelete.c, rtems/src/dpmemexternal2internal.c, rtems/src/dpmemident.c, rtems/src/dpmeminternal2external.c, rtems/src/event.c, rtems/src/eventmp.c, rtems/src/eventreceive.c, rtems/src/eventseize.c, rtems/src/eventsend.c, rtems/src/eventsurrender.c, rtems/src/eventtimeout.c, rtems/src/mp.c, rtems/src/msg.c, rtems/src/msgmp.c, rtems/src/msgqallocate.c, rtems/src/msgqbroadcast.c, rtems/src/msgqcreate.c, rtems/src/msgqdelete.c, rtems/src/msgqflush.c, rtems/src/msgqgetnumberpending.c, rtems/src/msgqident.c, rtems/src/msgqreceive.c, rtems/src/msgqtranslatereturncode.c, rtems/src/msgqurgent.c, rtems/src/part.c, rtems/src/partcreate.c, rtems/src/partdelete.c, rtems/src/partgetbuffer.c, rtems/src/partident.c, rtems/src/partmp.c, rtems/src/partreturnbuffer.c, rtems/src/ratemon.c, rtems/src/ratemoncancel.c, rtems/src/ratemoncreate.c, rtems/src/ratemondelete.c, rtems/src/ratemongetstatistics.c, rtems/src/ratemongetstatus.c, rtems/src/ratemonident.c, rtems/src/ratemonperiod.c, rtems/src/ratemonresetstatistics.c, rtems/src/ratemontimeout.c, rtems/src/region.c, rtems/src/regioncreate.c, rtems/src/regiondelete.c, rtems/src/regionextend.c, rtems/src/regiongetfreeinfo.c, rtems/src/regiongetinfo.c, rtems/src/regiongetsegment.c, rtems/src/regiongetsegmentsize.c, rtems/src/regionident.c, rtems/src/regionmp.c, rtems/src/regionprocessqueue.c, rtems/src/regionresizesegment.c, rtems/src/regionreturnsegment.c, rtems/src/rtemsobjectgetclassicname.c, rtems/src/rtemstimer.c, rtems/src/sem.c, rtems/src/semcreate.c, rtems/src/semdelete.c, rtems/src/semflush.c, rtems/src/semident.c, rtems/src/semmp.c, rtems/src/semobtain.c, rtems/src/semrelease.c, rtems/src/semtranslatereturncode.c, rtems/src/signal.c, rtems/src/signalcatch.c, rtems/src/signalmp.c, rtems/src/signalsend.c, rtems/src/taskcreate.c, rtems/src/taskdelete.c, rtems/src/taskgetnote.c, rtems/src/taskident.c, rtems/src/taskinitusers.c, rtems/src/taskissuspended.c, rtems/src/taskmp.c, rtems/src/taskrestart.c, rtems/src/taskresume.c, rtems/src/tasks.c, rtems/src/tasksetnote.c, rtems/src/tasksetpriority.c, rtems/src/taskstart.c, rtems/src/tasksuspend.c, rtems/src/taskwakeafter.c, rtems/src/taskwakewhen.c, rtems/src/timercancel.c, rtems/src/timercreate.c, rtems/src/timerdelete.c, rtems/src/timerfireafter.c, rtems/src/timerfirewhen.c, rtems/src/timergetinfo.c, rtems/src/timerident.c, rtems/src/timerreset.c, rtems/src/timerserverfireafter.c, rtems/src/timerserverfirewhen.c, sapi/src/debug.c, sapi/src/extension.c, sapi/src/posixapi.c, sapi/src/rtemsapi.c, score/src/apiext.c, score/src/chain.c, score/src/corebarrier.c, score/src/corebarrierrelease.c, score/src/corebarrierwait.c, score/src/coremsgbroadcast.c, score/src/coremsgclose.c, score/src/coremsgflush.c, score/src/coremsgflushsupp.c, score/src/coremsgflushwait.c, score/src/coremsginsert.c, score/src/coremsgseize.c, score/src/coremsgsubmit.c, score/src/coremutex.c, score/src/coremutexflush.c, score/src/coremutexseize.c, score/src/corerwlock.c, score/src/corerwlockobtainread.c, score/src/corerwlockobtainwrite.c, score/src/corerwlockrelease.c, score/src/coresem.c, score/src/coresemflush.c, score/src/coresemsurrender.c, score/src/corespinlock.c, score/src/corespinlockrelease.c, score/src/corespinlockwait.c, score/src/coretod.c, score/src/coretodset.c, score/src/coretodtickle.c, score/src/heap.c, score/src/interr.c, score/src/mpci.c, score/src/objectallocate.c, score/src/objectextendinformation.c, score/src/objectfree.c, score/src/objectget.c, score/src/objectgetisr.c, score/src/objectgetnext.c, score/src/objectgetnoprotection.c, score/src/objectinitializeinformation.c, score/src/objectmp.c, score/src/objectnametoid.c, score/src/objectnametoidstring.c, score/src/objectshrinkinformation.c, score/src/rbtree.c, score/src/threaddelayended.c, score/src/threadhandler.c, score/src/threadinitialize.c, score/src/threadloadenv.c, score/src/threadmp.c, score/src/threadq.c, score/src/threadqdequeue.c, score/src/threadqdequeuefifo.c, score/src/threadqdequeuepriority.c, score/src/threadqenqueue.c, score/src/threadqenqueuefifo.c, score/src/threadqenqueuepriority.c, score/src/threadqextract.c, score/src/threadqextractfifo.c, score/src/threadqextractpriority.c, score/src/threadqextractwithproxy.c, score/src/threadqfirst.c, score/src/threadqfirstfifo.c, score/src/threadqfirstpriority.c, score/src/threadqflush.c, score/src/threadqrequeue.c, score/src/threadstackallocate.c, score/src/threadstartmultitasking.c, score/src/watchdog.c, score/src/watchdogadjust.c, score/src/watchdoginsert.c, score/src/watchdogremove.c, score/src/watchdogtickle.c: Remove /*PAGE markers which were interpreted by a long dead print script.
2009-09-262009-09-26 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill1-3/+3
* libmisc/capture/capture.c, posix/src/pthread.c, rtems/src/tasks.c, score/include/rtems/score/userext.h: Eliminate use of deprecated rtems_extension. Re-add prototype for _User_extensions_Add_API_set.
2009-07-032009-07-03 Joel Sherrill <joel.sherrill@OARcorp.com>Joel Sherrill1-1/+3
* itron/src/task.c, posix/src/pthread.c, rtems/src/tasks.c, sapi/src/exinit.c, score/include/rtems/score/apiext.h, score/src/apiext.c: No APIs currently implemented use the predriver_hook so disable it until such time as it is used.
2009-01-212009-01-21 Nickolay Kolchin <nbkolchin@gmail.com>Joel Sherrill1-2/+0
Joel Sherrill <joel.sherrill@oarcorp.com> PR 1357/cpukit * rtems/src/tasks.c: Ensure creating a task with no ASR is honored.
2009-01-212009-01-21 Joel Sherrill <joel.sherrill@OARcorp.com>Joel Sherrill1-0/+1
* rtems/src/tasks.c: Initialize event_condition to 0 just because.
2009-01-06Eliminate TRUE/FALSE.Ralf Corsepius1-2/+2