From f54b04fabd2b7e4514a0b8ed6e32b38dc85fc4ce Mon Sep 17 00:00:00 2001 From: "Neal H. Walfield" Date: Sat, 17 Jan 2009 23:27:02 +0100 Subject: Remove more uses of L4 specific functions in generic code. 2009-01-17 Neal H. Walfield * 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. --- libpthread/ChangeLog | 8 ++++++++ libpthread/sysdeps/viengoos/pt-docancel.c | 14 +++++++++++--- libpthread/sysdeps/viengoos/pt-wakeup.c | 2 ++ 3 files changed, 21 insertions(+), 3 deletions(-) (limited to 'libpthread') diff --git a/libpthread/ChangeLog b/libpthread/ChangeLog index 6a676cc..6ccc65c 100644 --- a/libpthread/ChangeLog +++ b/libpthread/ChangeLog @@ -1,3 +1,11 @@ +2009-01-17 Neal H. Walfield + + * 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 * signal/kill.c: Include . 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); } -- cgit v1.2.3