summaryrefslogtreecommitdiff
path: root/include/asterisk/timing.h
AgeCommit message (Collapse)Author
2015-05-04Modules: Make ast_module_info->self available to auxiliary sources.Corey Farrell
ast_module_info->self is often needed to register items with the core. Many modules have ad-hoc code to make this pointer available to auxiliary sources. This change updates the module build process to make the needed information available to all sources in a module. ASTERISK-25056 #close Reported by: Corey Farrell Change-Id: I18c8cd58fbcb1b708425f6757becaeca9fa91815
2014-02-07timing: Improve performance for most timing implementations.Joshua Colp
This change allows timing implementation data to be stored directly on the timer itself thus removing the requirement for many implementations to do a container lookup for the same information. This means that API calls into timing implementations can directly access the information they need instead of having to find it. Review: https://reviewboard.asterisk.org/r/3175/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407749 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-05Refactor ast_timer_ack to return an error and handle the error in timer usersMatthew Jordan
Currently, if an acknowledgement of a timer fails Asterisk will not realize that a serious error occurred and will continue attempting to use the timer's file descriptor. This can lead to situations where errors stream to the CLI/log file. This consumes significant resources, masks the actual problem that occurred (whatever caused the timer to fail in the first place), and can leave channels in odd states. This patch propagates the errors in the timing resource modules up through the timer core, and makes users of these timers handle acknowledgement failures. It also adds some defensive coding around the use of timers to prevent using bad file descriptors in off nominal code paths. Note that the patch created by the issue reporter was modified slightly for this commit and backported to 1.8, as it was originally written for Asterisk 10. Review: https://reviewboard.asterisk.org/r/2178/ (issue ASTERISK-20032) Reported by: Jeremiah Gowdy patches: jgowdy-timerfd-6-22-2012.diff uploaded by Jeremiah Gowdy (license 6358) ........ Merged revisions 375893 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 375894 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 375895 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375896 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-08Merged revisions 294278 via svnmerge from Jeff Peeler
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r294278 | jpeeler | 2010-11-08 15:59:45 -0600 (Mon, 08 Nov 2010) | 23 lines Merged revisions 294277 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r294277 | jpeeler | 2010-11-08 15:58:13 -0600 (Mon, 08 Nov 2010) | 16 lines Fix playback failure when using IAX with the timerfd module. To fix this issue the alert pipe will now be used when the timerfd module is in use. There appeared to be a race that was not solved by adding locking in the timerfd module, but needed to be there anyway. The race was between the timer being put in non-continuous mode in ast_read on the channel thread and the IAX frame scheduler queuing a frame which would enable continuous mode before the non-continuous mode event was read. This race for now is simply avoided. (closes issue #18110) Reported by: tpanton Tested by: tpanton I put tested by tpanton because it was tested on his hardware. Thanks for the remote access to debug this issue! ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@294279 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-08Fix some doxygen warnings.Leif Madsen
(closes issue #17336) Reported by: snuffy Patches: doxygen-fixes1.diff uploaded by snuffy (license 35) Tested by: russell git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@268969 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-27Improve timing interface to remember which provider provided a timerKevin P. Fleming
The ability to load/unload timing interfaces is nice, but it means that when a timer is allocated, it may come from provider A, but later provider B becomes the 'preferred' provider. If this happens, all timer API calls on the timer that was provided by provider A will actually be handed to provider B, which will say WTF and return an error. This patch changes the timer API to include a pointer to the provider of the timer handle so that future operations on the timer will be forwarded to the proper provider. (closes issue #14697) Reported by: moy Review: http://reviewboard.digium.com/r/211/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@184762 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-09Add Doxygen documentation for API changes from 1.6.0 to 1.6.1Jeff Peeler
Copied from my review board description: This is a continuation of the API changes documentation started for describing changes between releases. Most of the API changes were pretty simple needing only to be brought to attention via the new "Asterisk API Changes" list. However, if you see anything that needs further explanation feel free to supplement what is there. The current method of documenting is to add (in the header file): \version <ver number> <description of changes> and then to add the function to the change list in doxyref.h on the AstAPIChanges page. I also made sure all the functions that were newly added were tagged with \since 1.6.1. I think this is a good habit to start both for the historical aspect as well as for the future ability to easily add a "New Asterisk API" page. Review: http://reviewboard.digium.com/r/190/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@180719 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-17Update the timing API to have better support for multiple timing interfaces.Russell Bryant
1) Add module use count handling so that timing modules can be unloaded. 2) Implement unload_module() functions for the timing interface modules. 3) Allow multiple timing modules to be loaded, and use the one with the highest priority value. 4) Report which timing module is being use in the "timing test" CLI command. (closes issue #14489) Reported by: russell Review: http://reviewboard.digium.com/r/162/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@176666 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-30Add a todo for a new timing API implementation that would work for Linux systemsRussell Bryant
as of kernel 2.6.25 and glibc 2.8 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@152990 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-02Fix a bunch of places where \arg was used instead of \param. Using \argRussell Bryant
to document arguments seems logical, and does work, but is not the best thing to use. \arg in doxygen is simply for creating non-nested unordered lists. \param is the correct tag to use to document function parameters, and will come out better in the generated documentation. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@127401 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-26- add get_max_rate timing API callRussell Bryant
- change ast_settimeout() to honor max rate in edge cases of file playback (this will make some warning messages go away at the end of playing back a file) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@125332 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-16 - Fix a typo in a timing API callRussell Bryant
- Convert the last part of channel.c over to use the timing API. This would not have made a difference when using the dahdi timing module. I noticed it when trying to use another timing source. Oops. :) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@122923 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-13Merge changes from timing branchRussell Bryant
- Convert chan_iax2 to use the timing API - Convert usage of timing in the core to use the timing API instead of using DAHDI directly - Make a change to the timing API to add the set_rate() function - change the timing core to use a rwlock - merge a timing implementation, res_timing_dahdi Basic testing was successful using res_timing_dahdi git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@122523 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-12Complete the documentation for the timing API.Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@122371 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-12clarify documentation on how timer intervals should be specifiedKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@122240 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-12add infrastructure so that timing source can be a loadable module... next ↵Kevin P. Fleming
steps are to convert channel.c and chan_iax2.c to use this new API, and to move all the DAHDI-specific timing source code into a new res_timing_dahdi module git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@122062 65c4cc65-6c06-0410-ace0-fbb531ad65f3