+Sat Dec 14 21:10:57 2002 Owen Taylor <otaylor@redhat.com>
+
+ * glib/gthread.h: Mark the contents of the strucures
+ in this file /*< private >*/
+
+ * glib/gthread.[ch]: Rename the 'write' field of the
+ structure to 'have_writer' to avoid any possible
+ conflict with system headers. (#90549, Morten Welinder)
+
Sat Dec 14 20:11:41 2002 Owen Taylor <otaylor@redhat.com>
* glib/libcharset/{localcharset.[ch] libcharset-glib.patch}
+Sat Dec 14 21:10:57 2002 Owen Taylor <otaylor@redhat.com>
+
+ * glib/gthread.h: Mark the contents of the strucures
+ in this file /*< private >*/
+
+ * glib/gthread.[ch]: Rename the 'write' field of the
+ structure to 'have_writer' to avoid any possible
+ conflict with system headers. (#90549, Morten Welinder)
+
Sat Dec 14 20:11:41 2002 Owen Taylor <otaylor@redhat.com>
* glib/libcharset/{localcharset.[ch] libcharset-glib.patch}
+Sat Dec 14 21:10:57 2002 Owen Taylor <otaylor@redhat.com>
+
+ * glib/gthread.h: Mark the contents of the strucures
+ in this file /*< private >*/
+
+ * glib/gthread.[ch]: Rename the 'write' field of the
+ structure to 'have_writer' to avoid any possible
+ conflict with system headers. (#90549, Morten Welinder)
+
Sat Dec 14 20:11:41 2002 Owen Taylor <otaylor@redhat.com>
* glib/libcharset/{localcharset.[ch] libcharset-glib.patch}
+Sat Dec 14 21:10:57 2002 Owen Taylor <otaylor@redhat.com>
+
+ * glib/gthread.h: Mark the contents of the strucures
+ in this file /*< private >*/
+
+ * glib/gthread.[ch]: Rename the 'write' field of the
+ structure to 'have_writer' to avoid any possible
+ conflict with system headers. (#90549, Morten Welinder)
+
Sat Dec 14 20:11:41 2002 Owen Taylor <otaylor@redhat.com>
* glib/libcharset/{localcharset.[ch] libcharset-glib.patch}
+Sat Dec 14 21:10:57 2002 Owen Taylor <otaylor@redhat.com>
+
+ * glib/gthread.h: Mark the contents of the strucures
+ in this file /*< private >*/
+
+ * glib/gthread.[ch]: Rename the 'write' field of the
+ structure to 'have_writer' to avoid any possible
+ conflict with system headers. (#90549, Morten Welinder)
+
Sat Dec 14 20:11:41 2002 Owen Taylor <otaylor@redhat.com>
* glib/libcharset/{localcharset.[ch] libcharset-glib.patch}
+Sat Dec 14 21:10:57 2002 Owen Taylor <otaylor@redhat.com>
+
+ * glib/gthread.h: Mark the contents of the strucures
+ in this file /*< private >*/
+
+ * glib/gthread.[ch]: Rename the 'write' field of the
+ structure to 'have_writer' to avoid any possible
+ conflict with system headers. (#90549, Morten Welinder)
+
Sat Dec 14 20:11:41 2002 Owen Taylor <otaylor@redhat.com>
* glib/libcharset/{localcharset.[ch] libcharset-glib.patch}
+Sat Dec 14 21:10:57 2002 Owen Taylor <otaylor@redhat.com>
+
+ * glib/gthread.h: Mark the contents of the strucures
+ in this file /*< private >*/
+
+ * glib/gthread.[ch]: Rename the 'write' field of the
+ structure to 'have_writer' to avoid any possible
+ conflict with system headers. (#90549, Morten Welinder)
+
Sat Dec 14 20:11:41 2002 Owen Taylor <otaylor@redhat.com>
* glib/libcharset/{localcharset.[ch] libcharset-glib.patch}
g_static_mutex_lock (&lock->mutex);
lock->want_to_read++;
- while (lock->write || lock->want_to_write)
+ while (lock->have_writer || lock->want_to_write)
g_static_rw_lock_wait (&lock->read_cond, &lock->mutex);
lock->want_to_read--;
lock->read_counter++;
return TRUE;
g_static_mutex_lock (&lock->mutex);
- if (!lock->write && !lock->want_to_write)
+ if (!lock->have_writer && !lock->want_to_write)
{
lock->read_counter++;
ret_val = TRUE;
g_static_mutex_lock (&lock->mutex);
lock->want_to_write++;
- while (lock->write || lock->read_counter)
+ while (lock->have_writer || lock->read_counter)
g_static_rw_lock_wait (&lock->write_cond, &lock->mutex);
lock->want_to_write--;
- lock->write = TRUE;
+ lock->have_writer = TRUE;
g_static_mutex_unlock (&lock->mutex);
}
return TRUE;
g_static_mutex_lock (&lock->mutex);
- if (!lock->write && !lock->read_counter)
+ if (!lock->have_writer && !lock->read_counter)
{
- lock->write = TRUE;
+ lock->have_writer = TRUE;
ret_val = TRUE;
}
g_static_mutex_unlock (&lock->mutex);
return;
g_static_mutex_lock (&lock->mutex);
- lock->write = FALSE;
+ lock->have_writer = FALSE;
g_static_rw_lock_signal (lock);
g_static_mutex_unlock (&lock->mutex);
}
typedef struct _GThread GThread;
struct _GThread
{
+ /*< private >*/
GThreadFunc func;
gpointer data;
gboolean joinable;
struct _GStaticPrivate
{
+ /*< private >*/
guint index;
};
#define G_STATIC_PRIVATE_INIT { 0 }
typedef struct _GStaticRecMutex GStaticRecMutex;
struct _GStaticRecMutex
{
+ /*< private >*/
GStaticMutex mutex;
guint depth;
GSystemThread owner;
typedef struct _GStaticRWLock GStaticRWLock;
struct _GStaticRWLock
{
+ /*< private >*/
GStaticMutex mutex;
GCond *read_cond;
GCond *write_cond;
guint read_counter;
- gboolean write;
+ gboolean have_writer;
guint want_to_read;
guint want_to_write;
};