This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[committed] Adapt __tpf_thread_active check
- From: Ulrich Weigand <uweigand at de dot ibm dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: jjohnst at us dot ibm dot com
- Date: Thu, 30 Jun 2005 18:09:09 +0200 (CEST)
- Subject: [committed] Adapt __tpf_thread_active check
Hello,
this patch changes the __tpf_pthread_active macro to check
a different field within TPF system control structures, as
requested (and tested) by the TPF team.
Committed to mainline.
Bye,
Ulrich
2005-06-30 J. D. Johnston <jjohnst@us.ibm.com>
* gthr-tpf.h (CE2THRCPTR): Change field offset to 16.
Index: gcc/gthr-tpf.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/gthr-tpf.h,v
retrieving revision 2.3
diff -c -p -r2.3 gthr-tpf.h
*** gcc/gthr-tpf.h 25 Jun 2005 02:00:22 -0000 2.3
--- gcc/gthr-tpf.h 30 Jun 2005 15:57:08 -0000
*************** typedef pthread_mutex_t __gthread_recurs
*** 65,71 ****
#define NOTATHREAD 00
#define ECBBASEPTR (unsigned long int) *(unsigned int *)0x00000514u
#define ECBPG2PTR ECBBASEPTR + 0x1000
! #define CE2THRCPTR *((unsigned char *)(ECBPG2PTR + 208))
#define __tpf_pthread_active() (CE2THRCPTR != NOTATHREAD)
#if SUPPORTS_WEAK && GTHREAD_USE_WEAK
--- 65,71 ----
#define NOTATHREAD 00
#define ECBBASEPTR (unsigned long int) *(unsigned int *)0x00000514u
#define ECBPG2PTR ECBBASEPTR + 0x1000
! #define CE2THRCPTR *((unsigned char *)(ECBPG2PTR + 16))
#define __tpf_pthread_active() (CE2THRCPTR != NOTATHREAD)
#if SUPPORTS_WEAK && GTHREAD_USE_WEAK
--
Dr. Ulrich Weigand
Linux on zSeries Development
Ulrich.Weigand@de.ibm.com