diff options
author | Thomas Wouters <thomas@python.org> | 2000-07-22 18:47:25 (GMT) |
---|---|---|
committer | Thomas Wouters <thomas@python.org> | 2000-07-22 18:47:25 (GMT) |
commit | f70ef4f8606f99744252a804229d53a4d97601c1 (patch) | |
tree | be401f2f10b39f0603e4cc0ae091335890410b7f /Python/thread_pthread.h | |
parent | 0452d1f316903f0553a0d92e0673ff37247cdfa5 (diff) | |
download | cpython-f70ef4f8606f99744252a804229d53a4d97601c1.zip cpython-f70ef4f8606f99744252a804229d53a4d97601c1.tar.gz cpython-f70ef4f8606f99744252a804229d53a4d97601c1.tar.bz2 |
Mass ANSIfication of function definitions. Doesn't cover all 'extern'
declarations yet, those come later.
Diffstat (limited to 'Python/thread_pthread.h')
-rw-r--r-- | Python/thread_pthread.h | 61 |
1 files changed, 40 insertions, 21 deletions
diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h index e788d82..2ef46c0 100644 --- a/Python/thread_pthread.h +++ b/Python/thread_pthread.h @@ -100,11 +100,13 @@ typedef struct { */ #ifdef _HAVE_BSDI -static void _noop() +static +void _noop(void) { } -static void PyThread__init_thread _P0() +static void +PyThread__init_thread(void) { /* DO AN INIT BY STARTING THE THREAD */ static int dummy = 0; @@ -115,7 +117,8 @@ static void PyThread__init_thread _P0() #else /* !_HAVE_BSDI */ -static void PyThread__init_thread _P0() +static void +PyThread__init_thread(void) { #if defined(_AIX) && defined(__GNUC__) pthread_init(); @@ -129,7 +132,8 @@ static void PyThread__init_thread _P0() */ -int PyThread_start_new_thread _P2(func, void (*func) _P((void *)), arg, void *arg) +int +PyThread_start_new_thread(void (*func)(void *), void *arg) { pthread_t th; int success; @@ -144,7 +148,7 @@ int PyThread_start_new_thread _P2(func, void (*func) _P((void *)), arg, void *ar (pthread_addr_t)arg #elif defined(PY_PTHREAD_D6) pthread_attr_default, - (void* (*)_P((void *)))func, + (void* (*)(void *))func, arg #elif defined(PY_PTHREAD_D7) pthread_attr_default, @@ -152,7 +156,7 @@ int PyThread_start_new_thread _P2(func, void (*func) _P((void *)), arg, void *ar arg #elif defined(PY_PTHREAD_STD) (pthread_attr_t*)NULL, - (void* (*)_P((void *)))func, + (void* (*)(void *))func, (void *)arg #endif ); @@ -167,7 +171,8 @@ int PyThread_start_new_thread _P2(func, void (*func) _P((void *)), arg, void *ar return success != 0 ? 0 : 1; } -long PyThread_get_thread_ident _P0() +long +PyThread_get_thread_ident(void) { volatile pthread_t threadid; if (!initialized) @@ -177,7 +182,8 @@ long PyThread_get_thread_ident _P0() 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) { @@ -188,18 +194,21 @@ static void do_PyThread_exit_thread _P1(no_cleanup, int no_cleanup) } } -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) @@ -209,12 +218,14 @@ static void do_PyThread_exit_prog _P2(status, int status, no_cleanup, int no_cle 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); } @@ -223,7 +234,8 @@ void PyThread__exit_prog _P1(status, int status) /* * Lock support. */ -PyThread_type_lock PyThread_allocate_lock _P0() +PyThread_type_lock +PyThread_allocate_lock(void) { pthread_lock *lock; int status, error = 0; @@ -255,7 +267,8 @@ PyThread_type_lock PyThread_allocate_lock _P0() return (PyThread_type_lock) lock; } -void PyThread_free_lock _P1(lock, PyThread_type_lock lock) +void +PyThread_free_lock(PyThread_type_lock lock) { pthread_lock *thelock = (pthread_lock *)lock; int status, error = 0; @@ -271,7 +284,8 @@ void PyThread_free_lock _P1(lock, PyThread_type_lock lock) 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; pthread_lock *thelock = (pthread_lock *)lock; @@ -308,7 +322,8 @@ int PyThread_acquire_lock _P2(lock, PyThread_type_lock lock, waitflag, int waitf return success; } -void PyThread_release_lock _P1(lock, PyThread_type_lock lock) +void +PyThread_release_lock(PyThread_type_lock lock) { pthread_lock *thelock = (pthread_lock *)lock; int status, error = 0; @@ -338,7 +353,8 @@ struct semaphore { 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; @@ -365,7 +381,8 @@ PyThread_type_sema PyThread_allocate_sema _P1(value, int value) 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; @@ -378,7 +395,8 @@ void PyThread_free_sema _P1(sema, PyThread_type_sema sema) 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; @@ -407,7 +425,8 @@ int PyThread_down_sema _P2(sema, PyThread_type_sema sema, waitflag, int waitflag 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; |