[Python-checkins] python/dist/src/Python thread.c, 2.46, 2.47 thread_pth.h, 2.9, 2.10

loewis at users.sourceforge.net loewis at users.sourceforge.net
Sat Sep 20 07:13:38 EDT 2003


Update of /cvsroot/python/python/dist/src/Python
In directory sc8-pr-cvs1:/tmp/cvs-serv21807/Python

Modified Files:
	thread.c thread_pth.h 
Log Message:
Patch #805613: Fix usage of the PTH library.


Index: thread.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/thread.c,v
retrieving revision 2.46
retrieving revision 2.47
diff -C2 -d -r2.46 -r2.47
*** thread.c	19 Apr 2003 15:41:53 -0000	2.46
--- thread.c	20 Sep 2003 11:13:36 -0000	2.47
***************
*** 99,102 ****
--- 99,103 ----
  #ifdef HAVE_PTH
  #include "thread_pth.h"
+ #undef _POSIX_THREADS
  #endif
  

Index: thread_pth.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/thread_pth.h,v
retrieving revision 2.9
retrieving revision 2.10
diff -C2 -d -r2.9 -r2.10
*** thread_pth.h	19 Jan 2002 22:02:55 -0000	2.9
--- thread_pth.h	20 Sep 2003 11:13:36 -0000	2.10
***************
*** 31,34 ****
--- 31,36 ----
  #define CHECK_STATUS(name)  if (status == -1) { printf("%d ", status); perror(name); error = 1; }
  
+ pth_attr_t PyThread_attr;
+ 
  /*
   * Initialization.
***************
*** 38,41 ****
--- 40,46 ----
  {
  	pth_init();
+ 	PyThread_attr = pth_attr_new();
+ 	pth_attr_set(PyThread_attr, PTH_ATTR_STACK_SIZE, 1<<18);
+ 	pth_attr_set(PyThread_attr, PTH_ATTR_JOINABLE, FALSE);
  }
  
***************
*** 52,56 ****
  		PyThread_init_thread();
  
! 	th = pth_spawn(PTH_ATTR_DEFAULT,
  				 (void* (*)(void *))func,
  				 (void *)arg
--- 57,61 ----
  		PyThread_init_thread();
  
! 	th = pth_spawn(PyThread_attr,
  				 (void* (*)(void *))func,
  				 (void *)arg





More information about the Python-checkins mailing list