diff options
Diffstat (limited to 'Python/thread_cthread.h')
-rw-r--r-- | Python/thread_cthread.h | 51 |
1 files changed, 34 insertions, 17 deletions
diff --git a/Python/thread_cthread.h b/Python/thread_cthread.h index 776e8e1..80b10f7 100644 --- a/Python/thread_cthread.h +++ b/Python/thread_cthread.h @@ -14,7 +14,8 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. /* * Initialization. */ -static void PyThread__init_thread _P0() +static void +PyThread__init_thread(void) { cthread_init(); } @@ -22,7 +23,8 @@ static void PyThread__init_thread _P0() /* * Thread support. */ -int PyThread_start_new_thread _P2(func, void (*func) _P((void *)), arg, void *arg) +int +PyThread_start_new_thread(func, void (*func)(void *), void *arg) { int success = 0; /* init not needed when SOLARIS_THREADS and */ /* C_THREADS implemented properly */ @@ -37,14 +39,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 (long) cthread_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) @@ -55,18 +59,21 @@ static void do_PyThread_exit_thread _P1(no_cleanup, int no_cleanup) cthread_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) @@ -80,12 +87,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); } @@ -94,7 +103,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; @@ -112,13 +122,15 @@ 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_free(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 = FALSE; @@ -133,7 +145,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)); mutex_unlock((mutex_t )lock); @@ -153,7 +166,8 @@ void PyThread_release_lock _P1(lock, PyThread_type_lock lock) * semaphore using a condition. * */ -PyThread_type_sema PyThread_allocate_sema _P1(value, int value) +PyThread_type_sema +PyThread_allocate_sema(int value) { char *sema = 0; dprintf(("PyThread_allocate_sema called\n")); @@ -164,19 +178,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)); } |