Esempio n. 1
0
static void
thread_own_mutex (MonoInternalThreadHandle internal, gpointer handle, MonoW32Handle *handle_data)
{
	/* if we are not on the current thread, there is a
	 * race condition when allocating internal->owned_mutexes */
	g_assert (mono_thread_internal_is_current_handle (internal));

	if (!MONO_HANDLE_GETVAL (internal, owned_mutexes))
		MONO_HANDLE_SETVAL(internal, owned_mutexes, GPtrArray*, g_ptr_array_new ());

	g_ptr_array_add (MONO_HANDLE_GETVAL (internal, owned_mutexes), mono_w32handle_duplicate (handle_data));
}
Esempio n. 2
0
static void
thread_own_mutex (MonoInternalThread *internal, gpointer handle, MonoW32Handle *handle_data)
{
	/* if we are not on the current thread, there is a
	 * race condition when allocating internal->owned_mutexes */
	g_assert (mono_thread_internal_is_current (internal));

	if (!internal->owned_mutexes)
		internal->owned_mutexes = g_ptr_array_new ();

	g_ptr_array_add (internal->owned_mutexes, mono_w32handle_duplicate (handle_data));
}