diff Python/thread_pth.h @ 13658:f79434ee41fa legacy-trunk

Mass ANSIfication of function definitions. Doesn't cover all 'extern' declarations yet, those come later.
author Thomas Wouters <thomas@python.org>
date Sat, 22 Jul 2000 18:47:25 +0000
parents 87ee82e5c56d
children 6f6f965c5e2d
line wrap: on
line diff
--- a/Python/thread_pth.h	Sat Jul 22 18:45:06 2000 +0000
+++ b/Python/thread_pth.h	Sat Jul 22 18:47:25 2000 +0000
@@ -43,7 +43,7 @@
  * Initialization.
  */
 
-static void PyThread__init_thread _P0()
+static void PyThread__init_thread(void)
 {
 	pth_init();
 }
@@ -53,7 +53,7 @@
  */
 
 
-int PyThread_start_new_thread _P2(func, void (*func) _P((void *)), arg, void *arg)
+int PyThread_start_new_thread(void (*func)(void *), void *arg)
 {
 	pth_t th;
 	int success;
@@ -62,14 +62,14 @@
 		PyThread_init_thread();
 
 	th = pth_spawn(PTH_ATTR_DEFAULT,
-				 (void* (*)_P((void *)))func,
+				 (void* (*)(void *))func,
 				 (void *)arg
 				 );
 
 	return th == NULL ? 0 : 1;
 }
 
-long PyThread_get_thread_ident _P0()
+long PyThread_get_thread_ident(void)
 {
 	volatile pth_t threadid;
 	if (!initialized)
@@ -79,7 +79,7 @@
 	return (long) *(long *) &threadid;
 }
 
-static void do_PyThread_exit_thread _P1(no_cleanup, int no_cleanup)
+static void do_PyThread_exit_thread(int no_cleanup)
 {
 	dprintf(("PyThread_exit_thread called\n"));
 	if (!initialized) {
@@ -90,18 +90,18 @@
 	}
 }
 
-void PyThread_exit_thread _P0()
+void PyThread_exit_thread(void)
 {
 	do_PyThread_exit_thread(0);
 }
 
-void PyThread__exit_thread _P0()
+void PyThread__exit_thread(void)
 {
 	do_PyThread_exit_thread(1);
 }
 
 #ifndef NO_EXIT_PROG
-static void do_PyThread_exit_prog _P2(status, int status, no_cleanup, int no_cleanup)
+static void do_PyThread_exit_prog(int status, int no_cleanup)
 {
 	dprintf(("PyThread_exit_prog(%d) called\n", status));
 	if (!initialized)
@@ -111,12 +111,12 @@
 			exit(status);
 }
 
-void PyThread_exit_prog _P1(status, int status)
+void PyThread_exit_prog(int status)
 {
 	do_PyThread_exit_prog(status, 0);
 }
 
-void PyThread__exit_prog _P1(status, int status)
+void PyThread__exit_prog(int status)
 {
 	do_PyThread_exit_prog(status, 1);
 }
@@ -125,7 +125,7 @@
 /*
  * Lock support.
  */
-PyThread_type_lock PyThread_allocate_lock _P0()
+PyThread_type_lock PyThread_allocate_lock(void)
 {
 	pth_lock *lock;
 	int status, error = 0;
@@ -151,7 +151,7 @@
 	return (PyThread_type_lock) lock;
 }
 
-void PyThread_free_lock _P1(lock, PyThread_type_lock lock)
+void PyThread_free_lock(PyThread_type_lock lock)
 {
 	pth_lock *thelock = (pth_lock *)lock;
 	int status, error = 0;
@@ -161,7 +161,7 @@
 	free((void *)thelock);
 }
 
-int PyThread_acquire_lock _P2(lock, PyThread_type_lock lock, waitflag, int waitflag)
+int PyThread_acquire_lock(PyThread_type_lock lock, int waitflag)
 {
 	int success;
 	pth_lock *thelock = (pth_lock *)lock;
@@ -198,7 +198,7 @@
 	return success;
 }
 
-void PyThread_release_lock _P1(lock, PyThread_type_lock lock)
+void PyThread_release_lock(PyThread_type_lock lock)
 {
         pth_lock *thelock = (pth_lock *)lock;
         int status, error = 0;
@@ -228,7 +228,7 @@
 	int value;
 };
 
-PyThread_type_sema PyThread_allocate_sema _P1(value, int value)
+PyThread_type_sema PyThread_allocate_sema(int value)
 {
 	struct semaphore *sema;
 	int status, error = 0;
@@ -253,7 +253,7 @@
 	return (PyThread_type_sema) sema;
 }
 
-void PyThread_free_sema _P1(sema, PyThread_type_sema sema)
+void PyThread_free_sema(PyThread_type_sema sema)
 {
 	int status, error = 0;
 	struct semaphore *thesema = (struct semaphore *) sema;
@@ -262,7 +262,7 @@
 	free((void *) thesema);
 }
 
-int PyThread_down_sema _P2(sema, PyThread_type_sema sema, waitflag, int waitflag)
+int PyThread_down_sema(PyThread_type_sema sema, int waitflag)
 {
 	int status, error = 0, success;
 	struct semaphore *thesema = (struct semaphore *) sema;
@@ -291,7 +291,7 @@
 	return success;
 }
 
-void PyThread_up_sema _P1(sema, PyThread_type_sema sema)
+void PyThread_up_sema(PyThread_type_sema sema)
 {
 	int status, error = 0;
 	struct semaphore *thesema = (struct semaphore *) sema;