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 | |
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')
-rw-r--r-- | debian/patches/libports_stability.patch | 14 | ||||
-rw-r--r-- | debian/patches/libpthread_fix.patch | 43 | ||||
-rw-r--r-- | debian/patches/series | 2 |
3 files changed, 59 insertions, 0 deletions
diff --git a/debian/patches/libports_stability.patch b/debian/patches/libports_stability.patch new file mode 100644 index 00000000..462fc1ca --- /dev/null +++ b/debian/patches/libports_stability.patch @@ -0,0 +1,14 @@ +Ideally we should be able to time out and see translators go away automatically, +however it makes all threads often wake at the same time and overload Mach. + +--- libports/manage-multithread.c 29 Dec 2008 18:38:02 -0000 1.20 ++++ libports/manage-multithread.c 20 Aug 1997 20:41:57 -0000 1.19 +@@ -157,6 +157,8 @@ + return 0; + } + ++ thread_timeout = global_timeout = 0; /* XXX */ ++ + nreqthreads = 1; + totalthreads = 1; + thread_function (1); 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); ++ } ++ } + } + + diff --git a/debian/patches/series b/debian/patches/series index fae76eac..e6ced675 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -24,3 +24,5 @@ stat-fix.patch -p0 in6_addr.patch -p1 stat_round.patch -p0 dir_acces_fix.patch -p0 +libports_stability.patch -p0 +libpthread_fix.patch -p0 |