[asterisk-commits] tilghman: trunk r77838 - in /trunk: CHANGES funcs/func_lock.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Jul 31 13:50:07 CDT 2007
Author: tilghman
Date: Tue Jul 31 13:50:06 2007
New Revision: 77838
URL: http://svn.digium.com/view/asterisk?view=rev&rev=77838
Log:
Add some documentation detailing an aspect of dialplan functions, as requested by Russell
Modified:
trunk/CHANGES
trunk/funcs/func_lock.c
Modified: trunk/CHANGES
URL: http://svn.digium.com/view/asterisk/trunk/CHANGES?view=diff&rev=77838&r1=77837&r2=77838
==============================================================================
--- trunk/CHANGES (original)
+++ trunk/CHANGES Tue Jul 31 13:50:06 2007
@@ -33,6 +33,10 @@
* MailboxExists converted to dialplan function
* A new option to Dial() for telling IP phones not to count the call
as "missed" when dial times out and cancels.
+ * Added LOCK(), TRYLOCK(), and UNLOCK(), which provide a single level dialplan
+ mutex. No deadlocks are possible, as LOCK() only allows a single lock to be
+ held for any given channel. Also, locks are automatically freed when a
+ channel is hung up.
CLI Changes
-----------
Modified: trunk/funcs/func_lock.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_lock.c?view=diff&rev=77838&r1=77837&r2=77838
==============================================================================
--- trunk/funcs/func_lock.c (original)
+++ trunk/funcs/func_lock.c Tue Jul 31 13:50:06 2007
@@ -200,8 +200,9 @@
.name = "UNLOCK",
.synopsis = "Unlocks a named mutex",
.desc =
-"Unlocks a previously locked mutex. Returns 1 if the channel had a lock\n"
-"or 0 otherwise.\n",
+"Unlocks a previously locked mutex. Note that it is generally unnecessary to\n"
+"unlock in a hangup routine, as any lock held is automatically freed when the\n"
+"channel is destroyed. Returns 1 if the channel had a lock or 0 otherwise.\n",
.syntax = "UNLOCK()",
.read = unlock_read,
};
More information about the asterisk-commits
mailing list