[asterisk-commits] russell: branch russell/chan_refcount r82304 - /team/russell/chan_refcount/main/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Sep 12 17:55:34 CDT 2007
Author: russell
Date: Wed Sep 12 17:55:33 2007
New Revision: 82304
URL: http://svn.digium.com/view/asterisk?view=rev&rev=82304
Log:
remove channel_lock debug wrappers
Modified:
team/russell/chan_refcount/main/channel.c
Modified: team/russell/chan_refcount/main/channel.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/main/channel.c?view=diff&rev=82304&r1=82303&r2=82304
==============================================================================
--- team/russell/chan_refcount/main/channel.c (original)
+++ team/russell/chan_refcount/main/channel.c Wed Sep 12 17:55:33 2007
@@ -4825,69 +4825,6 @@
return res;
}
-/*! \brief Lock AST channel (and print debugging output)
-\note You need to enable DEBUG_CHANNEL_LOCKS for this function */
-int ast_channel_lock(struct ast_channel *chan)
-{
- int res;
-
- ast_debug(4, "====:::: Locking AST channel %s\n", chan->name);
-
- res = ast_mutex_lock(&chan->lock);
-
- if (option_debug > 3) {
-#ifdef DEBUG_THREADS
- int count = 0;
- if ((count = chan->lock.reentrancy))
- ast_debug(4, ":::=== Now have %d locks (recursive)\n", count);
-#endif
- if (!res)
- ast_debug(4, "::::==== Channel %s was locked\n", chan->name);
- if (res == EDEADLK) {
- /* We had no lock, so okey any way */
- ast_debug(4, "::::==== Channel %s was not locked by us. Lock would cause deadlock.\n", chan->name);
- }
- if (res == EINVAL) {
- ast_debug(4, "::::==== Channel %s lock failed. No mutex.\n", chan->name);
- }
- }
- return res;
-}
-
-/*! \brief Lock AST channel (and print debugging output)
-\note You need to enable DEBUG_CHANNEL_LOCKS for this function */
-int ast_channel_trylock(struct ast_channel *chan)
-{
- int res;
-
- ast_debug(3, "====:::: Trying to lock AST channel %s\n", chan->name);
-
- res = ast_mutex_trylock(&chan->lock);
-
- if (option_debug > 2) {
-#ifdef DEBUG_THREADS
- int count = 0;
- if ((count = chan->lock.reentrancy))
- ast_debug(3, ":::=== Now have %d locks (recursive)\n", count);
-#endif
- if (!res)
- ast_debug(3, "::::==== Channel %s was locked\n", chan->name);
- if (res == EBUSY) {
- /* We failed to lock */
- ast_debug(3, "::::==== Channel %s failed to lock. Not waiting around...\n", chan->name);
- }
- if (res == EDEADLK) {
- /* We had no lock, so okey any way*/
- ast_debug(3, "::::==== Channel %s was not locked. Lock would cause deadlock.\n", chan->name);
- }
- if (res == EINVAL)
- ast_debug(3, "::::==== Channel %s lock failed. No mutex.\n", chan->name);
- }
- return res;
-}
-
-#endif
-
/*
* Wrappers for various ast_say_*() functions that call the full version
* of the same functions.
More information about the asterisk-commits
mailing list