gthread.h File Reference

#include <gerror.h>

Go to the source code of this file.

Classes

struct  _GThread
struct  _GThreadFunctions
struct  _GStaticPrivate
struct  _GStaticRecMutex
struct  _GStaticRWLock

Defines

#define GLIB_VAR   extern
#define G_THREAD_ERROR   g_thread_error_quark()
#define G_MUTEX_DEBUG_MAGIC   0xf8e18ad7
#define G_THREAD_UF(op, arglist)   (*g_thread_functions_for_glib_use . op) arglist
#define G_THREAD_CF(op, fail, arg)   (g_thread_supported () ? G_THREAD_UF (op, arg) : (fail))
#define G_THREAD_ECF(op, fail, mutex, type)
#define g_mutex_lock(mutex)   G_THREAD_CF (mutex_lock, (void)0, (mutex))
#define g_mutex_trylock(mutex)   G_THREAD_CF (mutex_trylock, TRUE, (mutex))
#define g_mutex_unlock(mutex)   G_THREAD_CF (mutex_unlock, (void)0, (mutex))
#define g_cond_wait(cond, mutex)   G_THREAD_CF (cond_wait, (void)0, (cond, mutex))
#define g_cond_timed_wait(cond, mutex, abs_time)   G_THREAD_CF (cond_timed_wait, TRUE, (cond, mutex, abs_time))
#define g_thread_supported()   (g_threads_got_initialized)
#define g_mutex_new()   G_THREAD_UF (mutex_new, ())
#define g_mutex_free(mutex)   G_THREAD_CF (mutex_free, (void)0, (mutex))
#define g_cond_new()   G_THREAD_UF (cond_new, ())
#define g_cond_signal(cond)   G_THREAD_CF (cond_signal, (void)0, (cond))
#define g_cond_broadcast(cond)   G_THREAD_CF (cond_broadcast, (void)0, (cond))
#define g_cond_free(cond)   G_THREAD_CF (cond_free, (void)0, (cond))
#define g_private_new(destructor)   G_THREAD_UF (private_new, (destructor))
#define g_private_get(private_key)
#define g_private_set(private_key, value)
#define g_thread_yield()   G_THREAD_CF (thread_yield, (void)0, ())
#define g_thread_exit()   G_THREAD_CF (thread_exit, (void)0, ())
#define g_static_mutex_lock(mutex)   g_mutex_lock (g_static_mutex_get_mutex (mutex))
#define g_static_mutex_trylock(mutex)   g_mutex_trylock (g_static_mutex_get_mutex (mutex))
#define g_static_mutex_unlock(mutex)   g_mutex_unlock (g_static_mutex_get_mutex (mutex))
#define G_STATIC_PRIVATE_INIT   { 0 }
#define G_STATIC_REC_MUTEX_INIT   { G_STATIC_MUTEX_INIT }
#define G_STATIC_RW_LOCK_INIT   { G_STATIC_MUTEX_INIT, NULL, NULL, 0, FALSE, FALSE }
#define G_LOCK_NAME(name)   g__ ## name ## _lock
#define G_LOCK_DEFINE_STATIC(name)   extern void glib_dummy_decl (void)
#define G_LOCK_DEFINE(name)   extern void glib_dummy_decl (void)
#define G_LOCK_EXTERN(name)   extern void glib_dummy_decl (void)
#define G_LOCK(name)
#define G_UNLOCK(name)
#define G_TRYLOCK(name)   (TRUE)

Typedefs

typedef void(*) GThreadFunc (gpointer value)
typedef _GThread GThread
typedef _GMutex GMutex
typedef _GCond GCond
typedef _GPrivate GPrivate
typedef _GStaticPrivate GStaticPrivate
typedef _GThreadFunctions GThreadFunctions
typedef _GStaticRecMutex GStaticRecMutex
typedef _GStaticRWLock GStaticRWLock

Enumerations

enum  GThreadError
enum  GThreadPriority

Functions

GQuark g_thread_error_quark ()
void g_thread_init (GThreadFunctions *vtable)
void g_thread_init_with_errorcheck_mutexes (GThreadFunctions *vtable)
GMutexg_static_mutex_get_mutex_impl (GMutex **mutex)
GThreadg_thread_create (GThreadFunc thread_func, gpointer arg, gulong stack_size, gboolean joinable, gboolean bound, GThreadPriority priority, GError **error)
GThreadg_thread_self (void)
void g_thread_join (GThread *thread)
void g_thread_set_priority (GThread *thread, GThreadPriority priority)
gpointer g_static_private_get (GStaticPrivate *private_key)
void g_static_private_set (GStaticPrivate *private_key, gpointer data, GDestroyNotify notify)
gpointer g_static_private_get_for_thread (GStaticPrivate *private_key, GThread *thread)
void g_static_private_set_for_thread (GStaticPrivate *private_key, GThread *thread, gpointer data, GDestroyNotify notify)
void g_static_rec_mutex_lock (GStaticRecMutex *mutex)
gboolean g_static_rec_mutex_trylock (GStaticRecMutex *mutex)
void g_static_rec_mutex_unlock (GStaticRecMutex *mutex)
void g_static_rec_mutex_lock_full (GStaticRecMutex *mutex, guint depth)
guint g_static_rec_mutex_unlock_full (GStaticRecMutex *mutex)
void g_static_rw_lock_reader_lock (GStaticRWLock *lock)
gboolean g_static_rw_lock_reader_trylock (GStaticRWLock *lock)
void g_static_rw_lock_reader_unlock (GStaticRWLock *lock)
void g_static_rw_lock_writer_lock (GStaticRWLock *lock)
gboolean g_static_rw_lock_writer_trylock (GStaticRWLock *lock)
void g_static_rw_lock_writer_unlock (GStaticRWLock *lock)
void g_static_rw_lock_free (GStaticRWLock *lock)
void glib_dummy_decl (void)

Variables

GLIB_VAR GThreadFunctions g_thread_functions_for_glib_use
GLIB_VAR gboolean g_thread_use_default_impl
GLIB_VAR gboolean g_threads_got_initialized


Define Documentation

#define g_cond_broadcast ( cond   )     G_THREAD_CF (cond_broadcast, (void)0, (cond))

Definition at line 191 of file gthread.h.

#define g_cond_free ( cond   )     G_THREAD_CF (cond_free, (void)0, (cond))

Definition at line 192 of file gthread.h.

 
#define g_cond_new (  )     G_THREAD_UF (cond_new, ())

Definition at line 189 of file gthread.h.

#define g_cond_signal ( cond   )     G_THREAD_CF (cond_signal, (void)0, (cond))

Definition at line 190 of file gthread.h.

#define g_cond_timed_wait ( cond,
mutex,
abs_time   )     G_THREAD_CF (cond_timed_wait, TRUE, (cond, mutex, abs_time))

Definition at line 166 of file gthread.h.

#define g_cond_wait ( cond,
mutex   )     G_THREAD_CF (cond_wait, (void)0, (cond, mutex))

Definition at line 164 of file gthread.h.

#define G_LOCK ( name   ) 

Definition at line 327 of file gthread.h.

#define G_LOCK_DEFINE ( name   )     extern void glib_dummy_decl (void)

Definition at line 325 of file gthread.h.

#define G_LOCK_DEFINE_STATIC ( name   )     extern void glib_dummy_decl (void)

Definition at line 324 of file gthread.h.

#define G_LOCK_EXTERN ( name   )     extern void glib_dummy_decl (void)

Definition at line 326 of file gthread.h.

#define G_LOCK_NAME ( name   )     g__ ## name ## _lock

Definition at line 291 of file gthread.h.

#define G_MUTEX_DEBUG_MAGIC   0xf8e18ad7

Definition at line 137 of file gthread.h.

#define g_mutex_free ( mutex   )     G_THREAD_CF (mutex_free, (void)0, (mutex))

Definition at line 188 of file gthread.h.

#define g_mutex_lock ( mutex   )     G_THREAD_CF (mutex_lock, (void)0, (mutex))

Definition at line 158 of file gthread.h.

 
#define g_mutex_new (  )     G_THREAD_UF (mutex_new, ())

Definition at line 187 of file gthread.h.

Referenced by gdk_init_check().

#define g_mutex_trylock ( mutex   )     G_THREAD_CF (mutex_trylock, TRUE, (mutex))

Definition at line 160 of file gthread.h.

Referenced by gdk_window_clear_area().

#define g_mutex_unlock ( mutex   )     G_THREAD_CF (mutex_unlock, (void)0, (mutex))

Definition at line 162 of file gthread.h.

Referenced by gdk_window_clear_area().

#define g_private_get ( private_key   ) 

Value:

G_THREAD_CF (private_get, \
                                                ((gpointer)private_key), \
                                                (private_key))

Definition at line 194 of file gthread.h.

#define g_private_new ( destructor   )     G_THREAD_UF (private_new, (destructor))

Definition at line 193 of file gthread.h.

#define g_private_set ( private_key,
value   ) 

Value:

G_THREAD_CF (private_set, \
                                                       (void) (private_key = \
                                                        (GPrivate*) (value)), \
                                                       (private_key, value))

Definition at line 197 of file gthread.h.

#define g_static_mutex_lock ( mutex   )     g_mutex_lock (g_static_mutex_get_mutex (mutex))

Definition at line 221 of file gthread.h.

#define g_static_mutex_trylock ( mutex   )     g_mutex_trylock (g_static_mutex_get_mutex (mutex))

Definition at line 223 of file gthread.h.

#define g_static_mutex_unlock ( mutex   )     g_mutex_unlock (g_static_mutex_get_mutex (mutex))

Definition at line 225 of file gthread.h.

#define G_STATIC_PRIVATE_INIT   { 0 }

Definition at line 232 of file gthread.h.

#define G_STATIC_REC_MUTEX_INIT   { G_STATIC_MUTEX_INIT }

Definition at line 252 of file gthread.h.

#define G_STATIC_RW_LOCK_INIT   { G_STATIC_MUTEX_INIT, NULL, NULL, 0, FALSE, FALSE }

Definition at line 271 of file gthread.h.

#define G_THREAD_CF ( op,
fail,
arg   )     (g_thread_supported () ? G_THREAD_UF (op, arg) : (fail))

Definition at line 150 of file gthread.h.

#define G_THREAD_ECF ( op,
fail,
mutex,
type   ) 

Value:

Definition at line 152 of file gthread.h.

#define G_THREAD_ERROR   g_thread_error_quark()

Definition at line 50 of file gthread.h.

 
#define g_thread_exit (  )     G_THREAD_CF (thread_exit, (void)0, ())

Definition at line 202 of file gthread.h.

 
#define g_thread_supported (  )     (g_threads_got_initialized)

Definition at line 186 of file gthread.h.

Referenced by gdk_init_check().

#define G_THREAD_UF ( op,
arglist   )     (*g_thread_functions_for_glib_use . op) arglist

Definition at line 148 of file gthread.h.

 
#define g_thread_yield (  )     G_THREAD_CF (thread_yield, (void)0, ())

Definition at line 201 of file gthread.h.

#define G_TRYLOCK ( name   )     (TRUE)

Definition at line 329 of file gthread.h.

#define G_UNLOCK ( name   ) 

Definition at line 328 of file gthread.h.

#define GLIB_VAR   extern

Definition at line 42 of file gthread.h.


Typedef Documentation

typedef struct _GCond GCond

Definition at line 76 of file gthread.h.

typedef struct _GMutex GMutex

Definition at line 75 of file gthread.h.

typedef struct _GPrivate GPrivate

Definition at line 77 of file gthread.h.

typedef struct _GStaticPrivate GStaticPrivate

Definition at line 78 of file gthread.h.

typedef struct _GStaticRecMutex GStaticRecMutex

Definition at line 244 of file gthread.h.

typedef struct _GStaticRWLock GStaticRWLock

Definition at line 260 of file gthread.h.

typedef struct _GThread GThread

Definition at line 67 of file gthread.h.

typedef void(*) GThreadFunc(gpointer value)

Definition at line 57 of file gthread.h.

typedef struct _GThreadFunctions GThreadFunctions

Definition at line 80 of file gthread.h.


Enumeration Type Documentation

enum GThreadError

Definition at line 52 of file gthread.h.

enum GThreadPriority

Definition at line 59 of file gthread.h.


Function Documentation

GMutex* g_static_mutex_get_mutex_impl ( GMutex **  mutex  ) 

gpointer g_static_private_get ( GStaticPrivate private_key  ) 

gpointer g_static_private_get_for_thread ( GStaticPrivate private_key,
GThread thread 
)

void g_static_private_set ( GStaticPrivate private_key,
gpointer  data,
GDestroyNotify  notify 
)

void g_static_private_set_for_thread ( GStaticPrivate private_key,
GThread thread,
gpointer  data,
GDestroyNotify  notify 
)

void g_static_rec_mutex_lock ( GStaticRecMutex mutex  ) 

void g_static_rec_mutex_lock_full ( GStaticRecMutex mutex,
guint  depth 
)

gboolean g_static_rec_mutex_trylock ( GStaticRecMutex mutex  ) 

void g_static_rec_mutex_unlock ( GStaticRecMutex mutex  ) 

guint g_static_rec_mutex_unlock_full ( GStaticRecMutex mutex  ) 

void g_static_rw_lock_free ( GStaticRWLock lock  ) 

void g_static_rw_lock_reader_lock ( GStaticRWLock lock  ) 

gboolean g_static_rw_lock_reader_trylock ( GStaticRWLock lock  ) 

void g_static_rw_lock_reader_unlock ( GStaticRWLock lock  ) 

void g_static_rw_lock_writer_lock ( GStaticRWLock lock  ) 

gboolean g_static_rw_lock_writer_trylock ( GStaticRWLock lock  ) 

void g_static_rw_lock_writer_unlock ( GStaticRWLock lock  ) 

GThread* g_thread_create ( GThreadFunc  thread_func,
gpointer  arg,
gulong  stack_size,
gboolean  joinable,
gboolean  bound,
GThreadPriority  priority,
GError **  error 
)

GQuark g_thread_error_quark (  ) 

void g_thread_init ( GThreadFunctions vtable  ) 

void g_thread_init_with_errorcheck_mutexes ( GThreadFunctions vtable  ) 

void g_thread_join ( GThread thread  ) 

GThread* g_thread_self ( void   ) 

void g_thread_set_priority ( GThread thread,
GThreadPriority  priority 
)

void glib_dummy_decl ( void   ) 


Variable Documentation

GLIB_VAR GThreadFunctions g_thread_functions_for_glib_use

Definition at line 117 of file gthread.h.

GLIB_VAR gboolean g_thread_use_default_impl

Definition at line 118 of file gthread.h.

GLIB_VAR gboolean g_threads_got_initialized

Definition at line 119 of file gthread.h.


Generated on Tue Jul 5 15:58:43 2011 for ROOT_528-00b_version by  doxygen 1.5.1