[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r13346 - in /fsf/trunk/ports: ./ sysdeps/unix/sysv/linux/arm/bits/ sysdeps/unix/sysv/linux/arm/eabi/ sysdeps/unix/sysv/linux...
- To: commits@xxxxxxxxxx
- Subject: [commits] r13346 - in /fsf/trunk/ports: ./ sysdeps/unix/sysv/linux/arm/bits/ sysdeps/unix/sysv/linux/arm/eabi/ sysdeps/unix/sysv/linux...
- From: eglibc@xxxxxxxxxx
- Date: Fri, 01 Apr 2011 19:25:14 -0000
Author: eglibc
Date: Fri Apr 1 12:25:13 2011
New Revision: 13346
Log:
Import glibc-ports-mainline for 2011-04-01
Modified:
fsf/trunk/ports/ChangeLog.arm
fsf/trunk/ports/ChangeLog.mips
fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S
fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/mips32/sync_file_range.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list
fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list
Modified: fsf/trunk/ports/ChangeLog.arm
==============================================================================
--- fsf/trunk/ports/ChangeLog.arm (original)
+++ fsf/trunk/ports/ChangeLog.arm Fri Apr 1 12:25:13 2011
@@ -1,3 +1,23 @@
+2011-04-01 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Rename open_by_handle
+ to open_by_handle_at.
+
+2011-04-01 Ryosei Takagi <ryosei@xxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S:
+ Save and restore r7, and also adjust sp.
+
+2011-04-01 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/arm/bits/fcntl.h (O_PATH): Define.
+
+2011-04-01 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Define struct
+ file_handle and MAX_HANDLE_SZ. Declare name_to_handle_at and
+ open_by_handle. Augment a few comments.
+
2011-03-21 Ulrich Weigand <ulrich.weigand@xxxxxxxxxx>
* sysdeps/arm/linuxthreads: Remove directory.
Modified: fsf/trunk/ports/ChangeLog.mips
==============================================================================
--- fsf/trunk/ports/ChangeLog.mips (original)
+++ fsf/trunk/ports/ChangeLog.mips Fri Apr 1 12:25:13 2011
@@ -1,3 +1,34 @@
+2011-04-01 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Rename open_by_handle
+ to open_by_handle_at.
+
+2011-04-01 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/mips/bits/fcntl.h (O_PATH): Define.
+
+2011-04-01 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Define struct
+ file_handle and MAX_HANDLE_SZ. Declare name_to_handle_at and
+ open_by_handle. Augment a few comments.
+
+2011-04-01 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/mips/mips32/sync_file_range.c: Make
+ cancelable.
+ * sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c: Likewise.
+ * sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c: Likewise.
+ * sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list: Mark
+ sync_file_range as cancellation point.
+ * sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list: Mark
+ sync_file_range as cancellation point.
+
+2011-04-01 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list: Add
+ sync_file_range.
+
2011-03-22 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
* sysdeps/mips/dl-lookup.c: Update from generic version.
Modified: fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
==============================================================================
--- fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h (original)
+++ fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h Fri Apr 1 12:25:13 2011
@@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values for Linux.
- Copyright (C) 1995-1998, 2000, 2004, 2006, 2007, 2009, 2010
+ Copyright (C) 1995-1998, 2000, 2004, 2006, 2007, 2009, 2010, 2011
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -53,6 +53,7 @@
#ifdef __USE_GNU
# define O_DIRECT 0200000 /* Direct disk access. */
# define O_NOATIME 01000000 /* Do not set atime. */
+# define O_PATH 010000000 /* Resolve pathname but do not open file. */
#endif
/* For now Linux has synchronisity options for data and read operations.
@@ -232,6 +233,19 @@
we splice from/to). */
# define SPLICE_F_MORE 4 /* Expect more data. */
# define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */
+
+
+/* File handle structure. */
+struct file_handle
+{
+ unsigned int handle_bytes;
+ int handle_type;
+ /* File identifier. */
+ unsigned char f_handle[0];
+};
+
+/* Maximum handle size (for now). */
+# define MAX_HANDLE_SZ 128
#endif
__BEGIN_DECLS
@@ -248,20 +262,32 @@
unsigned int __flags);
-/* Splice address range into a pipe. */
+/* Splice address range into a pipe.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
size_t __count, unsigned int __flags);
-/* Splice two files together. */
+/* Splice two files together.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout,
__off64_t *__offout, size_t __len,
unsigned int __flags);
-/* In-kernel implementation of tee for pipe buffers. */
+/* In-kernel implementation of tee for pipe buffers.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
extern ssize_t tee (int __fdin, int __fdout, size_t __len,
unsigned int __flags);
-/* Reserve storage for the data of the file associated with FD. */
+/* Reserve storage for the data of the file associated with FD.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
# ifndef __USE_FILE_OFFSET64
extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
# else
@@ -278,6 +304,19 @@
__off64_t __len);
# endif
+
+/* Map file name to file handle. */
+extern int name_to_handle_at (int __dfd, const char *__name,
+ struct file_handle *__handle, int *__mnt_id,
+ int __flags) __THROW;
+
+/* Open file using the file handle.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern int open_by_handle_at (int __mountdirfd, struct file_handle *__handle,
+ int __flags);
+
#endif
__END_DECLS
Modified: fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S
==============================================================================
--- fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S (original)
+++ fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S Fri Apr 1 12:25:13 2011
@@ -52,13 +52,15 @@
cfi_remember_state; \
cmp sp, reg; \
bls .Lok; \
+ str r7, [sp, #-4]!; \
+ cfi_adjust_cfa_offset (4); \
+ cfi_rel_offset (r7, 0); \
mov r5, r0; \
cfi_undefined (r5); \
mov r7, #SYS_ify(sigaltstack); \
- cfi_undefined (r7); \
mov r0, #0; \
- sub sp, sp, #16; /* >= sizeof (stack_t) */ \
- cfi_adjust_cfa_offset (16); \
+ sub sp, sp, #12; /* == sizeof (stack_t) */ \
+ cfi_adjust_cfa_offset (12); \
cfi_remember_state; \
mov r1, sp; \
swi #0; \
@@ -74,6 +76,11 @@
cmp r2, r3; \
bhi .Lok2; \
.Lfail: \
+ add sp, sp, #12; \
+ cfi_adjust_cfa_offset (-12); \
+ ldr r7, [sp], #4; \
+ cfi_adjust_cfa_offset (-4); \
+ cfi_restore (r7); \
CALL_FAIL \
cfi_restore_state; \
.Lok2: \
Modified: fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
==============================================================================
--- fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/bits/fcntl.h (original)
+++ fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/bits/fcntl.h Fri Apr 1 12:25:13 2011
@@ -1,6 +1,6 @@
/* O_*, F_*, FD_* bit values for Linux.
Copyright (C) 1995, 1996, 1997, 1998, 2000, 2002, 2003, 2004, 2006,
- 2007, 2009, 2010 Free Software Foundation, Inc.
+ 2007, 2009, 2010, 2011 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
@@ -54,6 +54,7 @@
#ifdef __USE_GNU
# define O_DIRECT 0x8000 /* Direct disk access hint. */
# define O_NOATIME 0x40000 /* Do not set atime. */
+# define O_PATH 010000000 /* Resolve pathname but do not open file. */
#endif
/* For now Linux has no synchronisity options for data and read operations.
@@ -245,6 +246,19 @@
we splice from/to). */
# define SPLICE_F_MORE 4 /* Expect more data. */
# define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */
+
+
+/* File handle structure. */
+struct file_handle
+{
+ unsigned int handle_bytes;
+ int handle_type;
+ /* File identifier. */
+ unsigned char f_handle[0];
+};
+
+/* Maximum handle size (for now). */
+# define MAX_HANDLE_SZ 128
#endif
__BEGIN_DECLS
@@ -261,20 +275,32 @@
unsigned int __flags);
-/* Splice address range into a pipe. */
+/* Splice address range into a pipe.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
size_t __count, unsigned int __flags);
-/* Splice two files together. */
+/* Splice two files together.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout,
__off64_t *__offout, size_t __len,
unsigned int __flags);
-/* In-kernel implementation of tee for pipe buffers. */
+/* In-kernel implementation of tee for pipe buffers.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
extern ssize_t tee (int __fdin, int __fdout, size_t __len,
unsigned int __flags);
-/* Reserve storage for the data of the file associated with FD. */
+/* Reserve storage for the data of the file associated with FD.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
# ifndef __USE_FILE_OFFSET64
extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
# else
@@ -291,6 +317,19 @@
__off64_t __len);
# endif
+
+/* Map file name to file handle. */
+extern int name_to_handle_at (int __dfd, const char *__name,
+ struct file_handle *__handle, int *__mnt_id,
+ int __flags) __THROW;
+
+/* Open file using the file handle.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern int open_by_handle_at (int __mountdirfd, struct file_handle *__handle,
+ int __flags);
+
#endif
__END_DECLS
Modified: fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/mips32/sync_file_range.c
==============================================================================
--- fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/mips32/sync_file_range.c (original)
+++ fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/mips32/sync_file_range.c Fri Apr 1 12:25:13 2011
@@ -1,5 +1,5 @@
/* Selective file content synch'ing.
- Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2007, 2011 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
@@ -21,7 +21,7 @@
#include <fcntl.h>
#include <sys/types.h>
-#include <sysdep.h>
+#include <sysdep-cancel.h>
#include <sys/syscall.h>
@@ -29,10 +29,23 @@
int
sync_file_range (int fd, __off64_t from, __off64_t to, unsigned int flags)
{
- return INLINE_SYSCALL (sync_file_range, 7, fd, 0,
- __LONG_LONG_PAIR ((long) (from >> 32), (long) from),
- __LONG_LONG_PAIR ((long) (to >> 32), (long) to),
- flags);
+ if (SINGLE_THREAD_P)
+ return INLINE_SYSCALL (sync_file_range, 7, fd, 0,
+ __LONG_LONG_PAIR ((long) (from >> 32), (long) from),
+ __LONG_LONG_PAIR ((long) (to >> 32), (long) to),
+ flags);
+
+ int result;
+ int oldtype = LIBC_CANCEL_ASYNC ();
+
+ result = INLINE_SYSCALL (sync_file_range, 7, fd, 0,
+ __LONG_LONG_PAIR ((long) (from >> 32), (long) from),
+ __LONG_LONG_PAIR ((long) (to >> 32), (long) to),
+ flags);
+
+ LIBC_CANCEL_RESET (oldtype);
+
+ return result;
}
#else
int
Modified: fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c
==============================================================================
--- fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c (original)
+++ fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c Fri Apr 1 12:25:13 2011
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2007, 2009, 2011 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
@@ -18,7 +18,7 @@
#include <errno.h>
#include <fcntl.h>
-#include <sysdep.h>
+#include <sysdep-cancel.h>
/* Reserve storage for the data of the file associated with FD. */
@@ -26,7 +26,17 @@
fallocate (int fd, int mode, __off_t offset, __off_t len)
{
#ifdef __NR_fallocate
- return INLINE_SYSCALL (fallocate, 4, fd, mode, offset, len);
+ if (SINGLE_THREAD_P)
+ return INLINE_SYSCALL (fallocate, 4, fd, mode, offset, len);
+
+ int result;
+ int oldtype = LIBC_CANCEL_ASYNC ();
+
+ result = INLINE_SYSCALL (fallocate, 4, fd, mode, offset, len);
+
+ LIBC_CANCEL_RESET (oldtype);
+
+ return result;
#else
__set_errno (ENOSYS);
return -1;
Modified: fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c
==============================================================================
--- fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c (original)
+++ fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c Fri Apr 1 12:25:13 2011
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2007, 2009, 2011 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
@@ -18,7 +18,7 @@
#include <errno.h>
#include <fcntl.h>
-#include <sysdep.h>
+#include <sysdep-cancel.h>
/* Reserve storage for the data of the file associated with FD. */
@@ -26,7 +26,17 @@
fallocate64 (int fd, int mode, __off64_t offset, __off64_t len)
{
#ifdef __NR_fallocate
- return INLINE_SYSCALL (fallocate, 4, fd, mode, offset, len);
+ if (SINGLE_THREAD_P)
+ return INLINE_SYSCALL (fallocate, 4, fd, mode, offset, len);
+
+ int result;
+ int oldtype = LIBC_CANCEL_ASYNC ();
+
+ result = INLINE_SYSCALL (fallocate, 4, fd, mode, offset, len);
+
+ LIBC_CANCEL_RESET (oldtype);
+
+ return result;
#else
__set_errno (ENOSYS);
return -1;
Modified: fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list
==============================================================================
--- fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list (original)
+++ fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list Fri Apr 1 12:25:13 2011
@@ -1,7 +1,7 @@
# File name Caller Syscall name # args Strong name Weak names
readahead - readahead i:iii __readahead readahead
-sync_file_range - sync_file_range i:iiii sync_file_range
+sync_file_range - sync_file_range Ci:iiii sync_file_range
ftruncate - ftruncate i:ii __ftruncate ftruncate ftruncate64 __ftruncate64
truncate - truncate i:si truncate truncate64
Modified: fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list
==============================================================================
--- fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list (original)
+++ fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list Fri Apr 1 12:25:13 2011
@@ -1,4 +1,6 @@
# File name Caller Syscall name # args Strong name Weak names
+
+sync_file_range - sync_file_range Ci:iiii sync_file_range
prlimit EXTRA prlimit64 i:iipp prlimit prlimit64