diff options
author | Samuel Thibault <sthibault@debian.org> | 2009-04-18 15:41:25 +0000 |
---|---|---|
committer | Samuel Thibault <sthibault@debian.org> | 2009-04-18 15:41:25 +0000 |
commit | 43b5f378b58e4585b4244920dc66caa1915b4eb0 (patch) | |
tree | 52326a9229739ea753a6620642f3eca874cee95d /debian/patches/libpthread_fix.patch | |
parent | 69d674705a5d831446fa982a4aaebe83181acc51 (diff) |
* debian/patches/libports_stability.patch: New patch to keep the old
behavior of libports.
* debian/patches/libpthread_fix.patch New patch from Thomas Schwinge to fix
libpthread.
Diffstat (limited to 'debian/patches/libpthread_fix.patch')
-rw-r--r-- | debian/patches/libpthread_fix.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/debian/patches/libpthread_fix.patch b/debian/patches/libpthread_fix.patch new file mode 100644 index 00000000..3b13d698 --- /dev/null +++ b/debian/patches/libpthread_fix.patch @@ -0,0 +1,43 @@ +Temporary patch from Thomas Schwinge to fix libpthread bugs. + +diff --git libpthread/sysdeps/mach/pt-thread-dealloc.c b/sysdeps/mach/pt-thread-dealloc.c +index 55d8c4d..0c4a4fc 100644 +--- libpthread/sysdeps/mach/pt-thread-dealloc.c ++++ libpthread/sysdeps/mach/pt-thread-dealloc.c +@@ -38,4 +38,6 @@ __pthread_thread_dealloc (struct __pthread *thread) + assert. */ + __mach_port_destroy (__mach_task_self (), + thread->wakeupmsg.msgh_remote_port); ++ ++ thread->have_kernel_resources = 0; + } +diff --git libpthread/sysdeps/mach/pt-thread-halt.c b/sysdeps/mach/pt-thread-halt.c +index 973cde1..a9c3858 100644 +--- libpthread/sysdeps/mach/pt-thread-halt.c ++++ libpthread/sysdeps/mach/pt-thread-halt.c +@@ -32,6 +32,21 @@ + void + __pthread_thread_halt (struct __pthread *thread) + { +- error_t err = __thread_terminate (thread->kernel_thread); +- assert_perror (err); ++ if (thread->have_kernel_resources) ++ { ++ if (thread == _pthread_self ()) ++ { ++ while (1) ++ { ++ error_t err = __thread_suspend (thread->kernel_thread); ++ assert_perror (err); ++ assert (! "Failed to suspend self."); ++ } ++ } ++ else ++ { ++ error_t err = __thread_terminate (thread->kernel_thread); ++ assert_perror (err); ++ } ++ } + } + + |