Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/librumpuser With glibc on ARM kthread_exit() aborts beca...
details: https://anonhg.NetBSD.org/src/rev/53d63b89b2b8
branches: trunk
changeset: 334944:53d63b89b2b8
user: pooka <pooka%NetBSD.org@localhost>
date: Tue Dec 16 17:00:17 2014 +0000
description:
With glibc on ARM kthread_exit() aborts because pthread_exit() fails
to unwind the stack. Add a temporary workaround where we simply don't
allow the thread to exit (a kernel thread exit is a relatively uncommon
event in a rump kernel anyway).
diffstat:
lib/librumpuser/rumpuser_pth.c | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diffs (36 lines):
diff -r e4fe3f29b084 -r 53d63b89b2b8 lib/librumpuser/rumpuser_pth.c
--- a/lib/librumpuser/rumpuser_pth.c Tue Dec 16 15:33:22 2014 +0000
+++ b/lib/librumpuser/rumpuser_pth.c Tue Dec 16 17:00:17 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rumpuser_pth.c,v 1.43 2014/11/04 19:05:17 pooka Exp $ */
+/* $NetBSD: rumpuser_pth.c,v 1.44 2014/12/16 17:00:17 pooka Exp $ */
/*
* Copyright (c) 2007-2010 Antti Kantee. All Rights Reserved.
@@ -28,7 +28,7 @@
#include "rumpuser_port.h"
#if !defined(lint)
-__RCSID("$NetBSD: rumpuser_pth.c,v 1.43 2014/11/04 19:05:17 pooka Exp $");
+__RCSID("$NetBSD: rumpuser_pth.c,v 1.44 2014/12/16 17:00:17 pooka Exp $");
#endif /* !lint */
#include <sys/queue.h>
@@ -104,6 +104,17 @@
rumpuser_thread_exit(void)
{
+ /*
+ * FIXXXME: with glibc on ARM pthread_exit() aborts because
+ * it fails to unwind the stack. In the typical case, only
+ * the mountroothook thread will exit and even that's
+ * conditional on vfs being present.
+ */
+#if (defined(__ARMEL__) || defined(__ARMEB__)) && defined(__GLIBC__)
+ for (;;)
+ pause();
+#endif
+
pthread_exit(NULL);
}
Home |
Main Index |
Thread Index |
Old Index