home *** CD-ROM | disk | FTP | other *** search
/ PC World 2001 April / PCWorld_2001-04_cd.bin / Software / TemaCD / webclean / !!!python!!! / BeOpen-Python-2.0.exe / PYTHREAD.H < prev    next >
Encoding:
C/C++ Source or Header  |  2000-09-01  |  1.5 KB  |  50 lines

  1.  
  2. #ifndef Py_PYTHREAD_H
  3. #define Py_PYTHREAD_H
  4.  
  5. #define NO_EXIT_PROG        /* don't define PyThread_exit_prog() */
  6.                 /* (the result is no use of signals on SGI) */
  7.  
  8. typedef void *PyThread_type_lock;
  9. typedef void *PyThread_type_sema;
  10.  
  11. #ifdef __cplusplus
  12. extern "C" {
  13. #endif
  14.  
  15. DL_IMPORT(void) PyThread_init_thread(void);
  16. DL_IMPORT(int) PyThread_start_new_thread(void (*)(void *), void *);
  17. DL_IMPORT(void) PyThread_exit_thread(void);
  18. DL_IMPORT(void) PyThread__PyThread_exit_thread(void);
  19. DL_IMPORT(long) PyThread_get_thread_ident(void);
  20.  
  21. DL_IMPORT(PyThread_type_lock) PyThread_allocate_lock(void);
  22. DL_IMPORT(void) PyThread_free_lock(PyThread_type_lock);
  23. DL_IMPORT(int) PyThread_acquire_lock(PyThread_type_lock, int);
  24. #define WAIT_LOCK    1
  25. #define NOWAIT_LOCK    0
  26. DL_IMPORT(void) PyThread_release_lock(PyThread_type_lock);
  27.  
  28. DL_IMPORT(PyThread_type_sema) PyThread_allocate_sema(int);
  29. DL_IMPORT(void) PyThread_free_sema(PyThread_type_sema);
  30. DL_IMPORT(int) PyThread_down_sema(PyThread_type_sema, int);
  31. #define WAIT_SEMA    1
  32. #define NOWAIT_SEMA    0
  33. DL_IMPORT(void) PyThread_up_sema(PyThread_type_sema);
  34.  
  35. #ifndef NO_EXIT_PROG
  36. DL_IMPORT(void) PyThread_exit_prog(int);
  37. DL_IMPORT(void) PyThread__PyThread_exit_prog(int);
  38. #endif
  39.  
  40. DL_IMPORT(int) PyThread_create_key(void);
  41. DL_IMPORT(void) PyThread_delete_key(int);
  42. DL_IMPORT(int) PyThread_set_key_value(int, void *);
  43. DL_IMPORT(void *) PyThread_get_key_value(int);
  44.  
  45. #ifdef __cplusplus
  46. }
  47. #endif
  48.  
  49. #endif /* !Py_PYTHREAD_H */
  50.