diff options
Diffstat (limited to 'Python/thread_solaris.h')
-rw-r--r-- | Python/thread_solaris.h | 57 |
1 files changed, 37 insertions, 20 deletions
diff --git a/Python/thread_solaris.h b/Python/thread_solaris.h index 15e286aebe..24ceef0032 100644 --- a/Python/thread_solaris.h +++ b/Python/thread_solaris.h @@ -19,7 +19,7 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. /* * Initialization. */ -static void PyThread__init_thread _P0() +static void PyThread__init_thread(void) { } @@ -27,13 +27,14 @@ static void PyThread__init_thread _P0() * Thread support. */ struct func_arg { - void (*func) _P((void *)); + void (*func)(void *); void *arg; }; -static void *new_func _P1(funcarg, void *funcarg) +static void * +new_func(void *funcarg) { - void (*func) _P((void *)); + void (*func)(void *); void *arg; func = ((struct func_arg *) funcarg)->func; @@ -44,7 +45,8 @@ static void *new_func _P1(funcarg, void *funcarg) } -int PyThread_start_new_thread _P2(func, void (*func) _P((void *)), arg, void *arg) +int +PyThread_start_new_thread(void (*func)(void *), void *arg) { struct func_arg *funcarg; int success = 0; /* init not needed when SOLARIS_THREADS and */ @@ -65,14 +67,16 @@ 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) { if (!initialized) PyThread_init_thread(); return thr_self(); } -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) @@ -83,18 +87,21 @@ static void do_PyThread_exit_thread _P1(no_cleanup, int no_cleanup) thr_exit(0); } -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) @@ -108,12 +115,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); } @@ -122,7 +131,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) { mutex_t *lock; @@ -140,14 +150,16 @@ 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) { dprintf(("PyThread_free_lock(%p) called\n", lock)); mutex_destroy((mutex_t *) lock); free((void *) lock); } -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; @@ -164,7 +176,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) { dprintf(("PyThread_release_lock(%p) called\n", lock)); if (mutex_unlock((mutex_t *) lock)) @@ -174,7 +187,8 @@ void PyThread_release_lock _P1(lock, PyThread_type_lock lock) /* * Semaphore support. */ -PyThread_type_sema PyThread_allocate_sema _P1(value, int value) +PyThread_type_sema +PyThread_allocate_sema(int value) { sema_t *sema; dprintf(("PyThread_allocate_sema called\n")); @@ -191,7 +205,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) { dprintf(("PyThread_free_sema(%p) called\n", sema)); if (sema_destroy((sema_t *) sema)) @@ -199,7 +214,8 @@ void PyThread_free_sema _P1(sema, PyThread_type_sema sema) free((void *) sema); } -int PyThread_down_sema _P2(sema, PyThread_type_sema sema, waitflag, int waitflag) +int +PyThread_down_sema(PyThread_type_sema sema, int waitflag) { int success; @@ -220,7 +236,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) { dprintf(("PyThread_up_sema(%p)\n", sema)); if (sema_post((sema_t *) sema)) |