Module: kamailio
Branch: master
Commit: d46a2b9fb9b121d21f56c9b3cead7f9ad67d796f
URL: 
https://github.com/kamailio/kamailio/commit/d46a2b9fb9b121d21f56c9b3cead7f9ad67d796f

Author: Daniel-Constantin Mierla <mico...@gmail.com>
Committer: Daniel-Constantin Mierla <mico...@gmail.com>
Date: 2025-07-17T08:56:39+02:00

misctest: docs for param and function to test internal lock with threads

---

Modified: src/modules/misctest/doc/misctest_functions.xml
Modified: src/modules/misctest/doc/misctest_params.xml

---

Diff:  
https://github.com/kamailio/kamailio/commit/d46a2b9fb9b121d21f56c9b3cead7f9ad67d796f.diff
Patch: 
https://github.com/kamailio/kamailio/commit/d46a2b9fb9b121d21f56c9b3cead7f9ad67d796f.patch

---

diff --git a/src/modules/misctest/doc/misctest_functions.xml 
b/src/modules/misctest/doc/misctest_functions.xml
index 812eb4ba3b2..f3cefb0ff1d 100644
--- a/src/modules/misctest/doc/misctest_functions.xml
+++ b/src/modules/misctest/doc/misctest_functions.xml
@@ -88,6 +88,32 @@ mt_tcp_thread_exec("request $rm uri $ru");
                        <programlisting>
 ...
 mt_lock_test(100000000);
+...
+                       </programlisting>
+               </example>
+       </section>
+
+       <section id="misctest.mt_lock_threads">
+               <title>
+                       <function>mt_lock_threads(nrthreads)</function>
+               </title>
+               <para>
+                       Creates a set of threads that try to use the internal 
lock (see
+                       also lock_threads_mode parameter).
+               </para>
+               <note>
+                       <para>
+                               This is a debugging function to do locking and 
unlocking
+                               of an internal global lock from threads. It 
should not be used
+                               in production setups.
+                       </para>
+               </note>
+               <example>
+                       <title>
+                               <function>mt_lock_threads</function> 
usage</title>
+                       <programlisting>
+...
+mt_lock_threads("4");
 ...
                        </programlisting>
                </example>
diff --git a/src/modules/misctest/doc/misctest_params.xml 
b/src/modules/misctest/doc/misctest_params.xml
index 0007dbe60b6..56e31ea75e8 100644
--- a/src/modules/misctest/doc/misctest_params.xml
+++ b/src/modules/misctest/doc/misctest_params.xml
@@ -124,6 +124,26 @@ modparam("misctest", "message_data", "...")
                        <programlisting>
 ...
 modparam("misctest", "message_file", "/tmp/sip-data.txt")
+...
+                       </programlisting>
+               </example>
+       </section>
+
+       <section id="misctest.p.lock_threads_mode">
+               <title><varname>lock_threads_mode</varname> (int)</title>
+               <para>
+                       Initialize (1) or not (0) the internal lock for 
pthreads testing.
+               </para>
+               <para>
+                       Default: 0 (no initialization).
+               </para>
+               <example>
+                       <title>
+                               Set <varname>lock_threads_mode</varname> in the 
config file
+                       </title>
+                       <programlisting>
+...
+modparam("misctest", "lock_threads_mode", 1)
 ...
                        </programlisting>
                </example>

_______________________________________________
Kamailio - Development Mailing List -- sr-dev@lists.kamailio.org
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to