You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
1.4 KiB

  1. /*
  2. * Initialization.
  3. */
  4. static void
  5. PyThread__init_thread(void)
  6. {
  7. }
  8. /*
  9. * Thread support.
  10. */
  11. long
  12. PyThread_start_new_thread(void (*func)(void *), void *arg)
  13. {
  14. int success = 0; /* init not needed when SOLARIS_THREADS and */
  15. /* C_THREADS implemented properly */
  16. dprintf(("PyThread_start_new_thread called\n"));
  17. if (!initialized)
  18. PyThread_init_thread();
  19. return success < 0 ? -1 : 0;
  20. }
  21. long
  22. PyThread_get_thread_ident(void)
  23. {
  24. if (!initialized)
  25. PyThread_init_thread();
  26. }
  27. void
  28. PyThread_exit_thread(void)
  29. {
  30. dprintf(("PyThread_exit_thread called\n"));
  31. if (!initialized)
  32. exit(0);
  33. }
  34. /*
  35. * Lock support.
  36. */
  37. PyThread_type_lock
  38. PyThread_allocate_lock(void)
  39. {
  40. dprintf(("PyThread_allocate_lock called\n"));
  41. if (!initialized)
  42. PyThread_init_thread();
  43. dprintf(("PyThread_allocate_lock() -> %p\n", lock));
  44. return (PyThread_type_lock) lock;
  45. }
  46. void
  47. PyThread_free_lock(PyThread_type_lock lock)
  48. {
  49. dprintf(("PyThread_free_lock(%p) called\n", lock));
  50. }
  51. int
  52. PyThread_acquire_lock(PyThread_type_lock lock, int waitflag)
  53. {
  54. int success;
  55. dprintf(("PyThread_acquire_lock(%p, %d) called\n", lock, waitflag));
  56. dprintf(("PyThread_acquire_lock(%p, %d) -> %d\n", lock, waitflag, success));
  57. return success;
  58. }
  59. void
  60. PyThread_release_lock(PyThread_type_lock lock)
  61. {
  62. dprintf(("PyThread_release_lock(%p) called\n", lock));
  63. }