This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


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

[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


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