summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/src/timerserver.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Remove explicit file names from @fileSebastian Huber2019-02-281-1/+1
| | | | | | This makes the @file documentation independent of the actual file name. Update #3707.
* score: Avoid some deadlocks in _Once()Sebastian Huber2019-02-181-2/+3
| | | | | | | | Recursive usage of the same pthread_once_t results now in a deadlock. Previously, an error of EINVAL was returned. This usage scenario is invalid according to the POSIX pthread_once() specification. Close #3334.
* score: Use self-contained API mutexSebastian Huber2017-12-041-1/+1
| | | | | | | | | | Use a self-contained recursive mutex for API_Mutex_Control. The API mutexes are protected against asynchronous thread cancellation. Add dedicated mutexes for libatomic and TOD. Close #2629. Close #2630.
* score: Check thread resource count in timer serverSebastian Huber2017-11-161-1/+7
| | | | | | | The watchdog routines invoked by the timer server may use mutexes for synchronization. Ensure that the resource count of the timer server is zero after each watchdog routine invocation. This helps to detect broken watchdog routines.
* rtems: Rework RTEMS API to SuperCore prioritySebastian Huber2016-06-221-8/+1
| | | | | Use same structure as POSIX API for thread priority conversion to/from SuperCore.
* score: Replace watchdog handler implementationSebastian Huber2016-03-041-300/+94
| | | | | | | | | Use a red-black tree instead of delta chains. Close #2344. Update #2554. Update #2555. Close #2606.
* Introduce general purpose system server eventSebastian Huber2015-11-121-2/+2
| | | | | Use this event for the interrupt server to avoid conflicts with application events used by interrupt handlers.
* score: Add _Watchdog_Preinitialize()Sebastian Huber2015-06-131-0/+1
| | | | | | Add an assert to ensure that the watchdog is the proper state for a _Watchdog_Initialize(). This helps to detect invalid initializations which may lead to a corrupt watchdog chain.
* rtems: Use once mutex for timer server initSebastian Huber2015-05-191-2/+3
|
* score: New timer server implementationSebastian Huber2015-05-191-373/+197
| | | | | | | | Use mostly the standard watchdog operations. Use a system event for synchronization. This implementation is simpler and offers better SMP performance. Close #2131.
* score: Add header to _Watchdog_Remove()Sebastian Huber2015-05-191-3/+16
| | | | | | | | Add watchdog header parameter to _Watchdog_Remove() to be in line with the other operations. Add _Watchdog_Remove_ticks() and _Watchdog_Remove_seconds() for convenience. Update #2307.
* score: Add Watchdog_HeaderSebastian Huber2015-04-131-19/+18
| | | | | | | This type is intended to encapsulate all state to manage a watchdog chain. Update #2307.
* score: Split _Watchdog_Adjust()Sebastian Huber2015-04-131-1/+1
| | | | | | | | | Split _Watchdog_Adjust() into _Watchdog_Adjust_backward() and _Watchdog_Adjust_forward(). Remove Watchdog_Adjust_directions, _Watchdog_Adjust_seconds() and _Watchdog_Adjust_ticks(). This avoids to check the same condition again. Update #2307.
* score: Add and use PRIORITY_PSEUDO_ISRSebastian Huber2015-03-051-1/+1
|
* rtems: SMP fix for timer serverSebastian Huber2014-08-271-1/+3
|
* score: Fix _Thread_Delay_ended() on SMPSebastian Huber2014-06-201-4/+4
| | | | | | | | | | | | | | | | Suppose we have two tasks A and B and two processors. Task A is about to delete task B. Now task B calls rtems_task_wake_after(1) on the other processor. Task B will block on the Giant lock. Task A progresses with the task B deletion until it has to wait for termination. Now task B obtains the Giant lock, sets its state to STATES_DELAYING, initializes its watchdog timer and waits. Eventually _Thread_Delay_ended() is called, but now _Thread_Get() returned NULL since the thread is already marked as deleted. Thus task B remained forever in the STATES_DELAYING state. Instead of passing the thread identifier use the thread control block directly via the watchdog user argument. This makes _Thread_Delay_ended() also a bit more efficient.
* Change all references of rtems.com to rtems.org.Chris Johns2014-03-211-1/+1
|
* score: Rename tod.h to todimpl.hSebastian Huber2013-08-011-1/+1
|
* score: Merge tod implementation into one fileSebastian Huber2013-07-261-0/+1
| | | | | Delete TOD_MICROSECONDS_PER_SECOND, TOD_MICROSECONDS_TO_TICKS() and TOD_MILLISECONDS_TO_TICKS().
* score: Create thread implementation headerSebastian Huber2013-07-261-9/+2
| | | | | | | | 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.
* 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 timer implementation headerSebastian Huber2013-07-231-1/+1
| | | | | | Move implementation specific parts of timer.h and timer.inl into new header file timerimpl.h. The timer.h contains now only the application visible API.
* rtems: Basic SMP support for timer serverSebastian Huber2013-07-221-0/+29
|
* score: Create watchdog implementation headerSebastian Huber2013-07-221-1/+1
| | | | | | Move implementation specific parts of watchdog.h and watchdog.inl into new header file watchdogimpl.h. The watchdog.h contains now only the application visible API.
* 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.
* Added timer server control blockThomas Doerfler2009-11-301-261/+357
| | | | | | Removed _Timer_Server thread pointer Added _Timer_server pointer to the default timer server control block Rework of the timer server implementation.
* 2009-10-10 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2009-10-101-2/+2
| | | | * rtems/src/timerserver.c: Indentation.
* 2009-05-21 Joel Sherrill <joel.sherrill@OARcorp.com>Joel Sherrill2009-05-211-0/+6
| | | | | | PR 1413/cpukit * rtems/src/timerserver.c: Fix bug where server based timers which reinitiated themselves did not get reinserted onto timer chain.
* 2008-12-31 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius2008-12-311-5/+3
| | | | * rtems/src/timerserver.c: Remove _Timer_Server_body warnings.
* 2008-12-19 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2008-12-191-3/+6
| | | | | | * rtems/src/dpmemcreate.c: Spacing. * rtems/src/timerserver.c: Move error check to RTEMS_DEBUG. Cannot happen under normal circumstances.
* 2008-12-08 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2008-12-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | * libcsupport/src/__times.c, libmisc/cpuuse/cpuusagereport.c, libmisc/cpuuse/cpuusagereset.c, posix/src/clockgettime.c, posix/src/pthread.c, posix/src/timersettime.c, rtems/include/rtems/rtems/ratemon.h, rtems/src/clockgetsecondssinceepoch.c, rtems/src/clockgetuptime.c, rtems/src/ratemongetstatus.c, rtems/src/ratemonperiod.c, rtems/src/ratemonreportstatistics.c, rtems/src/taskwakewhen.c, rtems/src/timerfirewhen.c, rtems/src/timerserver.c, rtems/src/timerserverfirewhen.c, score/Makefile.am, score/preinstall.am, score/include/rtems/score/thread.h, score/include/rtems/score/tod.h, score/src/coretod.c, score/src/coretodget.c, score/src/coretodgetuptime.c, score/src/coretodset.c, score/src/coretodtickle.c, score/src/threaddispatch.c, score/src/threadinitialize.c: Add SuperCore handler Timestamp to provide an opaque class for the representation and manipulation of uptime, time of day, and the difference between two timestamps. By using SuperCore Timestamp, it is clear which methods and APIs really have to be struct timespec and which can be in an optimized native format. * score/include/rtems/score/timestamp.h, score/src/coretodgetuptimetimespec.c: New files.
* 2008-12-03 Joel Sherrill <joel.sherrill@OARcorp.com>Joel Sherrill2008-12-031-127/+274
| | | | | | | | | | | PR 1347/cpukit * rtems/include/rtems/rtems/timer.h, rtems/src/rtemstimer.c, rtems/src/timerreset.c, rtems/src/timerserver.c, rtems/src/timerserverfireafter.c, rtems/src/timerserverfirewhen.c, score/Makefile.am, score/include/rtems/score/watchdog.h: Rework Timer Server to ensure that the context allows for blocking, allocating memory, and acquiring semaphores and mutexes. * score/src/watchdogadjusttochain.c: New file.
* Convert to "bool".Ralf Corsepius2008-09-041-5/+5
|
* 2008-02-28 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2008-02-281-23/+32
| | | | | | | | | | | | | | * itron/include/rtems/itron/task.h, itron/src/cre_tsk.c, posix/src/pthreadcreate.c, rtems/src/taskcreate.c, rtems/src/taskdelete.c, rtems/src/timerserver.c, score/src/threadclose.c, score/src/threadcreateidle.c, score/src/threadinitialize.c: Switch task create and delete operations to using API Allocator Mutex. This moves almost all uses of the RTEMS Workspace from dispatching disabled to mutex protected which should improve deterministic behavior. The implementation was carefully done to allow task create and delete extensions to invoke more services. In particular, a task delete extension should be able to do mutex and file operations.
* 2008-01-29 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2008-01-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * itron/src/exd_tsk.c, itron/src/task.c, libmisc/capture/capture.c, libmisc/monitor/mon-config.c, libmisc/monitor/mon-driver.c, libmisc/monitor/mon-itask.c, libmisc/monitor/mon-monitor.c, libmisc/monitor/mon-mpci.c, libmisc/monitor/mon-object.c, libmisc/monitor/mon-symbols.c, posix/src/cancelrun.c, posix/src/pthreadexit.c, rtems/Makefile.am, rtems/preinstall.am, rtems/include/rtems.h, rtems/include/rtems/rtems/support.h, rtems/inline/rtems/rtems/tasks.inl, rtems/src/eventmp.c, rtems/src/msgmp.c, rtems/src/partmp.c, rtems/src/regionmp.c, rtems/src/rtemsobjectgetname.c, rtems/src/semmp.c, rtems/src/signalmp.c, rtems/src/taskdelete.c, rtems/src/taskmp.c, rtems/src/timerserver.c, score/Makefile.am, score/include/rtems/score/object.h, score/inline/rtems/score/object.inl, score/src/Unlimited.txt, score/src/objectgetnameasstring.c, score/src/threadqextractwithproxy.c: Add new Object Services collection. This changed the name of a few previously public but undocumented services and added a some new services. * rtems/include/rtems/rtems/object.h, rtems/src/rtemsbuildid.c, rtems/src/rtemsbuildname.c, rtems/src/rtemsobjectapimaximumclass.c, rtems/src/rtemsobjectapiminimumclass.c, rtems/src/rtemsobjectgetapiclassname.c, rtems/src/rtemsobjectgetapiname.c, rtems/src/rtemsobjectgetclassicname.c, rtems/src/rtemsobjectgetclassinfo.c, rtems/src/rtemsobjectidapimaximum.c, rtems/src/rtemsobjectidapiminimum.c, rtems/src/rtemsobjectidgetapi.c, rtems/src/rtemsobjectidgetclass.c, rtems/src/rtemsobjectidgetindex.c, rtems/src/rtemsobjectidgetnode.c, rtems/src/rtemsobjectsetname.c, score/src/objectapimaximumclass.c, score/src/objectgetinfo.c, score/src/objectgetinfoid.c, score/src/objectsetname.c: New files. * rtems/src/rtemsidtoname.c: Removed.
* 2007-12-14 Joel Sherrill <joel.sherrill@OARcorp.com>Joel Sherrill2007-12-141-4/+7
| | | | | | * posix/src/sleep.c, posix/src/usleep.c: Add copyright header. * rtems/src/ratemonreportstatistics.c, rtems/src/timerserver.c: Minor cleanup to improve testability and eliminate dead code.
* 2006-09-08 Ken Peters <ken.peters@jpl.nasa.gov>Joel Sherrill2006-09-081-1/+1
| | | | | | | PR 1170/rtems * rtems/src/timerserver.c: Timer Server created the TIME task with a hard-coded hexadecimal number instead of using rtems_build_name. This resulted in a byte-swapped name on some platforms.
* Include config.h.Ralf Corsepius2005-01-181-0/+4
|
* Remove stray white spaces.Ralf Corsepius2004-04-181-14/+14
|
* Remove stray white spaces.Ralf Corsepius2004-04-151-1/+0
|
* 2004-03-29 Ralf Corsepius <ralf_corsepius@rtems.org>Ralf Corsepius2004-03-291-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * rtems/include/rtems.h, rtems/include/rtems/rtems/asr.h, rtems/include/rtems/rtems/attr.h, rtems/include/rtems/rtems/clock.h, rtems/include/rtems/rtems/config.h, rtems/include/rtems/rtems/dpmem.h, rtems/include/rtems/rtems/eventset.h, rtems/include/rtems/rtems/message.h, rtems/include/rtems/rtems/modes.h, rtems/include/rtems/rtems/msgmp.h, rtems/include/rtems/rtems/options.h, rtems/include/rtems/rtems/part.h, rtems/include/rtems/rtems/ratemon.h, rtems/include/rtems/rtems/region.h, rtems/include/rtems/rtems/regionmp.h, rtems/include/rtems/rtems/sem.h, rtems/include/rtems/rtems/support.h, rtems/include/rtems/rtems/taskmp.h, rtems/include/rtems/rtems/tasks.h, rtems/include/rtems/rtems/timer.h, rtems/inline/rtems/rtems/part.inl, rtems/inline/rtems/rtems/region.inl, rtems/macros/rtems/rtems/part.inl, rtems/src/attr.c, rtems/src/dpmem.c, rtems/src/dpmemcreate.c, rtems/src/dpmemexternal2internal.c, rtems/src/dpmeminternal2external.c, rtems/src/eventseize.c, rtems/src/msg.c, rtems/src/msgmp.c, rtems/src/msgqallocate.c, rtems/src/msgqbroadcast.c, rtems/src/msgqcreate.c, rtems/src/msgqflush.c, rtems/src/msgqgetnumberpending.c, rtems/src/msgqident.c, rtems/src/msgqreceive.c, rtems/src/msgqsend.c, rtems/src/msgqsubmit.c, rtems/src/msgqtranslatereturncode.c, rtems/src/msgqurgent.c, rtems/src/part.c, rtems/src/partcreate.c, rtems/src/partident.c, rtems/src/partmp.c, rtems/src/ratemon.c, rtems/src/region.c, rtems/src/regioncreate.c, rtems/src/regionextend.c, rtems/src/regiongetsegment.c, rtems/src/regiongetsegmentsize.c, rtems/src/regionmp.c, rtems/src/regionreturnsegment.c, rtems/src/rtemstimer.c, rtems/src/sem.c, rtems/src/semcreate.c, rtems/src/semident.c, rtems/src/semmp.c, rtems/src/semobtain.c, rtems/src/semtranslatereturncode.c, rtems/src/taskcreate.c, rtems/src/taskgetnote.c, rtems/src/taskident.c, rtems/src/taskinitusers.c, rtems/src/taskmp.c, rtems/src/taskrestart.c, rtems/src/tasks.c, rtems/src/tasksetnote.c, rtems/src/taskstart.c, rtems/src/timerserver.c: Convert to using c99 fixed size types.
* 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.
* 2002-10-28 Joel Sherrill <joel@OARcorp.com>Joel Sherrill2002-10-281-0/+2
| | | | * src/timerserver.c: Add useless return to avoid warning.
* 2001-03-29 Joel Sherrill <joel@OARcorp.com>Joel Sherrill2002-03-291-57/+16
| | | | | | | | | | | * Per PR147 addressed problems when reseting and inserting a timer into a timer chain that did not honor time passage since the last time the timer server was scheduled and the new insertion. * include/rtems/rtems/timer.h, src/timerreset.c, src/timerserver.c, src/timerserverfireafter.c, src/timerserverfirewhen.c: Broke up the "reset server" routine into a set of very specific routines that allowed the server to be unscheduled, timer chains to be "synchronized" with the current time before inserting a new timer.
* 2001-01-29 Joel Sherrill <joel@OARcorp.com>Joel Sherrill2002-01-291-48/+102
| | | | | | | | | | * Fixed bug where resetting a timer that was not at the head of one of the task timer chains resulted in the Timer Server task waking up too far in the future. * Added rtems_timer_get_information() directive to support testing. * src/timerserver.c, include/rtems/rtems/timer.h, * src/timergetinfo.c: New file. * src/Makefile.am: Modified to reflect above.
* 2001-01-22 Joel Sherrill <joel@OARcorp.com>Joel Sherrill2002-01-221-19/+33
| | | | | * include/rtems/rtems/timer.h, src/timerserver.c: Add priority argument to rtems_timer_initiate_server().
* 2001-01-18 Joel Sherrill <joel@OARcorp.com>Joel Sherrill2002-01-181-1/+2
| | | | | | | * include/rtems/system.h: Only include cpuopts.h when building a multilib configuration. Some ports still need targopts.h but this small modification lets those ports work non-multilib while fixing being fixed for multilib.
* 2001-01-16 Joel Sherrill <joel@OARcorp.com>Joel Sherrill2002-01-161-0/+288
* Added task-based timers to the Timer Manager. This added three new directives: - rtems_timer_initiate_server - rtems_timer_server_fire_after - rtems_timer_server_fire_when In the process of doing this, a number of cleanups were made. * src/timerserver.c, src/timerserverfireafter.c, src/timerserverfirewhen.c: New files. * include/timer/timer.h: Added new prototypes and supporting types. * inline/rtems/rtems/timer.h, macros/rtems/rtems/timer.h: Enhanced _Timer_Is_interval_class() to cover the class TIMER_INTERVAL_ON_TASK. * src/Makefile.am: Accounted for new files. * src/rtemstimer.c: Added initialization of _Timer_Server variable. * src/timercancel.c, src/timerreset.c: Account for addition of timer classes. Also corrected the headers. * src/timercreate.c, src/timerdelete.c, src/timerfireafter.c, src/timerfireafter.c, src/timerident.c: Corrected header.