public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] SH: A tiny nptl fix
@ 2004-06-03 15:01 Kaz Kojima
  2004-06-03 15:29 ` Ulrich Drepper
  0 siblings, 1 reply; 4+ messages in thread
From: Kaz Kojima @ 2004-06-03 15:01 UTC (permalink / raw)
  To: libc-hacker

Hi,

The end address of a critical section in a software atomic sequence
of SH must have 4-byte alignment, because MOVA instruction needs it.
The attached patch fixes a few mistakes about that.

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

	* sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
	Add nop to align the end of critical section.
	(lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.

diff -u3prN ORIG/libc/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h LOCAL/libc/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h
--- ORIG/libc/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h	Tue Mar 30 10:41:09 2004
+++ LOCAL/libc/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h	Thu Jun  3 22:57:03 2004
@@ -89,6 +89,7 @@ extern int __lll_mutex_unlock_wake (int 
 	    __asm __volatile ("\
 		.align 2\n\
 		mova 1f,r0\n\
+		nop\n\
 		mov r15,r1\n\
 		mov #-8,r15\n\
 	     0: mov.l @%2,%0\n\
@@ -108,6 +109,7 @@ extern int __lll_mutex_unlock_wake (int 
 	    __asm __volatile ("\
 		.align 2\n\
 		mova 1f,r0\n\
+		nop\n\
 		mov r15,r1\n\
 		mov #-8,r15\n\
 	     0: mov.l @%2,%0\n\
@@ -125,6 +127,7 @@ extern int __lll_mutex_unlock_wake (int 
      __asm __volatile ("\
 	.align 2\n\
 	mova 1f,r0\n\
+	nop\n\
 	mov r15,r1\n\
 	mov #-8,r15\n\
      0: mov.l @%2,%0\n\

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

* Re: [PATCH] SH: A tiny nptl fix
  2004-06-03 15:01 [PATCH] SH: A tiny nptl fix Kaz Kojima
@ 2004-06-03 15:29 ` Ulrich Drepper
  0 siblings, 0 replies; 4+ messages in thread
From: Ulrich Drepper @ 2004-06-03 15:29 UTC (permalink / raw)
  To: Kaz Kojima; +Cc: libc-hacker

Applied.

-- 
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖

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

* Re: [PATCH] SH: A tiny NPTL fix
  2004-11-18  9:07 [PATCH] SH: A tiny NPTL fix Kaz Kojima
@ 2004-11-19  0:00 ` Ulrich Drepper
  0 siblings, 0 replies; 4+ messages in thread
From: Ulrich Drepper @ 2004-11-19  0:00 UTC (permalink / raw)
  To: Kaz Kojima; +Cc: libc-hacker

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

Applied.

- --
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFBnTds2ijCOnn/RHQRAkTyAJ460GqRHsd4dXPduM7SPUnGAI91LgCeJfre
qIfzDrWo/qfz1lVbz2xyeK8=
=/oK+
-----END PGP SIGNATURE-----

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

* [PATCH] SH: A tiny NPTL fix
@ 2004-11-18  9:07 Kaz Kojima
  2004-11-19  0:00 ` Ulrich Drepper
  0 siblings, 1 reply; 4+ messages in thread
From: Kaz Kojima @ 2004-11-18  9:07 UTC (permalink / raw)
  To: libc-hacker

Hi,

The patch below is to pass the correct bias parameter to the REGISTER
macro at the definition of DB_THREAD_SELF.

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

	* sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
	parameter to REGISTER macro.

diff -u3prN ORIG/libc/nptl/sysdeps/sh/tls.h LOCAL/libc/nptl/sysdeps/sh/tls.h
--- ORIG/libc/nptl/sysdeps/sh/tls.h	Sat Jan 10 23:23:23 2004
+++ LOCAL/libc/nptl/sysdeps/sh/tls.h	Wed Nov 17 16:41:20 2004
@@ -118,7 +118,8 @@ typedef struct
      __self - 1;})
 
 /* Magic for libthread_db to know how to do THREAD_SELF.  */
-# define DB_THREAD_SELF REGISTER (32, 32, REG_GBR * 4, 0)
+# define DB_THREAD_SELF \
+  REGISTER (32, 32, REG_GBR * 4, -sizeof (struct pthread))
 
 /* Read member of the thread descriptor directly.  */
 # define THREAD_GETMEM(descr, member) (descr->member)

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

end of thread, other threads:[~2004-11-19  0:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-03 15:01 [PATCH] SH: A tiny nptl fix Kaz Kojima
2004-06-03 15:29 ` Ulrich Drepper
2004-11-18  9:07 [PATCH] SH: A tiny NPTL fix Kaz Kojima
2004-11-19  0:00 ` 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).