summaryrefslogtreecommitdiff
path: root/libpthread/sysdeps/viengoos
diff options
context:
space:
mode:
Diffstat (limited to 'libpthread/sysdeps/viengoos')
-rw-r--r--libpthread/sysdeps/viengoos/pt-docancel.c14
-rw-r--r--libpthread/sysdeps/viengoos/pt-wakeup.c2
2 files changed, 13 insertions, 3 deletions
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);
}