about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/open64.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-05-25 05:21:07 +0000
committerUlrich Drepper <drepper@redhat.com>2007-05-25 05:21:07 +0000
commit0a54ab53f2bbbd380b019dc665047fb3acf37e3a (patch)
treecb9ed7fadb5d0b66c121ac42ab2c1b62d67a6b2e /sysdeps/unix/sysv/linux/open64.c
parentddfd0535776c47ec01231ac91fabe8b2e128cfa3 (diff)
downloadglibc-0a54ab53f2bbbd380b019dc665047fb3acf37e3a.tar.gz
glibc-0a54ab53f2bbbd380b019dc665047fb3acf37e3a.tar.xz
glibc-0a54ab53f2bbbd380b019dc665047fb3acf37e3a.zip
* sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
	(THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
	THREAD_GSCOPE_FLAG_WAIT): Define.
	(THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
	THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
	* sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
	PTR_DEMANGLE.
	(THREAD_GSCOPE_GET_FLAG): Define.
	* sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
	* allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
	instead of ->header.gscope_flag directly.
Diffstat (limited to 'sysdeps/unix/sysv/linux/open64.c')
-rw-r--r--sysdeps/unix/sysv/linux/open64.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/open64.c b/sysdeps/unix/sysv/linux/open64.c
index a38a31b7a0..c52ce39db1 100644
--- a/sysdeps/unix/sysv/linux/open64.c
+++ b/sysdeps/unix/sysv/linux/open64.c
@@ -63,6 +63,15 @@ __open64_2 (file, oflag)
   if (oflag & O_CREAT)
     __fortify_fail ("invalid open64 call: O_CREAT without mode");
 
-  return __open64 (file, oflag);
+  if (SINGLE_THREAD_P)
+    return INLINE_SYSCALL (open, 2, file, oflag | O_LARGEFILE);
+
+  int oldtype = LIBC_CANCEL_ASYNC ();
+
+  int result = INLINE_SYSCALL (open, 2, file, oflag | O_LARGEFILE);
+
+  LIBC_CANCEL_RESET (oldtype);
+
+  return result;
 }
 #endif