[sr-dev] git:master: htable: sht_lock() and sht_unlock() documented in readme

Elena-Ramona Modroiu ramona at rosdev.ro
Wed Jul 10 11:24:20 CEST 2013


Module: sip-router
Branch: master
Commit: 4a425a88be796c4b2c8447e6eafc53652ddf8e72
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=4a425a88be796c4b2c8447e6eafc53652ddf8e72

Author: Elena-Ramona Modroiu <ramona at asipto.com>
Committer: Elena-Ramona Modroiu <ramona at asipto.com>
Date:   Sat Jul  6 19:03:49 2013 +0200

htable: sht_lock() and sht_unlock() documented in readme

---

 modules/htable/README               |   32 ++++++++++++++++++++++++++++
 modules/htable/doc/htable_admin.xml |   40 +++++++++++++++++++++++++++++++++++
 2 files changed, 72 insertions(+), 0 deletions(-)

diff --git a/modules/htable/README b/modules/htable/README
index 2cf178e..3324807 100644
--- a/modules/htable/README
+++ b/modules/htable/README
@@ -51,6 +51,8 @@ Alex Balashov
               4.1. sht_print()
               4.2. sht_rm_name_re(htable=>regexp)
               4.3. sht_rm_value_re(htable=>regexp)
+              4.4. sht_lock(htable=>key)
+              4.5. sht_unlock(htable=>key)
 
         5. Exported pseudo-variables
         6. MI Commands
@@ -92,6 +94,8 @@ Alex Balashov
    1.15. sht_print usage
    1.16. sht_rm_name_re usage
    1.17. sht_rm_value_re usage
+   1.18. sht_lock usage
+   1.19. sht_unlock usage
 
 Chapter 1. Admin Guide
 
@@ -124,6 +128,8 @@ Chapter 1. Admin Guide
         4.1. sht_print()
         4.2. sht_rm_name_re(htable=>regexp)
         4.3. sht_rm_value_re(htable=>regexp)
+        4.4. sht_lock(htable=>key)
+        4.5. sht_unlock(htable=>key)
 
    5. Exported pseudo-variables
    6. MI Commands
@@ -450,6 +456,8 @@ modparam("htable", "db_expires", 1)
    4.1. sht_print()
    4.2. sht_rm_name_re(htable=>regexp)
    4.3. sht_rm_value_re(htable=>regexp)
+   4.4. sht_lock(htable=>key)
+   4.5. sht_unlock(htable=>key)
 
 4.1.  sht_print()
 
@@ -490,6 +498,30 @@ sht_rm_name_re("ha=>.*");
 sht_rm_value_re("ha=>.*");
 ...
 
+4.4.  sht_lock(htable=>key)
+
+   Lock the slot in htable corespoding to the key item.
+
+   This function can be used from ANY_ROUTE.
+
+   Example 1.18. sht_lock usage
+...
+sht_lock("ha=>test");
+...
+
+4.5.  sht_unlock(htable=>key)
+
+   Unlock the slot in htable corespoding to the key item.
+
+   This function can be used from ANY_ROUTE.
+
+   Example 1.19. sht_unlock usage
+...
+sht_lock("ha=>test");
+$sht(ha=>test) = $sht(ha=>test) + 10;
+sht_unlock("ha=>test");
+...
+
 5. Exported pseudo-variables
 
      * $sht(htable=>key)
diff --git a/modules/htable/doc/htable_admin.xml b/modules/htable/doc/htable_admin.xml
index ae7dc3d..c38e555 100644
--- a/modules/htable/doc/htable_admin.xml
+++ b/modules/htable/doc/htable_admin.xml
@@ -570,6 +570,46 @@ sht_rm_value_re("ha=>.*");
 </programlisting>
 		</example>
 	</section>
+	<section id="htable.f.sht_lock">
+		<title>
+		<function moreinfo="none">sht_lock(htable=>key)</function>
+		</title>
+		<para>
+			Lock the slot in htable corespoding to the key item.
+		</para>
+		<para>
+			This function can be used from ANY_ROUTE.
+		</para>
+		<example>
+		<title><function>sht_lock</function> usage</title>
+		<programlisting format="linespecific">
+...
+sht_lock("ha=>test");
+...
+</programlisting>
+		</example>
+	</section>
+	<section id="htable.f.sht_unlock">
+		<title>
+		<function moreinfo="none">sht_unlock(htable=>key)</function>
+		</title>
+		<para>
+			Unlock the slot in htable corespoding to the key item.
+		</para>
+		<para>
+			This function can be used from ANY_ROUTE.
+		</para>
+		<example>
+		<title><function>sht_unlock</function> usage</title>
+		<programlisting format="linespecific">
+...
+sht_lock("ha=>test");
+$sht(ha=>test) = $sht(ha=>test) + 10;
+sht_unlock("ha=>test");
+...
+</programlisting>
+		</example>
+	</section>
 	</section>
 		<section>
 		<title>Exported pseudo-variables</title>




More information about the sr-dev mailing list