gthread.h File Reference

__G_THREAD_H__

g_thread_error_quark ( void )

G_BEGIN_DECLS IMPORT_C GQuarkg_thread_error_quark(void)

G_THREAD_ERROR

Enum GThreadError

EnumeratorValueDescription
G_THREAD_ERROR_AGAIN

Typedef GThreadFunc

typedef gpointer(*GThreadFunc

Enum GThreadPriority

Typedef GThread

typedef struct _GThreadGThread

Typedef GMutex

typedef struct _GMutexGMutex

Typedef GCond

typedef struct _GCondGCond

Typedef GPrivate

typedef struct _GPrivateGPrivate

Typedef GStaticPrivate

typedef struct _GStaticPrivateGStaticPrivate

Typedef GThreadFunctions

typedef struct _GThreadFunctionsGThreadFunctions

_g_thread_functions_for_glib_use ( void )

IMPORT_C GThreadFunctions *_g_thread_functions_for_glib_use(void)

g_thread_functions_for_glib_use

GLIB_VAR GThreadFunctionsg_thread_functions_for_glib_use

_g_thread_use_default_impl ( void )

IMPORT_C gboolean *_g_thread_use_default_impl(void)

g_thread_use_default_impl

GLIB_VAR gbooleang_thread_use_default_impl

g_thread_gettime

GLIB_VAR guint64(*g_thread_gettime

Typedef gettimetype

typedef guint64(*gettimetype

_g_threads_got_initialized ( void )

IMPORT_C gboolean *_g_threads_got_initialized(void)

_g_thread_gettime ( void )

IMPORT_C gettimetype *_g_thread_gettime(void)

g_threads_got_initialized

GLIB_VAR gbooleang_threads_got_initialized

g_thread_init ( GThreadFunctions * )

IMPORT_C voidg_thread_init(GThreadFunctions *vtable)

g_thread_supported ( void )

IMPORT_C gbooleang_thread_supported(void)

g_thread_init_with_errorcheck_mutexes ( GThreadFunctions * )

IMPORT_C voidg_thread_init_with_errorcheck_mutexes(GThreadFunctions *vtable)

g_thread_get_initialized ( void )

IMPORT_C gbooleang_thread_get_initialized(void)

g_thread_get_initialized

Indicates if g_thread_init() has been called.

Returns: TRUE if threads have been initialized.

Since: 2.20

G_MUTEX_DEBUG_MAGIC

g_static_mutex_get_mutex_impl ( GMutex ** )

IMPORT_C GMutex *g_static_mutex_get_mutex_impl(GMutex **mutex)

g_static_mutex_get_mutex_impl_shortcut

G_THREAD_UF

G_THREAD_CF

G_THREAD_ECF

g_mutex_lock

g_mutex_trylock

g_mutex_unlock

g_mutex_free

g_cond_wait

g_cond_timed_wait

g_mutex_new

g_cond_new

g_cond_signal

g_cond_broadcast

g_cond_free

g_private_new

g_private_get

g_private_set

g_thread_yield

g_thread_create

g_thread_create_full ( GThreadFunc, gpointer, gulong, gboolean, gboolean, GThreadPriority, GError ** )

IMPORT_C GThread *g_thread_create_full(GThreadFuncfunc,
gpointerdata,
gulongstack_size,
gbooleanjoinable,
gbooleanbound,
GThreadPrioritypriority,
GError **error
)

g_thread_self ( void )

IMPORT_C GThread *g_thread_self(void)

g_thread_exit ( gpointer )

IMPORT_C voidg_thread_exit(gpointerretval)

g_thread_join ( GThread * )

IMPORT_C gpointerg_thread_join(GThread *thread)

g_thread_set_priority ( GThread *, GThreadPriority )

IMPORT_C voidg_thread_set_priority(GThread *thread,
GThreadPrioritypriority
)

g_static_mutex_lock

g_static_mutex_trylock

g_static_mutex_unlock

g_static_mutex_init ( GStaticMutex * )

IMPORT_C voidg_static_mutex_init(GStaticMutex *mutex)

g_static_mutex_free ( GStaticMutex * )

IMPORT_C voidg_static_mutex_free(GStaticMutex *mutex)

G_STATIC_PRIVATE_INIT

g_static_private_init ( GStaticPrivate * )

IMPORT_C voidg_static_private_init(GStaticPrivate *private_key)

g_static_private_get ( GStaticPrivate * )

IMPORT_C gpointerg_static_private_get(GStaticPrivate *private_key)

g_static_private_set ( GStaticPrivate *, gpointer, GDestroyNotify )

IMPORT_C voidg_static_private_set(GStaticPrivate *private_key,
gpointerdata,
GDestroyNotifynotify
)

g_static_private_free ( GStaticPrivate * )

IMPORT_C voidg_static_private_free(GStaticPrivate *private_key)

Typedef GStaticRecMutex

typedef struct _GStaticRecMutexGStaticRecMutex

G_STATIC_REC_MUTEX_INIT

g_static_rec_mutex_init ( GStaticRecMutex * )

IMPORT_C voidg_static_rec_mutex_init(GStaticRecMutex *mutex)

g_static_rec_mutex_lock ( GStaticRecMutex * )

IMPORT_C voidg_static_rec_mutex_lock(GStaticRecMutex *mutex)

g_static_rec_mutex_trylock ( GStaticRecMutex * )

IMPORT_C gbooleang_static_rec_mutex_trylock(GStaticRecMutex *mutex)

g_static_rec_mutex_unlock ( GStaticRecMutex * )

IMPORT_C voidg_static_rec_mutex_unlock(GStaticRecMutex *mutex)

g_static_rec_mutex_lock_full ( GStaticRecMutex *, guint )

IMPORT_C voidg_static_rec_mutex_lock_full(GStaticRecMutex *mutex,
guintdepth
)

g_static_rec_mutex_unlock_full ( GStaticRecMutex * )

IMPORT_C guintg_static_rec_mutex_unlock_full(GStaticRecMutex *mutex)

g_static_rec_mutex_free ( GStaticRecMutex * )

IMPORT_C voidg_static_rec_mutex_free(GStaticRecMutex *mutex)

Typedef GStaticRWLock

typedef struct _GStaticRWLockGStaticRWLock

G_STATIC_RW_LOCK_INIT

g_static_rw_lock_init ( GStaticRWLock * )

IMPORT_C voidg_static_rw_lock_init(GStaticRWLock *lock)

g_static_rw_lock_reader_lock ( GStaticRWLock * )

IMPORT_C voidg_static_rw_lock_reader_lock(GStaticRWLock *lock)

g_static_rw_lock_reader_trylock ( GStaticRWLock * )

IMPORT_C gbooleang_static_rw_lock_reader_trylock(GStaticRWLock *lock)

g_static_rw_lock_reader_unlock ( GStaticRWLock * )

IMPORT_C voidg_static_rw_lock_reader_unlock(GStaticRWLock *lock)

g_static_rw_lock_writer_lock ( GStaticRWLock * )

IMPORT_C voidg_static_rw_lock_writer_lock(GStaticRWLock *lock)

g_static_rw_lock_writer_trylock ( GStaticRWLock * )

IMPORT_C gbooleang_static_rw_lock_writer_trylock(GStaticRWLock *lock)

g_static_rw_lock_writer_unlock ( GStaticRWLock * )

IMPORT_C voidg_static_rw_lock_writer_unlock(GStaticRWLock *lock)

g_static_rw_lock_free ( GStaticRWLock * )

IMPORT_C voidg_static_rw_lock_free(GStaticRWLock *lock)

g_thread_foreach ( GFunc, gpointer )

IMPORT_C voidg_thread_foreach(GFuncthread_func,
gpointeruser_data
)

g_thread_foreach : function to call for all GThread structures : second argument to

Call on all existing GThread structures. Note that threads may decide to exit while is running, so without intimate knowledge about the lifetime of foreign threads, shouldn't access the GThread* pointer passed in as first argument. However, will not be called for threads which are known to have exited already.

Due to thread lifetime checks, this function has an execution complexity which is quadratic in the number of existing threads.

Since: 2.10

Enum GOnceStatus

Typedef GOnce

typedef struct _GOnceGOnce

G_ONCE_INIT

g_once_impl ( GOnce *, GThreadFunc, gpointer )

IMPORT_C gpointerg_once_impl(GOnce *once,
GThreadFuncfunc,
gpointerarg
)

g_once

g_once_init_enter ( volatile gsize * )

G_INLINE_FUNC gbooleang_once_init_enter(volatile gsize *value_location)

g_once_init_enter_impl ( volatile gsize * )

IMPORT_C gbooleang_once_init_enter_impl(volatile gsize *value_location)

g_once_init_leave ( volatile gsize *, gsize )

IMPORT_C voidg_once_init_leave(volatile gsize *value_location,
gsizeinitialization_value
)

glib_dummy_decl ( void )

voidglib_dummy_decl(void)

G_LOCK_NAME

G_LOCK_DEFINE_STATIC

G_LOCK_DEFINE

G_LOCK_EXTERN

G_LOCK

G_UNLOCK

G_TRYLOCK