Home | History | Annotate | Download | only in glib

Lines Matching refs:thread

69   GThread thread;
139 /* We let the main thread (the one that calls g_thread_init) inherit
276 * if we're using the default thread implementation and it provides
501 GRealThread *thread;
510 thread = g_thread_all_threads;
511 while (thread)
513 GArray *array = thread->private_data;
514 thread = thread->next;
545 GRealThread* thread = data;
546 if (thread->private_data)
548 GArray* array = thread->private_data;
561 /* We only free the thread structure, if it isn't joinable. If
563 if (!thread->thread.joinable)
570 if (t == thread)
582 g_system_thread_assign (thread->system_thread, zero_thread);
583 g_free (thread);
591 g_error ("The thread system is not yet initialized.");
623 GRealThread* thread = data;
630 /* the lock makes sure, that thread->system_thread is written,
631 before thread->thread.func is called. See g_thread_create. */
635 thread->retval = thread->thread.func (thread->thread.data);
657 result->thread.joinable = joinable;
658 result->thread.priority = priority;
659 result->thread.func = func;
660 result->thread.data = data;
692 g_thread_join (GThread* thread)
694 GRealThread* real = (GRealThread*) thread;
698 g_return_val_if_fail (thread, NULL);
699 g_return_val_if_fail (thread->joinable, NULL);
710 if (t == (GRealThread*) thread)
722 thread->joinable = 0;
725 /* the thread structure for non-joinable threads is freed upon
726 thread end. We free the memory here. This will leave a loose end,
727 if a joinable thread is not joined. */
729 g_free (thread);
735 g_thread_set_priority (GThread* thread,
738 GRealThread* real = (GRealThread*) thread;
740 g_return_if_fail (thread);
745 thread->priority = priority;
754 GRealThread* thread = g_private_get (g_thread_specific_private);
756 if (!thread)
758 /* If no thread data is available, provide and set one. This
759 can happen for the main thread and for threads, that are not
761 thread = g_new0 (GRealThread, 1);
762 thread->thread.joinable = FALSE; /* This is a save guess */
763 thread->thread.priority = G_THREAD_PRIORITY_NORMAL; /* This is
765 thread->thread.func = NULL;
766 thread->thread.data = NULL;
767 thread->private_data = NULL;
770 G_THREAD_UF (thread_self, (&thread->system_thread));
772 g_private_set (g_thread_specific_private, thread);
775 thread->next = g_thread_all_threads;
776 g_thread_all_threads = thread;
780 return (GThread*)thread;
943 * Due to thread lifetime checks, this function has an execution complexity
953 GRealThread *thread;
957 for (thread = g_thread_all_threads; thread; thread = thread->next)
958 slist = g_slist_prepend (slist, thread);
965 /* check whether the current thread still exists */
967 for (thread = g_thread_all_threads; thread; thread = thread->next)
968 if (thread == node->data)
971 if (thread)
972 thread_func (thread, user_data);