This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[libjava] tweak to alpha thread code
- From: Richard Henderson <rth at redhat dot com>
- To: java-patches at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Mon, 11 Oct 2004 10:52:25 -0700
- Subject: [libjava] tweak to alpha thread code
I believe 3.4 added __builtin_thread_pointer. It does the same
thing as the asm that I'm replacing, so there's zero functional
change.
r~
* include/posix-threads.h <__alpha__> (_Jv_ThreadId_t): Use void*.
(_Jv_ThreadSelf): Use __builtin_thread_pointer.
Index: libjava/include/posix-threads.h
===================================================================
RCS file: /cvs/gcc/gcc/libjava/include/posix-threads.h,v
retrieving revision 1.25
diff -c -p -d -u -r1.25 posix-threads.h
--- libjava/include/posix-threads.h 21 Oct 2003 04:46:19 -0000 1.25
+++ libjava/include/posix-threads.h 11 Oct 2004 17:48:24 -0000
@@ -241,23 +241,12 @@ _Jv_ThreadSelf (void)
#ifdef __alpha__
-#ifdef __FreeBSD__
-#include <machine/pal.h>
-#define PAL_rduniq PAL_rdunique
-#elif defined (__osf__)
-#include <machine/pal.h>
-#else
-#include <asm/pal.h>
-#endif
-
-typedef unsigned long _Jv_ThreadId_t;
+typedef void *_Jv_ThreadId_t;
inline _Jv_ThreadId_t
_Jv_ThreadSelf (void)
{
- register unsigned long id __asm__("$0");
- __asm__ ("call_pal %1" : "=r"(id) : "i"(PAL_rduniq));
- return id;
+ return __builtin_thread_pointer ();
}
#define JV_SELF_DEFINED