public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* patch for arm socketcall cancellation points
@ 2003-01-13  4:59 Philip Blundell
  2003-01-13  4:59 ` Ulrich Drepper
  0 siblings, 1 reply; 2+ messages in thread
From: Philip Blundell @ 2003-01-13  4:59 UTC (permalink / raw)
  To: libc-hacker

2003-01-11  Philip Blundell  <philb@gnu.org>

	* sysdeps/unix/sysv/linux/arm/socket.S: Add cancellation support.

Index: sysdeps/unix/sysv/linux/arm/socket.S
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/arm/socket.S,v
retrieving revision 1.10
diff -u -r1.10 socket.S
--- sysdeps/unix/sysv/linux/arm/socket.S	8 Jan 2003 00:15:33 -0000	1.10
+++ sysdeps/unix/sysv/linux/arm/socket.S	11 Jan 2003 21:26:06 -0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 1998, 2003 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
@@ -16,7 +16,7 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-#include <sysdep.h>
+#include <sysdep-cancel.h>
 #include <socketcall.h>
 
 #define P(a, b) P2(a, b)
@@ -53,6 +53,10 @@
 #define NARGS 3			/* If we were called with no wrapper, this is really
socket() */
 #endif
 
+#if defined NEED_CANCELLATION && defined CENABLE
+	PSEUDO_PROLOGUE
+#endif
+
 .globl __socket
 ENTRY (__socket)
 	/* This code previously moved sp into ip and stored the args using
@@ -68,6 +72,15 @@
 	/* Push args onto the stack.  */
 	P(PUSHARGS_,NARGS)
 
+#if defined NEED_CANCELLATION && defined CENABLE
+#ifdef PIC
+	SINGLE_THREAD_P_PIC(r3)
+#else
+	SINGLE_THREAD_P
+#endif
+	bne 1f
+#endif
+
         /* Do the system call trap.  */
 	mov a1, $P(SOCKOP_,socket)
 	mov a2, sp
@@ -80,6 +93,30 @@
 	cmn r0, $124
 	RETINSTR(movcc, pc, r14)
 	b PLTJMP(SYSCALL_ERROR)
+
+#if defined NEED_CANCELLATION && defined CENABLE
+1:
+	str lr, [sp, #-4]!
+	CENABLE
+	mov ip, r0
+
+	mov r0, #P(SOCKOP_,socket)
+	add r1, sp, #4
+	swi SYS_ify(socketcall)
+
+	str r0, [sp, #-4]!
+	mov r0, ip
+	CDISABLE
+	ldr r0, [sp], #4
+	ldr lr, [sp], #4
+
+	P(POPARGS_,NARGS)
+
+	/* r0 is < 0 if there was an error.  */
+	cmn r0, $124
+	RETINSTR(movcc, pc, r14)
+	b PLTJMP(SYSCALL_ERROR)
+#endif
 
 PSEUDO_END (__socket)
 



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: patch for arm socketcall cancellation points
  2003-01-13  4:59 patch for arm socketcall cancellation points Philip Blundell
@ 2003-01-13  4:59 ` Ulrich Drepper
  0 siblings, 0 replies; 2+ messages in thread
From: Ulrich Drepper @ 2003-01-13  4:59 UTC (permalink / raw)
  To: Philip Blundell; +Cc: libc-hacker

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Philip Blundell wrote:
> 2003-01-11  Philip Blundell  <philb@gnu.org>
> 
> 	* sysdeps/unix/sysv/linux/arm/socket.S: Add cancellation support.

I've applied the patch.  But please don't use a mailer which ruins a
patch with linebreaks.

- -- 
- --------------.                        ,-.            444 Castro Street
Ulrich Drepper \    ,-----------------'   \ Mountain View, CA 94041 USA
Red Hat         `--' drepper at redhat.com `---------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+ITBV2ijCOnn/RHQRAlGEAKCDyFqT7STFWv0uJiPj31BvZh2AUACeN6DA
ceQdsenyTRrhsr8vIjFVnec=
=SO9n
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-01-12  9:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-13  4:59 patch for arm socketcall cancellation points Philip Blundell
2003-01-13  4:59 ` Ulrich Drepper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).