aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/sched.h
AgeCommit message (Collapse)AuthorFilesLines
2009-08-28Merged revisions 214650 via svnmerge from mmichelson1-4/+4
https://origsvn.digium.com/svn/asterisk/trunk ........ r214650 | mmichelson | 2009-08-28 13:41:23 -0500 (Fri, 28 Aug 2009) | 3 lines Fix some incorrect documentation of sched_thread functions. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@214653 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-09Add Doxygen documentation for API changes from 1.6.0 to 1.6.1jpeeler1-1/+24
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: http://svn.digium.com/svn/asterisk/trunk@180719 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-15Make ast_sched_report() and ast_sched_dump() thread safe.russell1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@175882 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-15Fix a number of problems with ast_sched_report().russell1-3/+2
1) It had numerous coding guidelines violations with regards to formatting. 2) It allocated memory using ast_calloc() that was never freed. 3) It didn't check for failure from the allocation. 4) It used sprintf() and strcat() to build the result, doing zero checking to prevent writing past the end of the provided buffer. The function also lacks API documentation, but that has not been addressed in this commit. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@175829 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-06Add a common implementation of a scheduler context with a dedicated thread.russell1-5/+115
This commit expands the Asterisk scheduler API to include a common implementation of a scheduler context being processed by a dedicated thread. chan_iax2 has been updated to use this new code. Also, as a result, this resolves some race conditions related to the previous chan_iax2 scheduler handling. Related to rev 171452 which resolved the same issues in 1.4. Code from team/russell/sched_thread2 Review: http://reviewboard.digium.com/r/129/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@173858 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-30Fix a bug in AST_SCHED_REPLACE_UNREF(). The reference count of the objectrussell1-2/+1
_must_ be increased before creating the scheduler entry. Otherwise, you create a race condition where the reference count may hit zero and the object can disappear out from under you. This could also would have incorrectly decreased the reference count in the case that the scheduler add failed. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@152887 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-17Fix the FRACK! warnings in chan_iax2 when POKE/LAGRQ packets are not answered.tilghman1-0/+16
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@150580 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-30Oops, wrong definetilghman1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@134703 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-18Merged revisions 131985 via svnmerge from tilghman1-0/+4
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r131985 | tilghman | 2008-07-18 11:46:23 -0500 (Fri, 18 Jul 2008) | 2 lines Preserve ABI compatibility with last change ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@131986 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-18Merged revisions 131970 via svnmerge from tilghman1-1/+2
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r131970 | tilghman | 2008-07-18 11:30:31 -0500 (Fri, 18 Jul 2008) | 2 lines Make the ast_assert call within ast_sched_del report something useful. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@131982 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-19Detect if the installed gcc version supports the warn_unused_result attribute.tilghman1-6/+6
Reported by mvanbaak via IRC -dev. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@123988 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-02Merged revisions 115196 via svnmerge from mmichelson1-11/+5
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r115196 | mmichelson | 2008-05-02 09:28:19 -0500 (Fri, 02 May 2008) | 6 lines Clarify a comment that was, well, just wrong. It turns out that ignoring the way that macros expand. Instead, I have clarified in the comment why the macro will work even if the scheduler id for the task to be deleted changes during the execution of the macro. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@115197 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-02Add attributes to various API calls, to help track down bugs (and remove a ↵tilghman1-7/+6
deprecated function) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@115157 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-16Introducing a small upgrade to the ast_sched_xxx facility, to keep it from ↵murf1-0/+53
eating up lots of cpu cycles. See CHANGES. From the team/murf/bug11210 branch. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@114182 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-12Merged revisions 108227 via svnmerge from mmichelson1-1/+19
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r108227 | mmichelson | 2008-03-12 16:16:28 -0500 (Wed, 12 Mar 2008) | 12 lines Added a large comment before the AST_SCHED_DEL macro to explain its purpose as well as when it is appropriate and when it is not appropriate to use it. I also removed the part of the debug message that mentions that this is probably a bug because there are some perfectly legitimate places where ast_sched_del may fail to delete an entry (e.g. when the scheduler callback manually reschedules with a new id instead of returning non-zero to tell the scheduler to reschedule with the same idea). I also raised the debug level of the debug message in AST_SCHED_DEL since it seems like it could come up quite frequently since the macro is probably being used in several places where it shouldn't be. Also removed the redundant line, file, and function information since that is provided by ast_log. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@108238 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-07Merged revisions 106704 via svnmerge from russell1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r106704 | russell | 2008-03-07 11:16:58 -0600 (Fri, 07 Mar 2008) | 8 lines Change a warning message to a debug message. This is happening quite frequently, and it is not worth spamming users with these messages unless we are pretty confident that it should never happen. As it stands today, it _will_ and _does_ happen and until that gets cleaned up a reasonable amount on the development side, let's not spam the logs of everyone else. (closes issue #12154) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@106707 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-05Merged revisions 106015 via svnmerge from tilghman1-2/+4
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r106015 | tilghman | 2008-03-05 09:17:16 -0600 (Wed, 05 Mar 2008) | 7 lines Correctly initialize retransid in SIP, and ensure that the warning when failing to delete a schedule entry can actually hit the log. (closes issue #12140) Reported by: slavon Patches: sch2.patch uploaded by slavon (license 288) (Patch slightly modified by me) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@106036 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-20Add some documentation fixupstilghman1-2/+6
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@103847 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-27With the switch to the ast_sched_replace* API in trunk, we lose the correctiontilghman1-0/+13
that was just merged from 1.4, so this is a changeover to those APIs to use the macro versions, so that we properly detect errors from ast_sched_del, instead of simply ignoring the return values. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@100497 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-27Merged revisions 100465 via svnmerge from tilghman1-0/+10
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r100465 | tilghman | 2008-01-27 15:59:53 -0600 (Sun, 27 Jan 2008) | 11 lines When deleting a task from the scheduler, ignoring the return value could possibly cause memory to be accessed after it is freed, which causes all sorts of random memory corruption. Instead, if a deletion fails, wait a bit and try again (noting that another thread could change our taskid value). (closes issue #11386) Reported by: flujan Patches: 20080124__bug11386.diff.txt uploaded by Corydon76 (license 14) Tested by: Corydon76, flujan, stuarth` ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@100488 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-21Merged revisions 83432 via svnmerge from russell1-5/+5
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r83432 | russell | 2007-09-21 09:37:20 -0500 (Fri, 21 Sep 2007) | 4 lines gcc 4.2 has a new set of warnings dealing with cosnt pointers. This set of changes gets all of Asterisk (minus chan_alsa for now) to compile with gcc 4.2. (closes issue #10774, patch from qwell) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@83433 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-17This commit adds a scheduler API call, ast_sched_replace that can be usedrussell1-0/+24
in place of a very common construct. I also used it in a number of places in chan_sip. if (id > -1) ast_sched_del(sched, id); id = ast_sched_add(sched, ...); changes to: ast_sched_replace(id, sched, ...); git-svn-id: http://svn.digium.com/svn/asterisk/trunk@79861 f38db490-d61c-443f-a65b-d21fe96a405b
2006-03-31removal of trailing whitespace and useless 'extern'rizzo1-19/+19
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@16653 f38db490-d61c-443f-a65b-d21fe96a405b
2006-03-24 Doxygen typo fix.bweschke1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@14612 f38db490-d61c-443f-a65b-d21fe96a405b
2006-03-10Doxygen reformattingoej1-47/+39
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@12491 f38db490-d61c-443f-a65b-d21fe96a405b
2005-11-29git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7221 ↵kpfleming1-0/+0
f38db490-d61c-443f-a65b-d21fe96a405b
2005-10-24Doxygen documentation update from oej (issue #5505)russell1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6847 f38db490-d61c-443f-a65b-d21fe96a405b
2005-08-30major header file cleanup: license, copyrights, descriptions, markers, etc.kpfleming1-10/+17
remove deprecated config_old.c/config_old.h remove unused cvsid.h git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6454 f38db490-d61c-443f-a65b-d21fe96a405b
2005-08-22add preliminary support for SIP timers (issue #4359)kpfleming1-0/+17
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6362 f38db490-d61c-443f-a65b-d21fe96a405b
2005-07-15add a library of timeval manipulation functions, and change a large number ↵kpfleming1-1/+1
of usses to use the new functions (bug #4504) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6146 f38db490-d61c-443f-a65b-d21fe96a405b
2005-05-03correct documentation for ast_sched_add (bug #4136)kpfleming1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5556 f38db490-d61c-443f-a65b-d21fe96a405b
2005-04-13Add sched_when function (bug #4022)markster1-0/+7
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5466 f38db490-d61c-443f-a65b-d21fe96a405b
2005-03-05Remove accidental libpri dependency (bug #3714)markster1-0/+18
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5139 f38db490-d61c-443f-a65b-d21fe96a405b
2005-01-15Repair // comments to /* */ comments (bug #3347)markster1-9/+9
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4806 f38db490-d61c-443f-a65b-d21fe96a405b
2001-11-06Version 0.1.10 from FTPmarkster1-10/+37
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@385 f38db490-d61c-443f-a65b-d21fe96a405b
1999-12-11Version 0.1.1 from FTPmarkster1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@134 f38db490-d61c-443f-a65b-d21fe96a405b
1999-10-27Version 0.1.0 from FTPmarkster1-0/+84
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@10 f38db490-d61c-443f-a65b-d21fe96a405b