diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2001-04-23 16:50:12 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2001-04-23 16:50:12 +0000 |
commit | 1f9a30535942c9b35212651b7346f33824eaf55c (patch) | |
tree | 0b2425622e165dbcc8d23d4a4d14320382ad7fd0 /sched.c | |
parent | 738216b6a341fc60a581ed8cbdf62090321b4037 (diff) |
Version 0.1.8 from FTP
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@294 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'sched.c')
-rwxr-xr-x | sched.c | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -62,8 +62,10 @@ struct sched_context *sched_context_create(void) tmp->eventcnt = 1; tmp->schedcnt = 0; tmp->schedq = NULL; +#ifdef SCHED_MAX_CACHE tmp->schedc = NULL; tmp->schedccnt = 0; +#endif } return tmp; } @@ -71,6 +73,7 @@ struct sched_context *sched_context_create(void) void sched_context_destroy(struct sched_context *con) { struct sched *s, *sl; +#ifdef SCHED_MAX_CACHE /* Eliminate the cache */ s = con->schedc; while(s) { @@ -78,6 +81,7 @@ void sched_context_destroy(struct sched_context *con) s = s->next; free(sl); } +#endif /* And the queue */ s = con->schedq; while(s) { @@ -255,8 +259,14 @@ void ast_sched_dump(struct sched_context *con) struct timeval tv; time_t s, ms; gettimeofday(&tv, NULL); - ast_log(LOG_DEBUG, "Cheops Schedule Dump (%d in Q, %d Total, %d Cache)\n", - con-> schedcnt, con->eventcnt - 1, con->schedccnt); +#ifdef SCHED_MAX_CACHE + ast_log(LOG_DEBUG, "Asterisk Schedule Dump (%d in Q, %d Total, %d Cache)\n", + con-> schedcnt, con->eventcnt - 1, con->schedccnt); +#else + ast_log(LOG_DEBUG, "Asterisk Schedule Dump (%d in Q, %d Total)\n", + con-> schedcnt, con->eventcnt - 1); +#endif + ast_log(LOG_DEBUG, "=================================================\n"); ast_log(LOG_DEBUG, "|ID Callback Data Time (sec:ms) |\n"); ast_log(LOG_DEBUG, "+-----+-----------+-----------+-----------------+\n"); |