summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@gnu.org>2009-01-17 23:27:02 +0100
committerNeal H. Walfield <neal@gnu.org>2009-01-18 02:18:31 +0100
commitf54b04fabd2b7e4514a0b8ed6e32b38dc85fc4ce (patch)
tree2ba9e71efd4f6cdef1c74238658317233b96774e
parentbbde6024c8b3b4b62c2a1ea1fa654df344d5f453 (diff)
Remove more uses of L4 specific functions in generic code.
2009-01-17 Neal H. Walfield <neal@gnu.org> * sysdeps/viengoos/pt-docancel.c (__pthread_do_cancel): Use hurd_myself, not l4_myself. [! USE_L4]: Abort. * sysdeps/viengoos/pt-wakeup.c (__pthread_wakeup) [! USE_L4]: Don't call l4_thread_switch.
-rw-r--r--libpthread/ChangeLog8
-rw-r--r--libpthread/sysdeps/viengoos/pt-docancel.c14
-rw-r--r--libpthread/sysdeps/viengoos/pt-wakeup.c2
3 files changed, 21 insertions, 3 deletions
diff --git a/libpthread/ChangeLog b/libpthread/ChangeLog
index 6a676cc..6ccc65c 100644
--- a/libpthread/ChangeLog
+++ b/libpthread/ChangeLog
@@ -1,5 +1,13 @@
2009-01-17 Neal H. Walfield <neal@gnu.org>
+ * sysdeps/viengoos/pt-docancel.c (__pthread_do_cancel): Use
+ hurd_myself, not l4_myself.
+ [! USE_L4]: Abort.
+ * sysdeps/viengoos/pt-wakeup.c (__pthread_wakeup) [! USE_L4]:
+ Don't call l4_thread_switch.
+
+2009-01-17 Neal H. Walfield <neal@gnu.org>
+
* signal/kill.c: Include <string.h>.
* sysdeps/viengoos/pt-sigstate-init.c: Likewise.
diff --git a/libpthread/sysdeps/viengoos/pt-docancel.c b/libpthread/sysdeps/viengoos/pt-docancel.c
index 2fb3f6f..e2693af 100644
--- a/libpthread/sysdeps/viengoos/pt-docancel.c
+++ b/libpthread/sysdeps/viengoos/pt-docancel.c
@@ -32,10 +32,18 @@ __pthread_do_cancel (struct __pthread *p)
assert (p->cancel_pending == 1);
assert (p->cancel_state == PTHREAD_CANCEL_ENABLE);
- if (l4_is_thread_equal (l4_myself (), p->threadid))
+ if (hurd_myself () == p->threadid)
call_exit ();
else
- thread_start_sp_ip (p->object,
- p->mcontext.sp, (uintptr_t) call_exit);
+ {
+#ifdef USE_L4
+ thread_start_sp_ip (p->object,
+ p->mcontext.sp, (uintptr_t) call_exit);
+#else
+# warning Unimplemented on this platform.
+ assert (0);
+#endif
+ }
+
return 0;
}
diff --git a/libpthread/sysdeps/viengoos/pt-wakeup.c b/libpthread/sysdeps/viengoos/pt-wakeup.c
index 6435689..da1b62f 100644
--- a/libpthread/sysdeps/viengoos/pt-wakeup.c
+++ b/libpthread/sysdeps/viengoos/pt-wakeup.c
@@ -44,8 +44,10 @@ __pthread_wakeup (struct __pthread *thread)
&thread->threadid, INT_MAX);
assertx (ret <= 1, "tid: %x, ret: %d", thread->threadid, ret);
+#ifdef USE_L4
if (ret == 0)
l4_thread_switch (thread->threadid);
+#endif
}
while (ret == 0);
}