[Python-checkins] python/dist/src/Python thread_pthread.h, 2.49, 2.50

montanaro at users.sourceforge.net montanaro at users.sourceforge.net
Sat Feb 7 08:00:20 EST 2004


Update of /cvsroot/python/python/dist/src/Python
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16650

Modified Files:
	thread_pthread.h 
Log Message:
Remove support for systems defining Py_PTHREAD_D[467] in
Python/thread_pthread.h.


Index: thread_pthread.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/thread_pthread.h,v
retrieving revision 2.49
retrieving revision 2.50
diff -C2 -d -r2.49 -r2.50
*** thread_pthread.h	17 Jan 2004 00:29:32 -0000	2.49
--- thread_pthread.h	7 Feb 2004 13:00:18 -0000	2.50
***************
*** 21,81 ****
  #endif
  
- 
- /* try to determine what version of the Pthread Standard is installed.
-  * this is important, since all sorts of parameter types changed from
-  * draft to draft and there are several (incompatible) drafts in
-  * common use.  these macros are a start, at least. 
-  * 12 May 1997 -- david arnold <davida at pobox.com>
-  */
- 
- #if defined(__ultrix) && defined(__mips) && defined(_DECTHREADS_)
- /* _DECTHREADS_ is defined in cma.h which is included by pthread.h */
- #  define PY_PTHREAD_D4
- #  error Systems with PY_PTHREAD_D4 are unsupported. See README.
- 
- #elif defined(__osf__) && defined (__alpha)
- /* _DECTHREADS_ is defined in cma.h which is included by pthread.h */
- #  if !defined(_PTHREAD_ENV_ALPHA) || defined(_PTHREAD_USE_D4) || defined(PTHREAD_USE_D4)
- #    define PY_PTHREAD_D4
- #    error Systems with PY_PTHREAD_D4 are unsupported. See README.
- #  else
- #    define PY_PTHREAD_STD
- #  endif
- 
- #elif defined(_AIX)
- /* SCHED_BG_NP is defined if using AIX DCE pthreads
-  * but it is unsupported by AIX 4 pthreads. Default
-  * attributes for AIX 4 pthreads equal to NULL. For
-  * AIX DCE pthreads they should be left unchanged.
-  */
- #  if !defined(SCHED_BG_NP)
- #    define PY_PTHREAD_STD
- #  else
- #    define PY_PTHREAD_D7
- #    error Systems with PY_PTHREAD_D7 are unsupported. See README.
- #  endif
- 
- #elif defined(__hpux) && defined(_DECTHREADS_)
- #  define PY_PTHREAD_D4
- #  error Systems with PY_PTHREAD_D4 are unsupported. See README.
- 
- #else /* Default case */
- #  define PY_PTHREAD_STD
- 
- #endif
- 
- /* set default attribute object for different versions */
- 
- #if defined(PY_PTHREAD_D4) || defined(PY_PTHREAD_D7)
- #if !defined(pthread_attr_default)
- #  define pthread_attr_default pthread_attr_default
- #endif
- #if !defined(pthread_mutexattr_default)
- #  define pthread_mutexattr_default pthread_mutexattr_default
- #endif
- #if !defined(pthread_condattr_default)
- #  define pthread_condattr_default pthread_condattr_default
- #endif
- #elif defined(PY_PTHREAD_STD)
  #if !defined(pthread_attr_default)
  #  define pthread_attr_default ((pthread_attr_t *)NULL)
--- 21,24 ----
***************
*** 87,91 ****
  #  define pthread_condattr_default ((pthread_condattr_t *)NULL)
  #endif
- #endif
  
  
--- 30,33 ----
***************
*** 204,216 ****
  
  	status = pthread_create(&th, 
- #if defined(PY_PTHREAD_D4)
- 				 pthread_attr_default,
- 				 (pthread_startroutine_t)func, 
- 				 (pthread_addr_t)arg
- #elif defined(PY_PTHREAD_D7)
- 				 pthread_attr_default,
- 				 func,
- 				 arg
- #elif defined(PY_PTHREAD_STD)
  #if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
  				 &attrs,
--- 146,149 ----
***************
*** 220,224 ****
  				 (void* (*)(void *))func,
  				 (void *)arg
- #endif
  				 );
  
--- 153,156 ----
***************
*** 232,240 ****
              return -1;
  
- #if defined(PY_PTHREAD_D4) || defined(PY_PTHREAD_D7)
-         pthread_detach(&th);
- #elif defined(PY_PTHREAD_STD)
          pthread_detach(th);
- #endif
  
  #if SIZEOF_PTHREAD_T <= SIZEOF_LONG
--- 164,168 ----




More information about the Python-checkins mailing list