[Python-checkins] CVS: python/dist/src/Python thread_beos.h,2.2,2.3 thread_cthread.h,2.8,2.9 thread_foobar.h,2.6,2.7 thread_lwp.h,2.7,2.8 thread_nt.h,2.11,2.12 thread_os2.h,2.5,2.6 thread_pth.h,2.1,2.2 thread_pthread.h,2.24,2.25 thread_sgi.h,2.9,2.10 thread_solaris.h,2.10,2.11 thread_wince.h,2.1,2.2

Fred L. Drake python-dev@python.org
Fri, 30 Jun 2000 08:01:02 -0700


Update of /cvsroot/python/python/dist/src/Python
In directory slayer.i.sourceforge.net:/tmp/cvs-serv13110/Python

Modified Files:
	thread_beos.h thread_cthread.h thread_foobar.h thread_lwp.h 
	thread_nt.h thread_os2.h thread_pth.h thread_pthread.h 
	thread_sgi.h thread_solaris.h thread_wince.h 
Log Message:
Trent Mick <trentm@activestate.com>:

The common technique for printing out a pointer has been to cast to a long 
and use the "%lx" printf modifier. This is incorrect on Win64 where casting 
to a long truncates the pointer. The "%p" formatter should be used instead. 

The problem as stated by Tim: 
> Unfortunately, the C committee refused to define what %p conversion "looks 
> like" -- they explicitly allowed it to be implementation-defined. Older 
> versions of Microsoft C even stuck a colon in the middle of the address (in 
> the days of segment+offset addressing)! 

The result is that the hex value of a pointer will maybe/maybe not have a 0x 
prepended to it. 


Notes on the patch: 

There are two main classes of changes: 
- in the various repr() functions that print out pointers 
- debugging printf's in the various thread_*.h files (these are why the 
patch is large)


Closes SourceForge patch #100505.


Index: thread_beos.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/thread_beos.h,v
retrieving revision 2.2
retrieving revision 2.3
diff -C2 -r2.2 -r2.3
*** thread_beos.h	1998/12/21 19:32:29	2.2
--- thread_beos.h	2000/06/30 15:01:00	2.3
***************
*** 263,267 ****
  	}
  
! 	dprintf(("PyThread_allocate_lock() -> %lx\n", (long)lock));
  	return (PyThread_type_lock) lock;
  }
--- 263,267 ----
  	}
  
! 	dprintf(("PyThread_allocate_lock() -> %p\n", lock));
  	return (PyThread_type_lock) lock;
  }
***************
*** 271,275 ****
  	status_t retval;
  
! 	dprintf(("PyThread_free_lock(%lx) called\n", (long)lock));
  	
  	retval = benaphore_destroy( (benaphore_t *)lock );
--- 271,275 ----
  	status_t retval;
  
! 	dprintf(("PyThread_free_lock(%p) called\n", lock));
  	
  	retval = benaphore_destroy( (benaphore_t *)lock );
***************
*** 285,289 ****
  	status_t retval;
  
! 	dprintf(("PyThread_acquire_lock(%lx, %d) called\n", (long)lock, waitflag));
  
  	if( waitflag ) {
--- 285,289 ----
  	status_t retval;
  
! 	dprintf(("PyThread_acquire_lock(%p, %d) called\n", lock, waitflag));
  
  	if( waitflag ) {
***************
*** 301,305 ****
  	}
  
! 	dprintf(("PyThread_acquire_lock(%lx, %d) -> %d\n", (long)lock, waitflag, success));
  	return success;
  }
--- 301,305 ----
  	}
  
! 	dprintf(("PyThread_acquire_lock(%p, %d) -> %d\n", lock, waitflag, success));
  	return success;
  }
***************
*** 309,313 ****
  	status_t retval;
  	
! 	dprintf(("PyThread_release_lock(%lx) called\n", (long)lock));
  	
  	retval = benaphore_unlock( (benaphore_t *)lock );
--- 309,313 ----
  	status_t retval;
  	
! 	dprintf(("PyThread_release_lock(%p) called\n", lock));
  	
  	retval = benaphore_unlock( (benaphore_t *)lock );
***************
*** 337,341 ****
  	}
  
! 	dprintf(("PyThread_allocate_sema() -> %lx\n", (long) sema));
  	return (PyThread_type_sema) sema;
  }
--- 337,341 ----
  	}
  
! 	dprintf(("PyThread_allocate_sema() -> %p\n", sema));
  	return (PyThread_type_sema) sema;
  }
***************
*** 345,349 ****
  	status_t retval;
  	
! 	dprintf(("PyThread_free_sema(%lx) called\n", (long) sema));
  	
  	retval = delete_sem( (sem_id)sema );
--- 345,349 ----
  	status_t retval;
  	
! 	dprintf(("PyThread_free_sema(%p) called\n", sema));
  	
  	retval = delete_sem( (sem_id)sema );
***************
*** 358,362 ****
  	status_t retval;
  
! 	dprintf(("PyThread_down_sema(%lx, %d) called\n", (long) sema, waitflag));
  
  	if( waitflag ) {
--- 358,362 ----
  	status_t retval;
  
! 	dprintf(("PyThread_down_sema(%p, %d) called\n", sema, waitflag));
  
  	if( waitflag ) {
***************
*** 371,375 ****
  	}
  
! 	dprintf(("PyThread_down_sema(%lx) return\n", (long) sema));
  	return -1;
  }
--- 371,375 ----
  	}
  
! 	dprintf(("PyThread_down_sema(%p) return\n", sema));
  	return -1;
  }
***************
*** 379,383 ****
  	status_t retval;
  	
! 	dprintf(("PyThread_up_sema(%lx)\n", (long) sema));
  	
  	retval = release_sem( (sem_id)sema );
--- 379,383 ----
  	status_t retval;
  	
! 	dprintf(("PyThread_up_sema(%p)\n", sema));
  	
  	retval = release_sem( (sem_id)sema );

Index: thread_cthread.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/thread_cthread.h,v
retrieving revision 2.8
retrieving revision 2.9
diff -C2 -r2.8 -r2.9
*** thread_cthread.h	1998/12/21 19:32:30	2.8
--- thread_cthread.h	2000/06/30 15:01:00	2.9
***************
*** 130,134 ****
  		lock = 0;
  	}
! 	dprintf(("PyThread_allocate_lock() -> %lx\n", (long)lock));
  	return (PyThread_type_lock) lock;
  }
--- 130,134 ----
  		lock = 0;
  	}
! 	dprintf(("PyThread_allocate_lock() -> %p\n", lock));
  	return (PyThread_type_lock) lock;
  }
***************
*** 136,140 ****
  void PyThread_free_lock _P1(lock, PyThread_type_lock lock)
  {
! 	dprintf(("PyThread_free_lock(%lx) called\n", (long)lock));
  	mutex_free(lock);
  }
--- 136,140 ----
  void PyThread_free_lock _P1(lock, PyThread_type_lock lock)
  {
! 	dprintf(("PyThread_free_lock(%p) called\n", lock));
  	mutex_free(lock);
  }
***************
*** 144,148 ****
  	int success = FALSE;
  
! 	dprintf(("PyThread_acquire_lock(%lx, %d) called\n", (long)lock, waitflag));
  	if (waitflag) { 	/* blocking */
  		mutex_lock(lock);
--- 144,148 ----
  	int success = FALSE;
  
! 	dprintf(("PyThread_acquire_lock(%p, %d) called\n", lock, waitflag));
  	if (waitflag) { 	/* blocking */
  		mutex_lock(lock);
***************
*** 151,155 ****
  		success = mutex_try_lock(lock);
  	}
! 	dprintf(("PyThread_acquire_lock(%lx, %d) -> %d\n", (long)lock, waitflag, success));
  	return success;
  }
--- 151,155 ----
  		success = mutex_try_lock(lock);
  	}
! 	dprintf(("PyThread_acquire_lock(%p, %d) -> %d\n", lock, waitflag, success));
  	return success;
  }
***************
*** 157,161 ****
  void PyThread_release_lock _P1(lock, PyThread_type_lock lock)
  {
! 	dprintf(("PyThread_release_lock(%lx) called\n", (long)lock));
  	mutex_unlock((mutex_t )lock);
  }
--- 157,161 ----
  void PyThread_release_lock _P1(lock, PyThread_type_lock lock)
  {
! 	dprintf(("PyThread_release_lock(%p) called\n", lock));
  	mutex_unlock((mutex_t )lock);
  }
***************
*** 182,186 ****
  		PyThread_init_thread();
  
! 	dprintf(("PyThread_allocate_sema() -> %lx\n", (long) sema));
  	return (PyThread_type_sema) sema;
  }
--- 182,186 ----
  		PyThread_init_thread();
  
! 	dprintf(("PyThread_allocate_sema() -> %p\n", sema));
  	return (PyThread_type_sema) sema;
  }
***************
*** 188,198 ****
  void PyThread_free_sema _P1(sema, PyThread_type_sema sema)
  {
! 	dprintf(("PyThread_free_sema(%lx) called\n", (long) sema));
  }
  
  int PyThread_down_sema _P2(sema, PyThread_type_sema sema, waitflag, int waitflag)
  {
! 	dprintf(("PyThread_down_sema(%lx, %d) called\n", (long) sema, waitflag));
! 	dprintf(("PyThread_down_sema(%lx) return\n", (long) sema));
  	return -1;
  }
--- 188,198 ----
  void PyThread_free_sema _P1(sema, PyThread_type_sema sema)
  {
! 	dprintf(("PyThread_free_sema(%p) called\n", sema));
  }
  
  int PyThread_down_sema _P2(sema, PyThread_type_sema sema, waitflag, int waitflag)
  {
! 	dprintf(("PyThread_down_sema(%p, %d) called\n", sema, waitflag));
! 	dprintf(("PyThread_down_sema(%p) return\n", sema));
  	return -1;
  }
***************
*** 200,203 ****
  void PyThread_up_sema _P1(sema, PyThread_type_sema sema)
  {
! 	dprintf(("PyThread_up_sema(%lx)\n", (long) sema));
  }
--- 200,203 ----
  void PyThread_up_sema _P1(sema, PyThread_type_sema sema)
  {
! 	dprintf(("PyThread_up_sema(%p)\n", sema));
  }

Index: thread_foobar.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/thread_foobar.h,v
retrieving revision 2.6
retrieving revision 2.7
diff -C2 -r2.6 -r2.7
*** thread_foobar.h	1998/12/21 19:32:30	2.6
--- thread_foobar.h	2000/06/30 15:01:00	2.7
***************
*** 109,113 ****
  		PyThread_init_thread();
  
! 	dprintf(("PyThread_allocate_lock() -> %lx\n", (long)lock));
  	return (PyThread_type_lock) lock;
  }
--- 109,113 ----
  		PyThread_init_thread();
  
! 	dprintf(("PyThread_allocate_lock() -> %p\n", lock));
  	return (PyThread_type_lock) lock;
  }
***************
*** 115,119 ****
  void PyThread_free_lock _P1(lock, PyThread_type_lock lock)
  {
! 	dprintf(("PyThread_free_lock(%lx) called\n", (long)lock));
  }
  
--- 115,119 ----
  void PyThread_free_lock _P1(lock, PyThread_type_lock lock)
  {
! 	dprintf(("PyThread_free_lock(%p) called\n", lock));
  }
  
***************
*** 122,127 ****
  	int success;
  
! 	dprintf(("PyThread_acquire_lock(%lx, %d) called\n", (long)lock, waitflag));
! 	dprintf(("PyThread_acquire_lock(%lx, %d) -> %d\n", (long)lock, waitflag, success));
  	return success;
  }
--- 122,127 ----
  	int success;
  
! 	dprintf(("PyThread_acquire_lock(%p, %d) called\n", lock, waitflag));
! 	dprintf(("PyThread_acquire_lock(%p, %d) -> %d\n", lock, waitflag, success));
  	return success;
  }
***************
*** 129,133 ****
  void PyThread_release_lock _P1(lock, PyThread_type_lock lock)
  {
! 	dprintf(("PyThread_release_lock(%lx) called\n", (long)lock));
  }
  
--- 129,133 ----
  void PyThread_release_lock _P1(lock, PyThread_type_lock lock)
  {
! 	dprintf(("PyThread_release_lock(%p) called\n", lock));
  }
  
***************
*** 141,145 ****
  		PyThread_init_thread();
  
! 	dprintf(("PyThread_allocate_sema() -> %lx\n", (long) sema));
  	return (PyThread_type_sema) sema;
  }
--- 141,145 ----
  		PyThread_init_thread();
  
! 	dprintf(("PyThread_allocate_sema() -> %p\n",  sema));
  	return (PyThread_type_sema) sema;
  }
***************
*** 147,157 ****
  void PyThread_free_sema _P1(sema, PyThread_type_sema sema)
  {
! 	dprintf(("PyThread_free_sema(%lx) called\n", (long) sema));
  }
  
  int PyThread_down_sema _P2(sema, PyThread_type_sema sema, waitflag, int waitflag)
  {
! 	dprintf(("PyThread_down_sema(%lx, %d) called\n", (long) sema, waitflag));
! 	dprintf(("PyThread_down_sema(%lx) return\n", (long) sema));
  	return -1;
  }
--- 147,157 ----
  void PyThread_free_sema _P1(sema, PyThread_type_sema sema)
  {
! 	dprintf(("PyThread_free_sema(%p) called\n",  sema));
  }
  
  int PyThread_down_sema _P2(sema, PyThread_type_sema sema, waitflag, int waitflag)
  {
! 	dprintf(("PyThread_down_sema(%p, %d) called\n",  sema, waitflag));
! 	dprintf(("PyThread_down_sema(%p) return\n",  sema));
  	return -1;
  }
***************
*** 159,162 ****
  void PyThread_up_sema _P1(sema, PyThread_type_sema sema)
  {
! 	dprintf(("PyThread_up_sema(%lx)\n", (long) sema));
  }
--- 159,162 ----
  void PyThread_up_sema _P1(sema, PyThread_type_sema sema)
  {
! 	dprintf(("PyThread_up_sema(%p)\n",  sema));
  }

Index: thread_lwp.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/thread_lwp.h,v
retrieving revision 2.7
retrieving revision 2.8
diff -C2 -r2.7 -r2.8
*** thread_lwp.h	1998/12/21 19:32:31	2.7
--- thread_lwp.h	2000/06/30 15:01:00	2.8
***************
*** 138,142 ****
  	(void) mon_create(&lock->lock_monitor);
  	(void) cv_create(&lock->lock_condvar, lock->lock_monitor);
! 	dprintf(("PyThread_allocate_lock() -> %lx\n", (long)lock));
  	return (PyThread_type_lock) lock;
  }
--- 138,142 ----
  	(void) mon_create(&lock->lock_monitor);
  	(void) cv_create(&lock->lock_condvar, lock->lock_monitor);
! 	dprintf(("PyThread_allocate_lock() -> %p\n", lock));
  	return (PyThread_type_lock) lock;
  }
***************
*** 144,148 ****
  void PyThread_free_lock _P1(lock, PyThread_type_lock lock)
  {
! 	dprintf(("PyThread_free_lock(%lx) called\n", (long)lock));
  	mon_destroy(((struct lock *) lock)->lock_monitor);
  	free((char *) lock);
--- 144,148 ----
  void PyThread_free_lock _P1(lock, PyThread_type_lock lock)
  {
! 	dprintf(("PyThread_free_lock(%p) called\n", lock));
  	mon_destroy(((struct lock *) lock)->lock_monitor);
  	free((char *) lock);
***************
*** 153,157 ****
  	int success;
  
! 	dprintf(("PyThread_acquire_lock(%lx, %d) called\n", (long)lock, waitflag));
  	success = 0;
  
--- 153,157 ----
  	int success;
  
! 	dprintf(("PyThread_acquire_lock(%p, %d) called\n", lock, waitflag));
  	success = 0;
  
***************
*** 166,170 ****
  	cv_broadcast(((struct lock *) lock)->lock_condvar);
  	mon_exit(((struct lock *) lock)->lock_monitor);
! 	dprintf(("PyThread_acquire_lock(%lx, %d) -> %d\n", (long)lock, waitflag, success));
  	return success;
  }
--- 166,170 ----
  	cv_broadcast(((struct lock *) lock)->lock_condvar);
  	mon_exit(((struct lock *) lock)->lock_monitor);
! 	dprintf(("PyThread_acquire_lock(%p, %d) -> %d\n", lock, waitflag, success));
  	return success;
  }
***************
*** 172,176 ****
  void PyThread_release_lock _P1(lock, PyThread_type_lock lock)
  {
! 	dprintf(("PyThread_release_lock(%lx) called\n", (long)lock));
  	(void) mon_enter(((struct lock *) lock)->lock_monitor);
  	((struct lock *) lock)->lock_locked = 0;
--- 172,176 ----
  void PyThread_release_lock _P1(lock, PyThread_type_lock lock)
  {
! 	dprintf(("PyThread_release_lock(%p) called\n", lock));
  	(void) mon_enter(((struct lock *) lock)->lock_monitor);
  	((struct lock *) lock)->lock_locked = 0;
***************
*** 189,193 ****
  		PyThread_init_thread();
  
! 	dprintf(("PyThread_allocate_sema() -> %lx\n", (long) sema));
  	return (PyThread_type_sema) sema;
  }
--- 189,193 ----
  		PyThread_init_thread();
  
! 	dprintf(("PyThread_allocate_sema() -> %p\n",  sema));
  	return (PyThread_type_sema) sema;
  }
***************
*** 195,205 ****
  void PyThread_free_sema _P1(sema, PyThread_type_sema sema)
  {
! 	dprintf(("PyThread_free_sema(%lx) called\n", (long) sema));
  }
  
  int PyThread_down_sema _P2(sema, PyThread_type_sema sema, waitflag, int waitflag)
  {
! 	dprintf(("PyThread_down_sema(%lx, %d) called\n", (long) sema, waitflag));
! 	dprintf(("PyThread_down_sema(%lx) return\n", (long) sema));
  	return -1;
  }
--- 195,205 ----
  void PyThread_free_sema _P1(sema, PyThread_type_sema sema)
  {
! 	dprintf(("PyThread_free_sema(%p) called\n",  sema));
  }
  
  int PyThread_down_sema _P2(sema, PyThread_type_sema sema, waitflag, int waitflag)
  {
! 	dprintf(("PyThread_down_sema(%p, %d) called\n",  sema, waitflag));
! 	dprintf(("PyThread_down_sema(%p) return\n",  sema));
  	return -1;
  }
***************
*** 207,210 ****
  void PyThread_up_sema _P1(sema, PyThread_type_sema sema)
  {
! 	dprintf(("PyThread_up_sema(%lx)\n", (long) sema));
  }
--- 207,210 ----
  void PyThread_up_sema _P1(sema, PyThread_type_sema sema)
  {
! 	dprintf(("PyThread_up_sema(%p)\n",  sema));
  }

Index: thread_nt.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/thread_nt.h,v
retrieving revision 2.11
retrieving revision 2.12
diff -C2 -r2.11 -r2.12
*** thread_nt.h	2000/06/29 17:25:30	2.11
--- thread_nt.h	2000/06/30 15:01:00	2.12
***************
*** 274,278 ****
  	aLock = AllocNonRecursiveMutex() ;
  
! 	dprintf(("%ld: PyThread_allocate_lock() -> %lx\n", PyThread_get_thread_ident(), (long)aLock));
  
  	return (PyThread_type_lock) aLock;
--- 274,278 ----
  	aLock = AllocNonRecursiveMutex() ;
  
! 	dprintf(("%ld: PyThread_allocate_lock() -> %p\n", PyThread_get_thread_ident(), aLock));
  
  	return (PyThread_type_lock) aLock;
***************
*** 281,285 ****
  void PyThread_free_lock(PyThread_type_lock aLock)
  {
! 	dprintf(("%ld: PyThread_free_lock(%lx) called\n", PyThread_get_thread_ident(),(long)aLock));
  
  	FreeNonRecursiveMutex(aLock) ;
--- 281,285 ----
  void PyThread_free_lock(PyThread_type_lock aLock)
  {
! 	dprintf(("%ld: PyThread_free_lock(%p) called\n", PyThread_get_thread_ident(),aLock));
  
  	FreeNonRecursiveMutex(aLock) ;
***************
*** 296,304 ****
  	int success ;
  
! 	dprintf(("%ld: PyThread_acquire_lock(%lx, %d) called\n", PyThread_get_thread_ident(),(long)aLock, waitflag));
  
  	success = aLock && EnterNonRecursiveMutex((PNRMUTEX) aLock, (waitflag == 1 ? INFINITE : 0)) == WAIT_OBJECT_0 ;
  
! 	dprintf(("%ld: PyThread_acquire_lock(%lx, %d) -> %d\n", PyThread_get_thread_ident(),(long)aLock, waitflag, success));
  
  	return success;
--- 296,304 ----
  	int success ;
  
! 	dprintf(("%ld: PyThread_acquire_lock(%p, %d) called\n", PyThread_get_thread_ident(),aLock, waitflag));
  
  	success = aLock && EnterNonRecursiveMutex((PNRMUTEX) aLock, (waitflag == 1 ? INFINITE : 0)) == WAIT_OBJECT_0 ;
  
! 	dprintf(("%ld: PyThread_acquire_lock(%p, %d) -> %d\n", PyThread_get_thread_ident(),aLock, waitflag, success));
  
  	return success;
***************
*** 307,314 ****
  void PyThread_release_lock(PyThread_type_lock aLock)
  {
! 	dprintf(("%ld: PyThread_release_lock(%lx) called\n", PyThread_get_thread_ident(),(long)aLock));
  
  	if (!(aLock && LeaveNonRecursiveMutex((PNRMUTEX) aLock)))
! 		dprintf(("%ld: Could not PyThread_release_lock(%lx) error: %l\n", PyThread_get_thread_ident(), (long)aLock, GetLastError()));
  }
  
--- 307,314 ----
  void PyThread_release_lock(PyThread_type_lock aLock)
  {
! 	dprintf(("%ld: PyThread_release_lock(%p) called\n", PyThread_get_thread_ident(),aLock));
  
  	if (!(aLock && LeaveNonRecursiveMutex((PNRMUTEX) aLock)))
! 		dprintf(("%ld: Could not PyThread_release_lock(%p) error: %l\n", PyThread_get_thread_ident(), aLock, GetLastError()));
  }
  
***************
*** 329,333 ****
  	                              NULL);          /* Name of semaphore            */
  
! 	dprintf(("%ld: PyThread_allocate_sema() -> %lx\n", PyThread_get_thread_ident(), (long)aSemaphore));
  
  	return (PyThread_type_sema) aSemaphore;
--- 329,333 ----
  	                              NULL);          /* Name of semaphore            */
  
! 	dprintf(("%ld: PyThread_allocate_sema() -> %p\n", PyThread_get_thread_ident(), aSemaphore));
  
  	return (PyThread_type_sema) aSemaphore;
***************
*** 336,340 ****
  void PyThread_free_sema(PyThread_type_sema aSemaphore)
  {
! 	dprintf(("%ld: PyThread_free_sema(%lx) called\n", PyThread_get_thread_ident(), (long)aSemaphore));
  
  	CloseHandle((HANDLE) aSemaphore);
--- 336,340 ----
  void PyThread_free_sema(PyThread_type_sema aSemaphore)
  {
! 	dprintf(("%ld: PyThread_free_sema(%p) called\n", PyThread_get_thread_ident(), aSemaphore));
  
  	CloseHandle((HANDLE) aSemaphore);
***************
*** 348,356 ****
  	DWORD waitResult;
  
! 	dprintf(("%ld: PyThread_down_sema(%lx) called\n", PyThread_get_thread_ident(), (long)aSemaphore));
  
  	waitResult = WaitForSingleObject( (HANDLE) aSemaphore, INFINITE);
  
! 	dprintf(("%ld: PyThread_down_sema(%lx) return: %l\n", PyThread_get_thread_ident(),(long) aSemaphore, waitResult));
  	return 0;
  }
--- 348,356 ----
  	DWORD waitResult;
  
! 	dprintf(("%ld: PyThread_down_sema(%p) called\n", PyThread_get_thread_ident(), aSemaphore));
  
  	waitResult = WaitForSingleObject( (HANDLE) aSemaphore, INFINITE);
  
! 	dprintf(("%ld: PyThread_down_sema(%p) return: %l\n", PyThread_get_thread_ident(), aSemaphore, waitResult));
  	return 0;
  }
***************
*** 363,366 ****
                  NULL);                          /* not interested in previous count             */
                                                  
! 	dprintf(("%ld: PyThread_up_sema(%lx)\n", PyThread_get_thread_ident(), (long)aSemaphore));
  }
--- 363,366 ----
                  NULL);                          /* not interested in previous count             */
                                                  
! 	dprintf(("%ld: PyThread_up_sema(%p)\n", PyThread_get_thread_ident(), aSemaphore));
  }

Index: thread_os2.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/thread_os2.h,v
retrieving revision 2.5
retrieving revision 2.6
diff -C2 -r2.5 -r2.6
*** thread_os2.h	1998/12/21 19:32:33	2.5
--- thread_os2.h	2000/06/30 15:01:00	2.6
***************
*** 142,146 ****
                      0);    /* initial state */  
  
!   dprintf(("%ld: PyThread_allocate_lock() -> %lx\n", PyThread_get_thread_ident(), (long)aLock));
  
    return (PyThread_type_lock) aLock;
--- 142,146 ----
                      0);    /* initial state */  
  
!   dprintf(("%ld: PyThread_allocate_lock() -> %p\n", PyThread_get_thread_ident(), aLock));
  
    return (PyThread_type_lock) aLock;
***************
*** 149,153 ****
  void PyThread_free_lock(PyThread_type_lock aLock)
  {
!   dprintf(("%ld: PyThread_free_lock(%lx) called\n", PyThread_get_thread_ident(),(long)aLock));
  
    DosCloseMutexSem((HMTX)aLock);
--- 149,153 ----
  void PyThread_free_lock(PyThread_type_lock aLock)
  {
!   dprintf(("%ld: PyThread_free_lock(%p) called\n", PyThread_get_thread_ident(),aLock));
  
    DosCloseMutexSem((HMTX)aLock);
***************
*** 167,172 ****
    TID   tid = 0;
  
!   dprintf(("%ld: PyThread_acquire_lock(%lx, %d) called\n", PyThread_get_thread_ident(),
!            (long)aLock, waitflag));
  
    DosQueryMutexSem((HMTX)aLock,&pid,&tid,&count);
--- 167,172 ----
    TID   tid = 0;
  
!   dprintf(("%ld: PyThread_acquire_lock(%p, %d) called\n", PyThread_get_thread_ident(),
!            aLock, waitflag));
  
    DosQueryMutexSem((HMTX)aLock,&pid,&tid,&count);
***************
*** 182,187 ****
    }
  
!   dprintf(("%ld: PyThread_acquire_lock(%lx, %d) -> %d\n",
!            PyThread_get_thread_ident(),(long)aLock, waitflag, success));
  
    return success;
--- 182,187 ----
    }
  
!   dprintf(("%ld: PyThread_acquire_lock(%p, %d) -> %d\n",
!            PyThread_get_thread_ident(),aLock, waitflag, success));
  
    return success;
***************
*** 190,198 ****
  void PyThread_release_lock(PyThread_type_lock aLock)
  {
!   dprintf(("%ld: PyThread_release_lock(%lx) called\n", PyThread_get_thread_ident(),(long)aLock));
  
    if ( DosReleaseMutexSem( (HMTX) aLock ) != 0 ) {
!     dprintf(("%ld: Could not PyThread_release_lock(%lx) error: %l\n",
!              PyThread_get_thread_ident(), (long)aLock, GetLastError()));
    }
  }
--- 190,198 ----
  void PyThread_release_lock(PyThread_type_lock aLock)
  {
!   dprintf(("%ld: PyThread_release_lock(%p) called\n", PyThread_get_thread_ident(),aLock));
  
    if ( DosReleaseMutexSem( (HMTX) aLock ) != 0 ) {
!     dprintf(("%ld: Could not PyThread_release_lock(%p) error: %l\n",
!              PyThread_get_thread_ident(), aLock, GetLastError()));
    }
  }
***************
*** 218,221 ****
  void PyThread_up_sema(PyThread_type_sema aSemaphore)
  {
!   dprintf(("%ld: PyThread_up_sema(%lx)\n", PyThread_get_thread_ident(), (long)aSemaphore));
  }
--- 218,221 ----
  void PyThread_up_sema(PyThread_type_sema aSemaphore)
  {
!   dprintf(("%ld: PyThread_up_sema(%p)\n", PyThread_get_thread_ident(), aSemaphore));
  }

Index: thread_pth.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/thread_pth.h,v
retrieving revision 2.1
retrieving revision 2.2
diff -C2 -r2.1 -r2.2
*** thread_pth.h	2000/05/08 13:36:49	2.1
--- thread_pth.h	2000/06/30 15:01:00	2.2
***************
*** 169,173 ****
  		}
  	}
! 	dprintf(("PyThread_allocate_lock() -> %lx\n", (long)lock));
  	return (PyThread_type_lock) lock;
  }
--- 169,173 ----
  		}
  	}
! 	dprintf(("PyThread_allocate_lock() -> %p\n", lock));
  	return (PyThread_type_lock) lock;
  }
***************
*** 178,182 ****
  	int status, error = 0;
  
! 	dprintf(("PyThread_free_lock(%lx) called\n", (long)lock));
  
  	free((void *)thelock);
--- 178,182 ----
  	int status, error = 0;
  
! 	dprintf(("PyThread_free_lock(%p) called\n", lock));
  
  	free((void *)thelock);
***************
*** 189,193 ****
  	int status, error = 0;
  
! 	dprintf(("PyThread_acquire_lock(%lx, %d) called\n", (long)lock, waitflag));
  
  	status = pth_mutex_acquire(&thelock->mut, !waitflag, NULL);
--- 189,193 ----
  	int status, error = 0;
  
! 	dprintf(("PyThread_acquire_lock(%p, %d) called\n", lock, waitflag));
  
  	status = pth_mutex_acquire(&thelock->mut, !waitflag, NULL);
***************
*** 216,220 ****
          }
          if (error) success = 0;
!         dprintf(("PyThread_acquire_lock(%lx, %d) -> %d\n", (long)lock, waitflag, success));
  	return success;
  }
--- 216,220 ----
          }
          if (error) success = 0;
!         dprintf(("PyThread_acquire_lock(%p, %d) -> %d\n", lock, waitflag, success));
  	return success;
  }
***************
*** 225,229 ****
          int status, error = 0;
  
!         dprintf(("PyThread_release_lock(%lx) called\n", (long)lock));
  
          status = pth_mutex_acquire( &thelock->mut, 0, NULL );
--- 225,229 ----
          int status, error = 0;
  
!         dprintf(("PyThread_release_lock(%p) called\n", lock));
  
          status = pth_mutex_acquire( &thelock->mut, 0, NULL );
***************
*** 271,275 ****
  		}
  	}
! 	dprintf(("PyThread_allocate_sema() -> %lx\n", (long) sema));
  	return (PyThread_type_sema) sema;
  }
--- 271,275 ----
  		}
  	}
! 	dprintf(("PyThread_allocate_sema() -> %p\n",  sema));
  	return (PyThread_type_sema) sema;
  }
***************
*** 280,284 ****
  	struct semaphore *thesema = (struct semaphore *) sema;
  
! 	dprintf(("PyThread_free_sema(%lx) called\n", (long) sema));
  	free((void *) thesema);
  }
--- 280,284 ----
  	struct semaphore *thesema = (struct semaphore *) sema;
  
! 	dprintf(("PyThread_free_sema(%p) called\n",  sema));
  	free((void *) thesema);
  }
***************
*** 289,293 ****
  	struct semaphore *thesema = (struct semaphore *) sema;
  
! 	dprintf(("PyThread_down_sema(%lx, %d) called\n", (long) sema, waitflag));
  	status = pth_mutex_acquire(&thesema->mutex, !waitflag, NULL);
  	CHECK_STATUS("pth_mutex_acquire");
--- 289,293 ----
  	struct semaphore *thesema = (struct semaphore *) sema;
  
! 	dprintf(("PyThread_down_sema(%p, %d) called\n",  sema, waitflag));
  	status = pth_mutex_acquire(&thesema->mutex, !waitflag, NULL);
  	CHECK_STATUS("pth_mutex_acquire");
***************
*** 309,313 ****
  	status = pth_mutex_release(&thesema->mutex);
  	CHECK_STATUS("pth_mutex_release");
! 	dprintf(("PyThread_down_sema(%lx) return\n", (long) sema));
  	return success;
  }
--- 309,313 ----
  	status = pth_mutex_release(&thesema->mutex);
  	CHECK_STATUS("pth_mutex_release");
! 	dprintf(("PyThread_down_sema(%p) return\n",  sema));
  	return success;
  }
***************
*** 318,322 ****
  	struct semaphore *thesema = (struct semaphore *) sema;
  
! 	dprintf(("PyThread_up_sema(%lx)\n", (long) sema));
  	status = pth_mutex_acquire(&thesema->mutex, 0, NULL);
  	CHECK_STATUS("pth_mutex_acquire");
--- 318,322 ----
  	struct semaphore *thesema = (struct semaphore *) sema;
  
! 	dprintf(("PyThread_up_sema(%p)\n",  sema));
  	status = pth_mutex_acquire(&thesema->mutex, 0, NULL);
  	CHECK_STATUS("pth_mutex_acquire");

Index: thread_pthread.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/thread_pthread.h,v
retrieving revision 2.24
retrieving revision 2.25
diff -C2 -r2.24 -r2.25
*** thread_pthread.h	1999/03/15 20:27:53	2.24
--- thread_pthread.h	2000/06/30 15:01:00	2.25
***************
*** 273,277 ****
  	}
  
! 	dprintf(("PyThread_allocate_lock() -> %lx\n", (long)lock));
  	return (PyThread_type_lock) lock;
  }
--- 273,277 ----
  	}
  
! 	dprintf(("PyThread_allocate_lock() -> %p\n", lock));
  	return (PyThread_type_lock) lock;
  }
***************
*** 282,286 ****
  	int status, error = 0;
  
! 	dprintf(("PyThread_free_lock(%lx) called\n", (long)lock));
  
  	status = pthread_mutex_destroy( &thelock->mut );
--- 282,286 ----
  	int status, error = 0;
  
! 	dprintf(("PyThread_free_lock(%p) called\n", lock));
  
  	status = pthread_mutex_destroy( &thelock->mut );
***************
*** 299,303 ****
  	int status, error = 0;
  
! 	dprintf(("PyThread_acquire_lock(%lx, %d) called\n", (long)lock, waitflag));
  
  	status = pthread_mutex_lock( &thelock->mut );
--- 299,303 ----
  	int status, error = 0;
  
! 	dprintf(("PyThread_acquire_lock(%p, %d) called\n", lock, waitflag));
  
  	status = pthread_mutex_lock( &thelock->mut );
***************
*** 326,330 ****
  	}
  	if (error) success = 0;
! 	dprintf(("PyThread_acquire_lock(%lx, %d) -> %d\n", (long)lock, waitflag, success));
  	return success;
  }
--- 326,330 ----
  	}
  	if (error) success = 0;
! 	dprintf(("PyThread_acquire_lock(%p, %d) -> %d\n", lock, waitflag, success));
  	return success;
  }
***************
*** 335,339 ****
  	int status, error = 0;
  
! 	dprintf(("PyThread_release_lock(%lx) called\n", (long)lock));
  
  	status = pthread_mutex_lock( &thelock->mut );
--- 335,339 ----
  	int status, error = 0;
  
! 	dprintf(("PyThread_release_lock(%p) called\n", lock));
  
  	status = pthread_mutex_lock( &thelock->mut );
***************
*** 383,387 ****
  		}
  	}
! 	dprintf(("PyThread_allocate_sema() -> %lx\n", (long) sema));
  	return (PyThread_type_sema) sema;
  }
--- 383,387 ----
  		}
  	}
! 	dprintf(("PyThread_allocate_sema() -> %p\n",  sema));
  	return (PyThread_type_sema) sema;
  }
***************
*** 392,396 ****
  	struct semaphore *thesema = (struct semaphore *) sema;
  
! 	dprintf(("PyThread_free_sema(%lx) called\n", (long) sema));
  	status = pthread_cond_destroy(&thesema->cond);
  	CHECK_STATUS("pthread_cond_destroy");
--- 392,396 ----
  	struct semaphore *thesema = (struct semaphore *) sema;
  
! 	dprintf(("PyThread_free_sema(%p) called\n",  sema));
  	status = pthread_cond_destroy(&thesema->cond);
  	CHECK_STATUS("pthread_cond_destroy");
***************
*** 405,409 ****
  	struct semaphore *thesema = (struct semaphore *) sema;
  
! 	dprintf(("PyThread_down_sema(%lx, %d) called\n", (long) sema, waitflag));
  	status = pthread_mutex_lock(&thesema->mutex);
  	CHECK_STATUS("pthread_mutex_lock");
--- 405,409 ----
  	struct semaphore *thesema = (struct semaphore *) sema;
  
! 	dprintf(("PyThread_down_sema(%p, %d) called\n",  sema, waitflag));
  	status = pthread_mutex_lock(&thesema->mutex);
  	CHECK_STATUS("pthread_mutex_lock");
***************
*** 425,429 ****
  	status = pthread_mutex_unlock(&thesema->mutex);
  	CHECK_STATUS("pthread_mutex_unlock");
! 	dprintf(("PyThread_down_sema(%lx) return\n", (long) sema));
  	return success;
  }
--- 425,429 ----
  	status = pthread_mutex_unlock(&thesema->mutex);
  	CHECK_STATUS("pthread_mutex_unlock");
! 	dprintf(("PyThread_down_sema(%p) return\n",  sema));
  	return success;
  }
***************
*** 434,438 ****
  	struct semaphore *thesema = (struct semaphore *) sema;
  
! 	dprintf(("PyThread_up_sema(%lx)\n", (long) sema));
  	status = pthread_mutex_lock(&thesema->mutex);
  	CHECK_STATUS("pthread_mutex_lock");
--- 434,438 ----
  	struct semaphore *thesema = (struct semaphore *) sema;
  
! 	dprintf(("PyThread_up_sema(%p)\n",  sema));
  	status = pthread_mutex_lock(&thesema->mutex);
  	CHECK_STATUS("pthread_mutex_lock");

Index: thread_sgi.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/thread_sgi.h,v
retrieving revision 2.9
retrieving revision 2.10
diff -C2 -r2.9 -r2.10
*** thread_sgi.h	1998/12/21 19:32:34	2.9
--- thread_sgi.h	2000/06/30 15:01:00	2.10
***************
*** 120,124 ****
  		perror("usconfig - CONF_INITSIZE (reset)");
  	addr = (long) dl_getrange(size + HDR_SIZE);
! 	dprintf(("trying to use addr %lx-%lx for shared arena\n", addr, addr+size));
  	errno = 0;
  	if ((addr = usconfig(CONF_ATTACHADDR, addr)) < 0 && errno != 0)
--- 120,124 ----
  		perror("usconfig - CONF_INITSIZE (reset)");
  	addr = (long) dl_getrange(size + HDR_SIZE);
! 	dprintf(("trying to use addr %p-%p for shared arena\n", addr, addr+size));
  	errno = 0;
  	if ((addr = usconfig(CONF_ATTACHADDR, addr)) < 0 && errno != 0)
***************
*** 158,162 ****
  	if ((wait_lock = usnewlock(shared_arena)) == NULL)
  		perror("usnewlock (wait_lock)");
! 	dprintf(("arena start: %lx, arena size: %ld\n", (long) shared_arena, (long) usconfig(CONF_GETSIZE, shared_arena)));
  }
  
--- 158,162 ----
  	if ((wait_lock = usnewlock(shared_arena)) == NULL)
  		perror("usnewlock (wait_lock)");
! 	dprintf(("arena start: %p, arena size: %ld\n",  shared_arena, (long) usconfig(CONF_GETSIZE, shared_arena)));
  }
  
***************
*** 225,229 ****
  				perror("usconfig - CONF_INITSIZE (reset)");
  			addr = (long) dl_getrange(size + HDR_SIZE);
! 			dprintf(("trying to use addr %lx-%lx for sproc\n",
  				 addr, addr+size));
  			errno = 0;
--- 225,229 ----
  				perror("usconfig - CONF_INITSIZE (reset)");
  			addr = (long) dl_getrange(size + HDR_SIZE);
! 			dprintf(("trying to use addr %p-%p for sproc\n",
  				 addr, addr+size));
  			errno = 0;
***************
*** 376,380 ****
  		perror("usnewlock");
  	(void) usinitlock(lock);
! 	dprintf(("PyThread_allocate_lock() -> %lx\n", (long)lock));
  	return (PyThread_type_lock) lock;
  }
--- 376,380 ----
  		perror("usnewlock");
  	(void) usinitlock(lock);
! 	dprintf(("PyThread_allocate_lock() -> %p\n", lock));
  	return (PyThread_type_lock) lock;
  }
***************
*** 382,386 ****
  void PyThread_free_lock _P1(lock, PyThread_type_lock lock)
  {
! 	dprintf(("PyThread_free_lock(%lx) called\n", (long)lock));
  	usfreelock((ulock_t) lock, shared_arena);
  }
--- 382,386 ----
  void PyThread_free_lock _P1(lock, PyThread_type_lock lock)
  {
! 	dprintf(("PyThread_free_lock(%p) called\n", lock));
  	usfreelock((ulock_t) lock, shared_arena);
  }
***************
*** 390,394 ****
  	int success;
  
! 	dprintf(("PyThread_acquire_lock(%lx, %d) called\n", (long)lock, waitflag));
  	errno = 0;		/* clear it just in case */
  	if (waitflag)
--- 390,394 ----
  	int success;
  
! 	dprintf(("PyThread_acquire_lock(%p, %d) called\n", lock, waitflag));
  	errno = 0;		/* clear it just in case */
  	if (waitflag)
***************
*** 398,402 ****
  	if (success < 0)
  		perror(waitflag ? "ussetlock" : "uscsetlock");
! 	dprintf(("PyThread_acquire_lock(%lx, %d) -> %d\n", (long)lock, waitflag, success));
  	return success;
  }
--- 398,402 ----
  	if (success < 0)
  		perror(waitflag ? "ussetlock" : "uscsetlock");
! 	dprintf(("PyThread_acquire_lock(%p, %d) -> %d\n", lock, waitflag, success));
  	return success;
  }
***************
*** 404,408 ****
  void PyThread_release_lock _P1(lock, PyThread_type_lock lock)
  {
! 	dprintf(("PyThread_release_lock(%lx) called\n", (long)lock));
  	if (usunsetlock((ulock_t) lock) < 0)
  		perror("usunsetlock");
--- 404,408 ----
  void PyThread_release_lock _P1(lock, PyThread_type_lock lock)
  {
! 	dprintf(("PyThread_release_lock(%p) called\n", lock));
  	if (usunsetlock((ulock_t) lock) < 0)
  		perror("usunsetlock");
***************
*** 421,425 ****
  	if ((sema = usnewsema(shared_arena, value)) == NULL)
  		perror("usnewsema");
! 	dprintf(("PyThread_allocate_sema() -> %lx\n", (long) sema));
  	return (PyThread_type_sema) sema;
  }
--- 421,425 ----
  	if ((sema = usnewsema(shared_arena, value)) == NULL)
  		perror("usnewsema");
! 	dprintf(("PyThread_allocate_sema() -> %p\n",  sema));
  	return (PyThread_type_sema) sema;
  }
***************
*** 427,431 ****
  void PyThread_free_sema _P1(sema, PyThread_type_sema sema)
  {
! 	dprintf(("PyThread_free_sema(%lx) called\n", (long) sema));
  	usfreesema((usema_t *) sema, shared_arena);
  }
--- 427,431 ----
  void PyThread_free_sema _P1(sema, PyThread_type_sema sema)
  {
! 	dprintf(("PyThread_free_sema(%p) called\n",  sema));
  	usfreesema((usema_t *) sema, shared_arena);
  }
***************
*** 435,439 ****
  	int success;
  
! 	dprintf(("PyThread_down_sema(%lx) called\n", (long) sema));
  	if (waitflag)
  		success = uspsema((usema_t *) sema);
--- 435,439 ----
  	int success;
  
! 	dprintf(("PyThread_down_sema(%p) called\n",  sema));
  	if (waitflag)
  		success = uspsema((usema_t *) sema);
***************
*** 442,446 ****
  	if (success < 0)
  		perror(waitflag ? "uspsema" : "uscpsema");
! 	dprintf(("PyThread_down_sema(%lx) return\n", (long) sema));
  	return success;
  }
--- 442,446 ----
  	if (success < 0)
  		perror(waitflag ? "uspsema" : "uscpsema");
! 	dprintf(("PyThread_down_sema(%p) return\n",  sema));
  	return success;
  }
***************
*** 448,452 ****
  void PyThread_up_sema _P1(sema, PyThread_type_sema sema)
  {
! 	dprintf(("PyThread_up_sema(%lx)\n", (long) sema));
  	if (usvsema((usema_t *) sema) < 0)
  		perror("usvsema");
--- 448,452 ----
  void PyThread_up_sema _P1(sema, PyThread_type_sema sema)
  {
! 	dprintf(("PyThread_up_sema(%p)\n",  sema));
  	if (usvsema((usema_t *) sema) < 0)
  		perror("usvsema");

Index: thread_solaris.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/thread_solaris.h,v
retrieving revision 2.10
retrieving revision 2.11
diff -C2 -r2.10 -r2.11
*** thread_solaris.h	1999/04/13 14:32:12	2.10
--- thread_solaris.h	2000/06/30 15:01:00	2.11
***************
*** 158,162 ****
  		lock = 0;
  	}
! 	dprintf(("PyThread_allocate_lock() -> %lx\n", (long)lock));
  	return (PyThread_type_lock) lock;
  }
--- 158,162 ----
  		lock = 0;
  	}
! 	dprintf(("PyThread_allocate_lock() -> %p\n", lock));
  	return (PyThread_type_lock) lock;
  }
***************
*** 164,168 ****
  void PyThread_free_lock _P1(lock, PyThread_type_lock lock)
  {
! 	dprintf(("PyThread_free_lock(%lx) called\n", (long)lock));
  	mutex_destroy((mutex_t *) lock);
  	free((void *) lock);
--- 164,168 ----
  void PyThread_free_lock _P1(lock, PyThread_type_lock lock)
  {
! 	dprintf(("PyThread_free_lock(%p) called\n", lock));
  	mutex_destroy((mutex_t *) lock);
  	free((void *) lock);
***************
*** 173,177 ****
  	int success;
  
! 	dprintf(("PyThread_acquire_lock(%lx, %d) called\n", (long)lock, waitflag));
  	if (waitflag)
  		success = mutex_lock((mutex_t *) lock);
--- 173,177 ----
  	int success;
  
! 	dprintf(("PyThread_acquire_lock(%p, %d) called\n", lock, waitflag));
  	if (waitflag)
  		success = mutex_lock((mutex_t *) lock);
***************
*** 182,186 ****
  	else
  		success = !success; /* solaris does it the other way round */
! 	dprintf(("PyThread_acquire_lock(%lx, %d) -> %d\n", (long)lock, waitflag, success));
  	return success;
  }
--- 182,186 ----
  	else
  		success = !success; /* solaris does it the other way round */
! 	dprintf(("PyThread_acquire_lock(%p, %d) -> %d\n", lock, waitflag, success));
  	return success;
  }
***************
*** 188,192 ****
  void PyThread_release_lock _P1(lock, PyThread_type_lock lock)
  {
! 	dprintf(("PyThread_release_lock(%lx) called\n", (long)lock));
  	if (mutex_unlock((mutex_t *) lock))
  		perror("mutex_unlock");
--- 188,192 ----
  void PyThread_release_lock _P1(lock, PyThread_type_lock lock)
  {
! 	dprintf(("PyThread_release_lock(%p) called\n", lock));
  	if (mutex_unlock((mutex_t *) lock))
  		perror("mutex_unlock");
***************
*** 209,213 ****
  		sema = 0;
  	}
! 	dprintf(("PyThread_allocate_sema() -> %lx\n", (long) sema));
  	return (PyThread_type_sema) sema;
  }
--- 209,213 ----
  		sema = 0;
  	}
! 	dprintf(("PyThread_allocate_sema() -> %p\n",  sema));
  	return (PyThread_type_sema) sema;
  }
***************
*** 215,219 ****
  void PyThread_free_sema _P1(sema, PyThread_type_sema sema)
  {
! 	dprintf(("PyThread_free_sema(%lx) called\n", (long) sema));
  	if (sema_destroy((sema_t *) sema))
  		perror("sema_destroy");
--- 215,219 ----
  void PyThread_free_sema _P1(sema, PyThread_type_sema sema)
  {
! 	dprintf(("PyThread_free_sema(%p) called\n",  sema));
  	if (sema_destroy((sema_t *) sema))
  		perror("sema_destroy");
***************
*** 225,229 ****
  	int success;
  
! 	dprintf(("PyThread_down_sema(%lx) called\n", (long) sema));
  	if (waitflag)
  		success = sema_wait((sema_t *) sema);
--- 225,229 ----
  	int success;
  
! 	dprintf(("PyThread_down_sema(%p) called\n",  sema));
  	if (waitflag)
  		success = sema_wait((sema_t *) sema);
***************
*** 238,242 ****
  	else
  		success = !success;
! 	dprintf(("PyThread_down_sema(%lx) return %d\n", (long) sema, success));
  	return success;
  }
--- 238,242 ----
  	else
  		success = !success;
! 	dprintf(("PyThread_down_sema(%p) return %d\n",  sema, success));
  	return success;
  }
***************
*** 244,248 ****
  void PyThread_up_sema _P1(sema, PyThread_type_sema sema)
  {
! 	dprintf(("PyThread_up_sema(%lx)\n", (long) sema));
  	if (sema_post((sema_t *) sema))
  		perror("sema_post");
--- 244,248 ----
  void PyThread_up_sema _P1(sema, PyThread_type_sema sema)
  {
! 	dprintf(("PyThread_up_sema(%p)\n",  sema));
  	if (sema_post((sema_t *) sema))
  		perror("sema_post");

Index: thread_wince.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/thread_wince.h,v
retrieving revision 2.1
retrieving revision 2.2
diff -C2 -r2.1 -r2.2
*** thread_wince.h	1999/04/08 13:57:06	2.1
--- thread_wince.h	2000/06/30 15:01:00	2.2
***************
*** 145,149 ****
                          NULL);          /* Name of event            */
  
!     dprintf(("%ld: PyThread_allocate_lock() -> %lx\n", PyThread_get_thread_ident(), (long)aLock));
  
      return (PyThread_type_lock) aLock;
--- 145,149 ----
                          NULL);          /* Name of event            */
  
!     dprintf(("%ld: PyThread_allocate_lock() -> %p\n", PyThread_get_thread_ident(), aLock));
  
      return (PyThread_type_lock) aLock;
***************
*** 152,156 ****
  void PyThread_free_lock(PyThread_type_lock aLock)
  {
!     dprintf(("%ld: PyThread_free_lock(%lx) called\n", PyThread_get_thread_ident(),(long)aLock));
  
      CloseHandle(aLock);
--- 152,156 ----
  void PyThread_free_lock(PyThread_type_lock aLock)
  {
!     dprintf(("%ld: PyThread_free_lock(%p) called\n", PyThread_get_thread_ident(),aLock));
  
      CloseHandle(aLock);
***************
*** 168,172 ****
      DWORD waitResult;
  
!     dprintf(("%ld: PyThread_acquire_lock(%lx, %d) called\n", PyThread_get_thread_ident(),(long)aLock, waitflag));
  
  #ifndef DEBUG
--- 168,172 ----
      DWORD waitResult;
  
!     dprintf(("%ld: PyThread_acquire_lock(%p, %d) called\n", PyThread_get_thread_ident(),aLock, waitflag));
  
  #ifndef DEBUG
***************
*** 186,190 ****
      }
  
! 	dprintf(("%ld: PyThread_acquire_lock(%lx, %d) -> %d\n", PyThread_get_thread_ident(),(long)aLock, waitflag, success));
  
  	return success;
--- 186,190 ----
      }
  
! 	dprintf(("%ld: PyThread_acquire_lock(%p, %d) -> %d\n", PyThread_get_thread_ident(),aLock, waitflag, success));
  
  	return success;
***************
*** 193,200 ****
  void PyThread_release_lock(PyThread_type_lock aLock)
  {
!     dprintf(("%ld: PyThread_release_lock(%lx) called\n", PyThread_get_thread_ident(),(long)aLock));
  
      if (!SetEvent(aLock))
!         dprintf(("%ld: Could not PyThread_release_lock(%lx) error: %l\n", PyThread_get_thread_ident(), (long)aLock, GetLastError()));
  }
  
--- 193,200 ----
  void PyThread_release_lock(PyThread_type_lock aLock)
  {
!     dprintf(("%ld: PyThread_release_lock(%p) called\n", PyThread_get_thread_ident(),aLock));
  
      if (!SetEvent(aLock))
!         dprintf(("%ld: Could not PyThread_release_lock(%p) error: %l\n", PyThread_get_thread_ident(), aLock, GetLastError()));
  }