home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / pyth_os2.zip / python-1.0.2 / Include / thread.h < prev    next >
C/C++ Source or Header  |  1994-04-14  |  997b  |  49 lines

  1. #ifndef _THREAD_H_included
  2. #define _THREAD_H_included
  3.  
  4. #define NO_EXIT_PROG        /* don't define exit_prog() */
  5.                 /* (the result is no use of signals on SGI) */
  6.  
  7. #ifndef PROTO
  8. #if defined(__STDC__) || defined(__cplusplus)
  9. #define PROTO(args)    args
  10. #else
  11. #define PROTO(args)    ()
  12. #endif
  13. #endif
  14.  
  15. typedef void *type_lock;
  16. typedef void *type_sema;
  17.  
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21.  
  22. void init_thread PROTO((void));
  23. int start_new_thread PROTO((void (*)(void *), void *));
  24. void exit_thread PROTO((void));
  25. void _exit_thread PROTO((void));
  26.  
  27. type_lock allocate_lock PROTO((void));
  28. void free_lock PROTO((type_lock));
  29. int acquire_lock PROTO((type_lock, int));
  30. #define WAIT_LOCK    1
  31. #define NOWAIT_LOCK    0
  32. void release_lock PROTO((type_lock));
  33.  
  34. type_sema allocate_sema PROTO((int));
  35. void free_sema PROTO((type_sema));
  36. void down_sema PROTO((type_sema));
  37. void up_sema PROTO((type_sema));
  38.  
  39. #ifndef NO_EXIT_PROG
  40. void exit_prog PROTO((int));
  41. void _exit_prog PROTO((int));
  42. #endif
  43.  
  44. #ifdef __cplusplus
  45. }
  46. #endif
  47.  
  48. #endif
  49.