aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_timing_pthread.c
AgeCommit message (Collapse)AuthorFilesLines
2008-08-29Merged revisions 140489 via svnmerge from mmichelson1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ................ r140489 | mmichelson | 2008-08-29 12:47:17 -0500 (Fri, 29 Aug 2008) | 30 lines Merged revisions 140488 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r140488 | mmichelson | 2008-08-29 12:34:17 -0500 (Fri, 29 Aug 2008) | 22 lines After working on the ao2_containers branch, I noticed something a bit strange. In all cases where we provide a callback function to ao2_container_alloc, the callback function would only return 0 or CMP_MATCH. After inspecting the ao2_callback() code carefully, I found that if you're only looking for one specific item, then you should return CMP_MATCH | CMP_STOP. Otherwise, astobj2 will continue traversing the current bucket until the end searching for more matches. In cases like chan_iax2 where in 1.4, all the peers are shoved into a single bucket, this makes for potentially terrible performance since the entire bucket will be traversed even if the peer is one of the first ones come across in the bucket. All the changes I have made were for cases where the callback function defined was passed to ao2_container_alloc so that calls to ao2_find could find a unique instance of whatever object was being stored in the container. ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@140490 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-10All of the res/ stuff (other than res_jabber) from the RSW branch.seanbright1-5/+5
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@137028 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-26- add get_max_rate timing API callrussell1-0/+7
- 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: http://svn.digium.com/svn/asterisk/trunk@125332 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-24fix a memory leak.russell1-2/+6
(inspired by, and potentially fixes issue #12917) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@124798 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-19- Make res_timing_pthread allow a max rate of 100/sec instead of 50/secrussell1-5/+4
- change the "timing test" CLI command to let you specify a timing rate to test git-svn-id: http://svn.digium.com/svn/asterisk/trunk@124023 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-17Fix the check against the max supported raterussell1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@123393 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-16Merge res_timing_pthread. This is a timing interface for Asterisk thatrussell1-0/+480
does not require DAHDI. It's called "pthread" because it uses a pthread API call in the timing thread for sleeping and ensuring we wake up at an appropriate time. I wasn't sure what else to call it. :) The timing API requires a file descriptor that can be polled on. So, when you open a timer, this module creates a pipe and returns the read end of the pipe. There is a background thread that wakes up every 10ms and checks to see if any of the currently open timers need a 'tick' and writes to the appropriate pipe. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@122928 f38db490-d61c-443f-a65b-d21fe96a405b