home *** CD-ROM | disk | FTP | other *** search
/ PC World 2005 June / PCWorld_2005-06_cd.bin / software / vyzkuste / firewally / firewally.exe / framework-2.3.exe / pythread.h < prev    next >
C/C++ Source or Header  |  2003-12-30  |  1KB  |  45 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. PyAPI_FUNC(void) PyThread_init_thread(void);
  16. PyAPI_FUNC(long) PyThread_start_new_thread(void (*)(void *), void *);
  17. PyAPI_FUNC(void) PyThread_exit_thread(void);
  18. PyAPI_FUNC(void) PyThread__PyThread_exit_thread(void);
  19. PyAPI_FUNC(long) PyThread_get_thread_ident(void);
  20.  
  21. PyAPI_FUNC(PyThread_type_lock) PyThread_allocate_lock(void);
  22. PyAPI_FUNC(void) PyThread_free_lock(PyThread_type_lock);
  23. PyAPI_FUNC(int) PyThread_acquire_lock(PyThread_type_lock, int);
  24. #define WAIT_LOCK    1
  25. #define NOWAIT_LOCK    0
  26. PyAPI_FUNC(void) PyThread_release_lock(PyThread_type_lock);
  27.  
  28. #ifndef NO_EXIT_PROG
  29. PyAPI_FUNC(void) PyThread_exit_prog(int);
  30. PyAPI_FUNC(void) PyThread__PyThread_exit_prog(int);
  31. #endif
  32.  
  33. /* Thread Local Storage (TLS) API */
  34. PyAPI_FUNC(int) PyThread_create_key(void);
  35. PyAPI_FUNC(void) PyThread_delete_key(int);
  36. PyAPI_FUNC(int) PyThread_set_key_value(int, void *);
  37. PyAPI_FUNC(void *) PyThread_get_key_value(int);
  38. PyAPI_FUNC(void) PyThread_delete_key_value(int key);
  39.  
  40. #ifdef __cplusplus
  41. }
  42. #endif
  43.  
  44. #endif /* !Py_PYTHREAD_H */
  45.