diff options
author | Thomas Schwinge <thomas@codesourcery.com> | 2013-04-18 10:16:46 +0200 |
---|---|---|
committer | Thomas Schwinge <thomas@codesourcery.com> | 2013-04-18 10:16:46 +0200 |
commit | 763d7b1e8eb23335636c45b5088326ba1b308de3 (patch) | |
tree | dd4d1760a4c7cb1a13cbaff0de98b5b4d96bc99c /open_issues | |
parent | c7dc212e305ffd4d9827b5a1592612146769b02c (diff) | |
parent | 5175f5d69ab1be8f7d06676420b5b3517ce11dd3 (diff) |
Merge remote-tracking branch 'darnassus--hurd-web/master'
Diffstat (limited to 'open_issues')
-rw-r--r-- | open_issues/libpthread_cancellation_points.mdwn | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/open_issues/libpthread_cancellation_points.mdwn b/open_issues/libpthread_cancellation_points.mdwn new file mode 100644 index 00000000..af0efa9d --- /dev/null +++ b/open_issues/libpthread_cancellation_points.mdwn @@ -0,0 +1,41 @@ +[[!meta copyright="Copyright © 2013 Free Software Foundation, Inc."]] + +[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable +id="license" text="Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no Invariant +Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license +is included in the section entitled [[GNU Free Documentation +License|/fdl]]."]]"""]] + +[[!meta title="cancellation points are not cancelling threads"]] + +[[!tag open_issue_libpthread]] + + #include <pthread.h> + #include <stdio.h> + #include <sys/select.h> + #include <unistd.h> + + void *f (void*foo) + { + char buf[128]; + //pthread_setcanceltype (PTHREAD_CANCEL_ASYNCHRONOUS, NULL); + while (1) { + read (0, buf, sizeof(buf)); + } + } + int main (void) { + pthread_t t; + pthread_create (&t, NULL, f, NULL); + sleep (1); + pthread_cancel (t); + pthread_join (t, NULL); + exit(0); + } + +read() is not behaving as a cancellation point, only setting the cancel +type to asynchronous permits this testcase to terminate. We do have the +pthread_setcanceltype glibc/libpthread hook in the forward structure, but we are +not using it: the LIBC_CANCEL_ASYNC macros are void, and we're not using them in +the mig msg call either. |