diff options
-rw-r--r-- | debian/changelog | 4 | ||||
-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 |
4 files changed, 63 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index 41898dff..3887141c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -45,6 +45,10 @@ hurd (20080921-1) UNRELEASED; urgency=low * debian/patches/stat_round.patch: New temporary patch, fixes symlink issues with tar. * debian/patches/dir_acces_fix.patch: New patch, fixes ext2fs crashes. + * 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. -- Michael Banck <mbanck@debian.org> Sat, 13 Sep 2008 23:43:27 +0200 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 |