public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] SH fix for socket syscall wrapper
@ 2003-07-12  1:06 kaz Kojima
  0 siblings, 0 replies; only message in thread
From: kaz Kojima @ 2003-07-12  1:06 UTC (permalink / raw)
  To: libc-hacker

Hi,

SH's __socket syscall wrapper is broken for the cancellation case.
Here is a fix.

Regards,
	kaz
--
2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>

	* sysdeps/unix/sysv/linux/sh/socket.S: Save and restore the PR
	register across CENABLE and CDISABLE.
	
diff -u3prN ORIG/libc/sysdeps/unix/sysv/linux/sh/socket.S LOCAL/libc/sysdeps/unix/sysv/linux/sh/socket.S
--- ORIG/libc/sysdeps/unix/sysv/linux/sh/socket.S	Wed Jan  8 08:37:36 2003
+++ LOCAL/libc/sysdeps/unix/sysv/linux/sh/socket.S	Thu Jul 10 13:19:45 2003
@@ -94,7 +94,9 @@ ENTRY (__socket)
 #if defined NEED_CANCELLATION && defined CENABLE
 .Lsocket_cancel:
 	/* Enable asynchronous cancellation.  */
+	sts.l pr,@-r15
 	CENABLE
+	lds.l @r15+,pr
 
 	/* Do the system call trap.  */
 	mov #+P(SOCKOP_,socket), r4
@@ -102,9 +104,11 @@ ENTRY (__socket)
 	mov.l .L1,r3
 	trapa #0x12
 
+	sts.l pr,@-r15
 	mov.l r0,@-r15
 	CDISABLE
 	mov.l @r15+,r0
+	lds.l @r15+,pr
 
 	/* Pop args off the stack */
 	P(POPARGS_,NARGS)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-07-12  1:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-12  1:06 [PATCH] SH fix for socket syscall wrapper kaz Kojima

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).