summaryrefslogtreecommitdiff
path: root/glib/gthread.h
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2011-09-21 14:57:22 -0400
committerRyan Lortie <desrt@desrt.ca>2011-09-21 16:09:05 -0400
commit24652730a9faaedb19b9e90024077eb7f75a6907 (patch)
tree51ef2af1604556506e010e5e39f9df92ede8d71a /glib/gthread.h
parentaecec33c4949e022abe6b335f83223495004c09f (diff)
downloadglib-24652730a9faaedb19b9e90024077eb7f75a6907.tar.gz
Deprecate GStatic{,Rec,RW}Mutex
The new versions use the primatives of the OS directly and don't have an annoying ABI.
Diffstat (limited to 'glib/gthread.h')
-rw-r--r--glib/gthread.h65
1 files changed, 0 insertions, 65 deletions
diff --git a/glib/gthread.h b/glib/gthread.h
index 9cde985c2..ab2e5cd8d 100644
--- a/glib/gthread.h
+++ b/glib/gthread.h
@@ -149,28 +149,6 @@ void g_thread_yield (void);
void g_thread_foreach (GFunc thread_func,
gpointer user_data);
-#ifdef G_OS_WIN32
-typedef GMutex * GStaticMutex;
-#define G_STATIC_MUTEX_INIT NULL
-#define g_static_mutex_get_mutex g_static_mutex_get_mutex_impl
-#else /* G_OS_WIN32 */
-typedef struct {
- struct _GMutex *unused;
- GMutex mutex;
-} GStaticMutex;
-#define G_STATIC_MUTEX_INIT { NULL, G_MUTEX_INIT }
-#define g_static_mutex_get_mutex(s) (&(s)->mutex)
-#endif /* G_OS_WIN32 */
-
-#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))
-void g_static_mutex_init (GStaticMutex *mutex);
-void g_static_mutex_free (GStaticMutex *mutex);
-
struct _GStaticPrivate
{
/*< private >*/
@@ -184,49 +162,6 @@ void g_static_private_set (GStaticPrivate *private_key,
GDestroyNotify notify);
void g_static_private_free (GStaticPrivate *private_key);
-typedef struct _GStaticRecMutex GStaticRecMutex;
-struct _GStaticRecMutex
-{
- /*< private >*/
- GStaticMutex mutex;
- guint depth;
- GSystemThread owner;
-};
-
-#define G_STATIC_REC_MUTEX_INIT { G_STATIC_MUTEX_INIT, 0, {{0, 0, 0, 0}} }
-void g_static_rec_mutex_init (GStaticRecMutex *mutex);
-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_rec_mutex_free (GStaticRecMutex *mutex);
-
-typedef struct _GStaticRWLock GStaticRWLock;
-struct _GStaticRWLock
-{
- /*< private >*/
- GStaticMutex mutex;
- GCond *read_cond;
- GCond *write_cond;
- guint read_counter;
- gboolean have_writer;
- guint want_to_read;
- guint want_to_write;
-};
-
-#define G_STATIC_RW_LOCK_INIT { G_STATIC_MUTEX_INIT, NULL, NULL, 0, FALSE, 0, 0 }
-
-void g_static_rw_lock_init (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);
-void g_static_rw_lock_free (GStaticRWLock* lock);
-
typedef enum
{
G_ONCE_STATUS_NOTCALLED,