+*******************************************************************************/
+
+void threads_list_lock(void)
+{
+ if (pthread_mutex_lock(&mutex_threads_list) != 0)
+ vm_abort("threads_list_lock: pthread_mutex_lock failed: %s",
+ strerror(errno));
+}
+
+
+/* threads_list_unlock *********************************************************
+
+ Leave the threads list mutex.
+
+*******************************************************************************/
+
+void threads_list_unlock(void)
+{
+ if (pthread_mutex_unlock(&mutex_threads_list) != 0)
+ vm_abort("threads_list_unlock: pthread_mutex_unlock failed: %s",
+ strerror(errno));
+}
+
+
+/* threads_mutex_join_lock *****************************************************
+
+ Enter the join mutex.
+
+*******************************************************************************/
+
+void threads_mutex_join_lock(void)
+{
+ if (pthread_mutex_lock(&mutex_join) != 0)
+ vm_abort("threads_mutex_join_lock: pthread_mutex_lock failed: %s",
+ strerror(errno));
+}
+
+
+/* threads_mutex_join_unlock ***************************************************
+
+ Leave the join mutex.
+
+*******************************************************************************/
+
+void threads_mutex_join_unlock(void)
+{
+ if (pthread_mutex_unlock(&mutex_join) != 0)
+ vm_abort("threads_mutex_join_unlock: pthread_mutex_unlock failed: %s",
+ strerror(errno));