summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@gnu.org>2008-12-17 22:26:26 +0100
committerNeal H. Walfield <neal@gnu.org>2008-12-17 22:26:26 +0100
commit87bfe7ed7bbe4dd4350f420cc9649809bef6d5a4 (patch)
tree0ace43ea190de328c01e15d6ab9c958c2e5cf9ea
parent6d78a8b7e141b65c283cda0379e96f7c88f78f78 (diff)
Rename futex functions.
libviengoos/ 2008-12-17 Neal H. Walfield <neal@gnu.org> * viengoos/futex.h (vg_futex_using): Rename from this... (futex_using): ... to this. Update users. Use vg_futex_using, not rm_futex_using. (vg_futex): Rename from this... (futex): ... to this. Update users. (vg_futex_wait_using): Rename from this... (futex_wait_using): ... to this. Update users. (vg_futex_wake_using): Rename from this... (futex_wake_using): ... to this. Update users. libpthread/ 2008-12-17 Neal H. Walfield <neal@gnu.org> * sysdeps/viengoos/pt-block.c (__pthread_block): Use futex_wait_using, not vg_futex_wait_using. * sysdeps/viengoos/pt-wakeup.c (__pthread_wakeup): Use futex_wake_using, not vg_futex_wake_using.
-rw-r--r--libpthread/ChangeLog7
-rw-r--r--libpthread/sysdeps/viengoos/pt-block.c2
-rw-r--r--libpthread/sysdeps/viengoos/pt-thread-alloc.c2
-rw-r--r--libpthread/sysdeps/viengoos/pt-wakeup.c2
-rw-r--r--libviengoos/ChangeLog12
-rw-r--r--libviengoos/viengoos/futex.h28
6 files changed, 36 insertions, 17 deletions
diff --git a/libpthread/ChangeLog b/libpthread/ChangeLog
index ec19176..4badb21 100644
--- a/libpthread/ChangeLog
+++ b/libpthread/ChangeLog
@@ -1,5 +1,12 @@
2008-12-17 Neal H. Walfield <neal@gnu.org>
+ * sysdeps/viengoos/pt-block.c (__pthread_block): Use
+ futex_wait_using, not vg_futex_wait_using.
+ * sysdeps/viengoos/pt-wakeup.c (__pthread_wakeup): Use
+ futex_wake_using, not vg_futex_wake_using.
+
+2008-12-17 Neal H. Walfield <neal@gnu.org>
+
* sysdeps/viengoos/ia32/pt-setup.c: Don't include
<hurd/exceptions.h> or <viengoos/thread.h>.
* sysdeps/viengoos/pt-startup.c (__pthread_startup): Don't include
diff --git a/libpthread/sysdeps/viengoos/pt-block.c b/libpthread/sysdeps/viengoos/pt-block.c
index e9a82ff..8e6a17f 100644
--- a/libpthread/sysdeps/viengoos/pt-block.c
+++ b/libpthread/sysdeps/viengoos/pt-block.c
@@ -34,7 +34,7 @@ __pthread_block (struct __pthread *thread)
thread->lock_message_buffer = NULL;
#endif
- vg_futex_wait_using (mb, &thread->threadid, thread->threadid);
+ futex_wait_using (mb, &thread->threadid, thread->threadid);
#ifndef NDEBUG
thread->lock_message_buffer = mb;
diff --git a/libpthread/sysdeps/viengoos/pt-thread-alloc.c b/libpthread/sysdeps/viengoos/pt-thread-alloc.c
index 8b46e97..e47377c 100644
--- a/libpthread/sysdeps/viengoos/pt-thread-alloc.c
+++ b/libpthread/sysdeps/viengoos/pt-thread-alloc.c
@@ -78,7 +78,7 @@ __pthread_thread_alloc (struct __pthread *thread)
err = vg_cap_copy (VG_ADDR_VOID,
thread->lock_message_buffer->receiver,
VG_ADDR (VG_MESSENGER_THREAD_SLOT,
- VG_MESSENGER_SLOTS_LOG2),
+ VG_MESSENGER_SLOTS_LOG2),
VG_ADDR_VOID, thread->object,
0, VG_CAP_PROPERTIES_DEFAULT);
if (err)
diff --git a/libpthread/sysdeps/viengoos/pt-wakeup.c b/libpthread/sysdeps/viengoos/pt-wakeup.c
index 4bd51b4..6435689 100644
--- a/libpthread/sysdeps/viengoos/pt-wakeup.c
+++ b/libpthread/sysdeps/viengoos/pt-wakeup.c
@@ -40,7 +40,7 @@ __pthread_wakeup (struct __pthread *thread)
long ret;
do
{
- ret = vg_futex_wake_using (self->lock_message_buffer,
+ ret = futex_wake_using (self->lock_message_buffer,
&thread->threadid, INT_MAX);
assertx (ret <= 1, "tid: %x, ret: %d", thread->threadid, ret);
diff --git a/libviengoos/ChangeLog b/libviengoos/ChangeLog
index 716b7d4..c6a0f00 100644
--- a/libviengoos/ChangeLog
+++ b/libviengoos/ChangeLog
@@ -1,5 +1,17 @@
2008-12-17 Neal H. Walfield <neal@gnu.org>
+ * viengoos/futex.h (vg_futex_using): Rename from this...
+ (futex_using): ... to this. Update users. Use vg_futex_using,
+ not rm_futex_using.
+ (vg_futex): Rename from this...
+ (futex): ... to this. Update users.
+ (vg_futex_wait_using): Rename from this...
+ (futex_wait_using): ... to this. Update users.
+ (vg_futex_wake_using): Rename from this...
+ (futex_wake_using): ... to this. Update users.
+
+2008-12-17 Neal H. Walfield <neal@gnu.org>
+
* viengoos/cap.h (vg_cap_copy): Rename from this...
(vg_cap_copy_simple): ... to this. Update users.
diff --git a/libviengoos/viengoos/futex.h b/libviengoos/viengoos/futex.h
index b9f23c9..0c97a5a 100644
--- a/libviengoos/viengoos/futex.h
+++ b/libviengoos/viengoos/futex.h
@@ -119,9 +119,9 @@ struct vg_futex_return
static inline struct vg_futex_return
__attribute__((always_inline))
-vg_futex_using (struct hurd_message_buffer *mb,
- void *addr1, int op, int val1, struct timespec *timespec,
- void *addr2, int val3)
+futex_using (struct hurd_message_buffer *mb,
+ void *addr1, int op, int val1, struct timespec *timespec,
+ void *addr2, int val3)
{
union futex_val2 val2;
if (timespec)
@@ -132,7 +132,7 @@ vg_futex_using (struct hurd_message_buffer *mb,
error_t err;
long ret = 0; /* Elide gcc warning. */
if (mb)
- err = rm_futex_using (mb,
+ err = vg_futex_using (mb,
VG_ADDR_VOID, VG_ADDR_VOID,
addr1, op, val1, !! timespec, val2, addr2,
(union futex_val3) val3, &ret);
@@ -143,24 +143,24 @@ vg_futex_using (struct hurd_message_buffer *mb,
return (struct vg_futex_return) { err, ret };
}
-/* Standard vg_futex signatures. See vg_futex documentation, e.g., Futexes
+/* Standard futex signatures. See futex documentation, e.g., Futexes
are Tricky by Ulrich Drepper. */
static inline struct vg_futex_return
__attribute__((always_inline))
-vg_futex (void *addr1, int op, int val1, struct timespec *timespec,
+futex (void *addr1, int op, int val1, struct timespec *timespec,
void *addr2, int val3)
{
- return vg_futex_using (NULL, addr1, op, val1, timespec, addr2, val3);
+ return futex_using (NULL, addr1, op, val1, timespec, addr2, val3);
}
/* If *F is VAL, wait until woken. */
static inline long
__attribute__((always_inline))
-vg_futex_wait_using (struct hurd_message_buffer *mb, int *f, int val)
+futex_wait_using (struct hurd_message_buffer *mb, int *f, int val)
{
struct vg_futex_return ret;
- ret = vg_futex_using (mb, f, FUTEX_WAIT, val, NULL, 0, 0);
+ ret = futex_using (mb, f, FUTEX_WAIT, val, NULL, 0, 0);
if (ret.err)
{
errno = ret.err;
@@ -173,7 +173,7 @@ static inline long
__attribute__((always_inline))
futex_wait (int *f, int val)
{
- return vg_futex_wait_using (NULL, f, val);
+ return futex_wait_using (NULL, f, val);
}
@@ -183,7 +183,7 @@ __attribute__((always_inline))
futex_timed_wait (int *f, int val, struct timespec *timespec)
{
struct vg_futex_return ret;
- ret = vg_futex (f, FUTEX_WAIT, val, timespec, 0, 0);
+ ret = futex (f, FUTEX_WAIT, val, timespec, 0, 0);
if (ret.err)
{
errno = ret.err;
@@ -196,10 +196,10 @@ futex_timed_wait (int *f, int val, struct timespec *timespec)
/* Signal NWAKE waiters waiting on vg_futex F. */
static inline long
__attribute__((always_inline))
-vg_futex_wake_using (struct hurd_message_buffer *mb, int *f, int nwake)
+futex_wake_using (struct hurd_message_buffer *mb, int *f, int nwake)
{
struct vg_futex_return ret;
- ret = vg_futex_using (mb, f, FUTEX_WAKE, nwake, NULL, 0, 0);
+ ret = futex_using (mb, f, FUTEX_WAKE, nwake, NULL, 0, 0);
if (ret.err)
{
errno = ret.err;
@@ -212,7 +212,7 @@ static inline long
__attribute__((always_inline))
futex_wake (int *f, int nwake)
{
- return vg_futex_wake_using (NULL, f, nwake);
+ return futex_wake_using (NULL, f, nwake);
}
#endif /* !RM_INTERN */