* src/threads/threads-common.c (threads_table_get_threads): New
[cacao.git] / src / threads / threads-common.c
index 901e741e3ccd6792989c9fd71def634bd915a121..a23a034d198fd275880907c2aea5646615eefd00 100644 (file)
@@ -22,7 +22,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: threads-common.c 7850 2007-05-02 16:21:12Z twisti $
+   $Id: threads-common.c 7853 2007-05-02 20:40:11Z twisti $
 
 */
 
@@ -396,6 +396,20 @@ threadobject *threads_table_get(s4 index)
 }
 
 
+/* threads_table_get_threads ***************************************************
+
+   Return the number of running threads.
+
+   NOTE: This function does not lock the table.
+
+*******************************************************************************/
+
+s4 threads_table_get_threads(void)
+{
+       return threads_table.used;
+}
+
+
 /* threads_table_get_non_daemons ***********************************************
 
    Return the number of non-daemon threads.