aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authordvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b>2011-07-06 15:30:28 +0000
committerdvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b>2011-07-06 15:30:28 +0000
commitdc46f521f2ca195c265f6d7ed51899e58f3b6eb9 (patch)
treed4002d005f75e5af9b4008397e6af97fb7d0549e /res
parent357b97fb29d196a5f336d6a2879278ea135ab08c (diff)
Merged revisions 326484 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r326484 | dvossel | 2011-07-06 10:26:49 -0500 (Wed, 06 Jul 2011) | 10 lines Reverts fix for timerfd locking issue. jrose discovered a performance issue with this fix that prevents his analog phones from working when using timerfd as a timing source. Until it is understood what is causing this performance problem, this patch is being reverted. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@326485 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r--res/res_timing_timerfd.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/res/res_timing_timerfd.c b/res/res_timing_timerfd.c
index 3e686f810..ae5d2b411 100644
--- a/res/res_timing_timerfd.c
+++ b/res/res_timing_timerfd.c
@@ -162,35 +162,7 @@ static void timerfd_timer_ack(int handle, unsigned int quantity)
uint64_t expirations;
int read_result = 0;
- struct timerfd_timer *our_timer, find_helper = {
- .handle = handle,
- };
-
- if (!(our_timer = ao2_find(timerfd_timers, &find_helper, OBJ_POINTER))) {
- ast_log(LOG_ERROR, "Couldn't find timer with handle %d\n", handle);
- return;
- }
-
- if (our_timer->saved_timer.it_value.tv_nsec == 0L) {
- ast_log(LOG_DEBUG, "Reading attempt on idle timerfd.\n");
- return;
- }
-
do {
- struct itimerspec timer_status;
-
- if (timerfd_gettime(handle, &timer_status)) {
- ast_log(LOG_ERROR, "Call to timerfd_gettime() error: %s\n", strerror(errno));
- expirations = 0;
- break;
- }
-
- if ((timer_status.it_value.tv_sec == 0) && (timer_status.it_value.tv_nsec == 0)) {
- ast_log(LOG_DEBUG, "Call to timerfd_timer_ack() with disarmed timer - break now.\n");
- expirations = 0;
- break;
- }
-
read_result = read(handle, &expirations, sizeof(expirations));
if (read_result == -1) {
if (errno == EINTR || errno == EAGAIN) {