return ret;
}
-void mono_thread_new_init (intptr_t tid, gpointer stack_start, gpointer func)
+/**
+ * mono_thread_new_init:
+ */
+void
+mono_thread_new_init (intptr_t tid, gpointer stack_start, gpointer func)
{
if (mono_thread_start_cb) {
mono_thread_start_cb (tid, stack_start, func);
}
}
-void mono_threads_set_default_stacksize (guint32 stacksize)
+/**
+ * mono_threads_set_default_stacksize:
+ */
+void
+mono_threads_set_default_stacksize (guint32 stacksize)
{
default_stacksize = stacksize;
}
-guint32 mono_threads_get_default_stacksize (void)
+/**
+ * mono_threads_get_default_stacksize:
+ */
+guint32
+mono_threads_get_default_stacksize (void)
{
return default_stacksize;
}
return internal;
}
+/**
+ * mono_thread_create:
+ */
void
mono_thread_create (MonoDomain *domain, gpointer func, gpointer arg)
{
return (NULL != mono_thread_create_internal (domain, func, arg, MONO_THREAD_CREATE_FLAGS_NONE, error));
}
+/**
+ * mono_thread_attach:
+ */
MonoThread *
mono_thread_attach (MonoDomain *domain)
{
*/
}
+/**
+ * mono_thread_detach:
+ */
void
mono_thread_detach (MonoThread *thread)
{
mono_thread_detach_internal (thread->internal_thread);
}
-/*
+/**
* mono_thread_detach_if_exiting:
*
- * Detach the current thread from the runtime if it is exiting, i.e. it is running pthread dtors.
+ * Detach the current thread from the runtime if it is exiting, i.e. it is running pthread dtors.
* This should be used at the end of embedding code which calls into managed code, and which
- * can be called from pthread dtors, like dealloc: implementations in objective-c.
+ * can be called from pthread dtors, like <code>dealloc:</code> implementations in Objective-C.
*/
mono_bool
mono_thread_detach_if_exiting (void)
return TRUE;
}
+/**
+ * mono_thread_exit:
+ */
void
mono_thread_exit (void)
{
return res;
}
-/*
+/**
* mono_thread_get_name_utf8:
- *
- * Return the name of the thread in UTF-8.
+ * \returns the name of the thread in UTF-8.
* Return NULL if the thread has no name.
* The returned memory is owned by the caller.
*/
return tname;
}
-/*
+/**
* mono_thread_get_managed_id:
- *
- * Return the Thread.ManagedThreadId value of `thread`.
- * Returns -1 if `thread` is NULL.
+ * \returns the \c Thread.ManagedThreadId value of \p thread.
+ * Returns \c -1 if \p thread is NULL.
*/
int32_t
mono_thread_get_managed_id (MonoThread *thread)
return result;
}
+/**
+ * mono_thread_current:
+ */
MonoThread *
mono_thread_current (void)
{
return found;
}
+/**
+ * mono_thread_stop:
+ */
void
mono_thread_stop (MonoThread *thread)
{
mono_thread_attach_cb = attach_cb;
}
-void mono_thread_cleanup (void)
+/**
+ * mono_thread_cleanup:
+ */
+void
+mono_thread_cleanup (void)
{
#if !defined(RUN_IN_SUBTHREAD) && !defined(HOST_WIN32)
/* The main thread must abandon any held mutexes (particularly
mono_thread_cleanup_fn = func;
}
+/**
+ * mono_thread_set_manage_callback:
+ */
void
mono_thread_set_manage_callback (MonoThread *thread, MonoThreadManageCallback func)
{
}
}
-void mono_thread_manage (void)
+/**
+ * mono_thread_manage:
+ */
+void
+mono_thread_manage (void)
{
struct wait_data wait_data;
struct wait_data *wait = &wait_data;
mono_thread_info_safe_suspend_and_run (thread_get_tid (thread), FALSE, suspend_for_shutdown_critical, NULL);
}
-/*
+/**
* mono_thread_is_foreign:
- * @thread: the thread to query
+ * \param thread the thread to query
*
* This function allows one to determine if a thread was created by the mono runtime and has
- * a well defined lifecycle or it's a foreigh one, created by the native environment.
+ * a well defined lifecycle or it's a foreign one, created by the native environment.
*
- * Returns: TRUE if @thread was not created by the runtime.
+ * \returns TRUE if \p thread was not created by the runtime.
*/
mono_bool
mono_thread_is_foreign (MonoThread *thread)