summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2008-11-27 20:58:30 +0000
committerjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2008-11-27 20:58:30 +0000
commit45bc5e20d3fcf0fe070d73530e9a49b657fbc3cb (patch)
tree01e0998c7ff90f2c5d343cb23d2f1a845093eccd
parent3d2716ac1ec2f4b063548e10e4fa4463a13f1f7a (diff)
* sysdeps/unix/sysv/linux/arm/eabi/nptl/aio_misc.h: New.
git-svn-id: svn://svn.eglibc.org/branches/eglibc-2_9@7430 7b3dc134-2b1b-0410-93df-9e9f96275f8d
-rw-r--r--ports/ChangeLog.eglibc4
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/aio_misc.h52
2 files changed, 56 insertions, 0 deletions
diff --git a/ports/ChangeLog.eglibc b/ports/ChangeLog.eglibc
index f021b82cc..09439f5ef 100644
--- a/ports/ChangeLog.eglibc
+++ b/ports/ChangeLog.eglibc
@@ -1,3 +1,7 @@
+2008-11-27 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/arm/eabi/nptl/aio_misc.h: New.
+
2008-11-25 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/arm/sysdep.h (LOAD_ARGS_1, LOAD_ARGS_2,
diff --git a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/aio_misc.h b/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/aio_misc.h
new file mode 100644
index 000000000..3fb1ec95f
--- /dev/null
+++ b/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/aio_misc.h
@@ -0,0 +1,52 @@
+/* Copyright (C) 2008 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include_next <aio_misc.h>
+
+#ifdef __thumb2__
+
+#include <errno.h>
+
+/* The Thumb-2 definition of INTERNAL_SYSCALL_RAW has to hide the use
+ of r7 from the compiler because it cannot handle asm clobbering the
+ hard frame pointer. In aio_suspend, GCC does not eliminate the
+ hard frame pointer because the function uses variable-length
+ arrays, so it generates unwind information using r7 as virtual
+ stack pointer. During system calls, when r7 has been saved on the
+ stack, this means the unwind information is invalid. Without extra
+ unwind directives, which would need to cause unwind information for
+ the asm to be generated separately from that for the parts of the
+ function before and after the asm (with three index table entries),
+ it is not possible to represent any temporary change to the virtual
+ stack pointer. Instead, we move the problematic system calls out
+ of line into a function that does not require a frame pointer. */
+
+static __attribute_noinline__ void
+aio_misc_wait (int *resultp,
+ volatile int *futexp,
+ const struct timespec *timeout,
+ int cancel)
+{
+ AIO_MISC_WAIT (*resultp, *futexp, timeout, cancel);
+}
+
+#undef AIO_MISC_WAIT
+#define AIO_MISC_WAIT(result, futex, timeout, cancel) \
+ aio_misc_wait (&result, &futex, timeout, cancel)
+
+#endif