From: Bruno Haible Date: Fri, 17 Oct 2008 11:36:08 +0000 (+0000) Subject: Update from gnulib. X-Git-Tag: v0.18~296 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6040185e2c279b1c7c4c677fb5b12ffc36397f2b;p=thirdparty%2Fgettext.git Update from gnulib. --- diff --git a/gettext-runtime/intl/ChangeLog b/gettext-runtime/intl/ChangeLog index 32546130f..fe1a85ff3 100644 --- a/gettext-runtime/intl/ChangeLog +++ b/gettext-runtime/intl/ChangeLog @@ -1,3 +1,9 @@ +2008-10-17 Bruno Haible + + * lock.h (gl_carray_waitqueue_t): Renamed from gl_waitqueue_t. + (gl_rwlock_t): Update. + * lock.c (gl_waitqueue_t): Alias to gl_carray_waitqueue_t. + 2008-09-22 Eric Blake Bruno Haible diff --git a/gettext-runtime/intl/lock.c b/gettext-runtime/intl/lock.c index b2dd5b2d7..dcc2db0e8 100644 --- a/gettext-runtime/intl/lock.c +++ b/gettext-runtime/intl/lock.c @@ -681,6 +681,9 @@ glthread_lock_destroy_func (gl_lock_t *lock) /* ------------------------- gl_rwlock_t datatype ------------------------- */ +/* In this file, the waitqueues are implemented as circular arrays. */ +#define gl_waitqueue_t gl_carray_waitqueue_t + static inline void gl_waitqueue_init (gl_waitqueue_t *wq) { diff --git a/gettext-runtime/intl/lock.h b/gettext-runtime/intl/lock.h index c7afa66b1..7f4c1b0bb 100644 --- a/gettext-runtime/intl/lock.h +++ b/gettext-runtime/intl/lock.h @@ -676,13 +676,13 @@ typedef struct unsigned int alloc; /* length of allocated array */ unsigned int offset; /* index of first waiting thread in array */ } - gl_waitqueue_t; + gl_carray_waitqueue_t; typedef struct { gl_spinlock_t guard; /* protects the initialization */ CRITICAL_SECTION lock; /* protects the remaining fields */ - gl_waitqueue_t waiting_readers; /* waiting readers */ - gl_waitqueue_t waiting_writers; /* waiting writers */ + gl_carray_waitqueue_t waiting_readers; /* waiting readers */ + gl_carray_waitqueue_t waiting_writers; /* waiting writers */ int runcount; /* number of readers running, or -1 when a writer runs */ } gl_rwlock_t;