diff options
Diffstat (limited to 'Python/thread_foobar.h')
-rw-r--r-- | Python/thread_foobar.h | 51 |
1 files changed, 34 insertions, 17 deletions
diff --git a/Python/thread_foobar.h b/Python/thread_foobar.h index f2da913..18ddc21 100644 --- a/Python/thread_foobar.h +++ b/Python/thread_foobar.h @@ -11,14 +11,16 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. /* * Initialization. */ -static void PyThread__init_thread _P0() +static void +PyThread__init_thread(void) { } /* * Thread support. */ -int PyThread_start_new_thread _P2(func, void (*func) _P((void *)), arg, void *arg) +int +PyThread_start_new_thread(void (*func)(void *), void *arg) { int success = 0; /* init not needed when SOLARIS_THREADS and */ /* C_THREADS implemented properly */ @@ -29,13 +31,15 @@ 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(); } -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) @@ -45,18 +49,21 @@ static void do_PyThread_exit_thread _P1(no_cleanup, int no_cleanup) 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) @@ -66,12 +73,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); } @@ -80,7 +89,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) { dprintf(("PyThread_allocate_lock called\n")); @@ -91,12 +101,14 @@ 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)); } -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; @@ -105,7 +117,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)); } @@ -113,7 +126,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) { dprintf(("PyThread_allocate_sema called\n")); if (!initialized) @@ -123,19 +137,22 @@ 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)); } -int PyThread_down_sema _P2(sema, PyThread_type_sema sema, waitflag, int waitflag) +int +PyThread_down_sema(PyThread_type_sema sema, int waitflag) { dprintf(("PyThread_down_sema(%p, %d) called\n", sema, waitflag)); dprintf(("PyThread_down_sema(%p) return\n", sema)); return -1; } -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)); } |