public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] SH linuxthreads: Fix cancellation for librt
@ 2004-07-14 13:54 Kaz Kojima
  0 siblings, 0 replies; only message in thread
From: Kaz Kojima @ 2004-07-14 13:54 UTC (permalink / raw)
  To: libc-hacker

Hi,

The appended patch defines missing stuff for cancellation in librt.
Without it, librt.so fails to build with 2.6.7 kernel headers.

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

	* sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
	(__local_multiple_threads): Define for librt.
	(SINGLE_THREAD_P): Likewise.

diff -u3prN ORIG/libc/linuxthreads/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h LOCAL/libc/linuxthreads/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
--- ORIG/libc/linuxthreads/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h	Mon Jul  5 11:14:03 2004
+++ LOCAL/libc/linuxthreads/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h	Wed Jul 14 18:54:01 2004
@@ -99,6 +99,7 @@
 # else
 #  define __local_enable_asynccancel	__librt_enable_asynccancel
 #  define __local_disable_asynccancel	__librt_disable_asynccancel
+#  define __local_multiple_threads	__librt_multiple_threads
 # endif
 
 # if defined IS_IN_librt && defined PIC
@@ -183,7 +184,8 @@ extern int __local_multiple_threads attr
      1:
 
 #  else
-#   define SINGLE_THREAD_P \
+#   if !defined NOT_IN_libc || defined IS_IN_libpthread
+#    define SINGLE_THREAD_P \
 	mov r12,r2; \
 	mov.l 0f,r12; \
 	mova 0f,r0; \
@@ -197,6 +199,23 @@ extern int __local_multiple_threads attr
      0: .long _GLOBAL_OFFSET_TABLE_; \
      1: .long __local_multiple_threads@GOTOFF; \
      2:
+#   else
+#    define SINGLE_THREAD_P \
+	mov r12,r2; \
+	mov.l 0f,r12; \
+	mova 0f,r0; \
+	add r0,r12; \
+	mov.l 1f,r0; \
+	mov.l @(r0,r12),r0; \
+	mov.l @r0,r0; \
+	mov r2,r12; \
+	bra 2f; \
+	 tst r0,r0; \
+	.align 2; \
+     0: .long _GLOBAL_OFFSET_TABLE_; \
+     1: .long __local_multiple_threads@GOT; \
+     2:
+#   endif
 #  endif
 # endif
 

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

only message in thread, other threads:[~2004-07-14 13:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-14 13:54 [PATCH] SH linuxthreads: Fix cancellation for librt 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).