This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] SH: A tiny NPTL update


Hi,

The patch below is similar with that for x86.

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

	* sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
	(__pthread_cond_timedwait): Check for invalid nanosecond in
	timeout value.

diff -u3prN ORIG/libc/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S LOCAL/libc/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
--- ORIG/libc/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S	Tue Jun 29 16:26:54 2004
+++ LOCAL/libc/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S	Wed Jul 14 14:47:16 2004
@@ -62,6 +62,12 @@ __pthread_cond_timedwait:
 	add	r0, r12
 #endif
 
+	mov.l	@(4,r13), r0
+	mov.l	.L1g, r1
+	cmp/hs	r1, r0
+	bt/s	18f
+	 mov	#EINVAL, r0
+
 	/* Get internal lock.  */
 	mov	#0, r3
 	mov	#1, r4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]