mirror of
https://github.com/python/cpython.git
synced 2024-12-15 04:44:47 +08:00
7030b1ff2d
thread.h: use PROTO instead of _P for prototypes.
44 lines
864 B
C
44 lines
864 B
C
#ifndef _THREAD_H_included
|
|
#define _THREAD_H_included
|
|
|
|
#ifndef PROTO
|
|
#if defined(__STDC__) || defined(__cplusplus)
|
|
#define PROTO(args) args
|
|
#else
|
|
#define PROTO(args) ()
|
|
#endif
|
|
#endif
|
|
|
|
typedef void *type_lock;
|
|
typedef void *type_sema;
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
void init_thread PROTO((void));
|
|
int start_new_thread PROTO((void (*)(void *), void *));
|
|
void exit_thread PROTO((void));
|
|
void _exit_thread PROTO((void));
|
|
|
|
type_lock allocate_lock PROTO((void));
|
|
void free_lock PROTO((type_lock));
|
|
int acquire_lock PROTO((type_lock, int));
|
|
#define WAIT_LOCK 1
|
|
#define NOWAIT_LOCK 0
|
|
void release_lock PROTO((type_lock));
|
|
|
|
type_sema allocate_sema PROTO((int));
|
|
void free_sema PROTO((type_sema));
|
|
void down_sema PROTO((type_sema));
|
|
void up_sema PROTO((type_sema));
|
|
|
|
void exit_prog PROTO((int));
|
|
void _exit_prog PROTO((int));
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|