summaryrefslogtreecommitdiff
path: root/cdr.c
diff options
context:
space:
mode:
authorKevin P. Fleming <kpfleming@digium.com>2005-06-14 14:45:51 +0000
committerKevin P. Fleming <kpfleming@digium.com>2005-06-14 14:45:51 +0000
commit86511f89fb434314c672fc223b38b159aa270d52 (patch)
tree263f9e79c148bfd5793c8d94d3c9d9ff710730d8 /cdr.c
parentfb12b92a4374ac3c82e2c24b5d3222d1e6102052 (diff)
don't use pthread_mutex_lock
don't double-include pthread.h in utils.h, which can cause the pthread_mutex_lock warning to not be generated on some systems git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5906 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'cdr.c')
-rwxr-xr-xcdr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/cdr.c b/cdr.c
index 4b277a412..6ea359bcd 100755
--- a/cdr.c
+++ b/cdr.c
@@ -940,9 +940,9 @@ static void submit_unscheduled_batch(void)
/* schedule the submission to occur ASAP (1 ms) */
cdr_sched = ast_sched_add(sched, 1, submit_scheduled_batch, NULL);
/* signal the do_cdr thread to wakeup early and do some work (that lazy thread ;) */
- pthread_mutex_lock(&cdr_pending_lock);
+ ast_mutex_lock(&cdr_pending_lock);
pthread_cond_signal(&cdr_pending_cond);
- pthread_mutex_unlock(&cdr_pending_lock);
+ ast_mutex_unlock(&cdr_pending_lock);
}
void ast_cdr_detach(struct ast_cdr *cdr)
@@ -1017,10 +1017,10 @@ static void *do_cdr(void *data)
timeout.tv_sec = now.tv_sec + (schedms / 1000);
timeout.tv_nsec = (now.tv_usec * 1000) + ((schedms % 1000) * 1000);
/* prevent stuff from clobbering cdr_pending_cond, then wait on signals sent to it until the timeout expires */
- pthread_mutex_lock(&cdr_pending_lock);
+ ast_mutex_lock(&cdr_pending_lock);
pthread_cond_timedwait(&cdr_pending_cond, &cdr_pending_lock, &timeout);
numevents = ast_sched_runq(sched);
- pthread_mutex_unlock(&cdr_pending_lock);
+ ast_mutex_unlock(&cdr_pending_lock);
if (option_debug > 1)
ast_log(LOG_DEBUG, "Processed %d scheduled CDR batches from the run queue\n", numevents);
}