• Home
  • Raw
  • Download

Lines Matching refs:test_c_thread

1611     test_c_thread_t *test_c_thread = data;  in temporary_c_thread()  local
1615 PyThread_release_lock(test_c_thread->start_event); in temporary_c_thread()
1620 res = PyObject_CallNoArgs(test_c_thread->callback); in temporary_c_thread()
1621 Py_CLEAR(test_c_thread->callback); in temporary_c_thread()
1633 PyThread_release_lock(test_c_thread->exit_event); in temporary_c_thread()
1636 static test_c_thread_t test_c_thread; variable
1650 test_c_thread.start_event = PyThread_allocate_lock(); in call_in_temporary_c_thread()
1651 test_c_thread.exit_event = PyThread_allocate_lock(); in call_in_temporary_c_thread()
1652 test_c_thread.callback = NULL; in call_in_temporary_c_thread()
1653 if (!test_c_thread.start_event || !test_c_thread.exit_event) { in call_in_temporary_c_thread()
1658 test_c_thread.callback = Py_NewRef(callback); in call_in_temporary_c_thread()
1660 PyThread_acquire_lock(test_c_thread.start_event, 1); in call_in_temporary_c_thread()
1661 PyThread_acquire_lock(test_c_thread.exit_event, 1); in call_in_temporary_c_thread()
1663 thread = PyThread_start_new_thread(temporary_c_thread, &test_c_thread); in call_in_temporary_c_thread()
1666 PyThread_release_lock(test_c_thread.start_event); in call_in_temporary_c_thread()
1667 PyThread_release_lock(test_c_thread.exit_event); in call_in_temporary_c_thread()
1671 PyThread_acquire_lock(test_c_thread.start_event, 1); in call_in_temporary_c_thread()
1672 PyThread_release_lock(test_c_thread.start_event); in call_in_temporary_c_thread()
1679 PyThread_acquire_lock(test_c_thread.exit_event, 1); in call_in_temporary_c_thread()
1680 PyThread_release_lock(test_c_thread.exit_event); in call_in_temporary_c_thread()
1686 Py_CLEAR(test_c_thread.callback); in call_in_temporary_c_thread()
1687 if (test_c_thread.start_event) { in call_in_temporary_c_thread()
1688 PyThread_free_lock(test_c_thread.start_event); in call_in_temporary_c_thread()
1689 test_c_thread.start_event = NULL; in call_in_temporary_c_thread()
1691 if (test_c_thread.exit_event) { in call_in_temporary_c_thread()
1692 PyThread_free_lock(test_c_thread.exit_event); in call_in_temporary_c_thread()
1693 test_c_thread.exit_event = NULL; in call_in_temporary_c_thread()
1702 PyThread_acquire_lock(test_c_thread.exit_event, 1); in join_temporary_c_thread()
1703 PyThread_release_lock(test_c_thread.exit_event); in join_temporary_c_thread()
1705 Py_CLEAR(test_c_thread.callback); in join_temporary_c_thread()
1706 PyThread_free_lock(test_c_thread.start_event); in join_temporary_c_thread()
1707 test_c_thread.start_event = NULL; in join_temporary_c_thread()
1708 PyThread_free_lock(test_c_thread.exit_event); in join_temporary_c_thread()
1709 test_c_thread.exit_event = NULL; in join_temporary_c_thread()