home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_python.idb / usr / freeware / include / python1.5 / pythread.h.z / pythread.h
Encoding:
C/C++ Source or Header  |  1999-04-16  |  1.7 KB  |  57 lines

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