about summary refs log tree commit diff
path: root/hurd/thread-cancel.c
diff options
context:
space:
mode:
Diffstat (limited to 'hurd/thread-cancel.c')
-rw-r--r--hurd/thread-cancel.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/hurd/thread-cancel.c b/hurd/thread-cancel.c
index db527c3935..7fb8cd23b4 100644
--- a/hurd/thread-cancel.c
+++ b/hurd/thread-cancel.c
@@ -62,6 +62,12 @@ hurd_thread_cancel (thread_t thread)
 				  (natural_t *) &state.basic,
 				  MACHINE_THREAD_STATE_COUNT);
 
+      if (ss->cancel_hook)
+	/* The code being cancelled has a special wakeup function.
+	   Calling this should make the thread wake up and check the
+	   cancellation flag.  */
+	(*ss->cancel_hook) ();
+
       __thread_resume (thread);
     }