Lines Matching refs:xidregistry
84 runtime->xidregistry.mutex = PyThread_allocate_lock(); in _PyRuntimeState_Init_impl()
85 if (runtime->xidregistry.mutex == NULL) { in _PyRuntimeState_Init_impl()
128 FREE_LOCK(runtime->xidregistry.mutex); in _PyRuntimeState_Fini()
150 int reinit_xidregistry = _PyThread_at_fork_reinit(&runtime->xidregistry.mutex); in _PyRuntimeState_ReInitThreads()
1734 _register_xidata(struct _xidregistry *xidregistry, PyTypeObject *cls, in _register_xidata() argument
1744 newhead->next = xidregistry->head; in _register_xidata()
1745 xidregistry->head = newhead; in _register_xidata()
1749 static void _register_builtins_for_crossinterpreter_data(struct _xidregistry *xidregistry);
1767 struct _xidregistry *xidregistry = &_PyRuntime.xidregistry ; in _PyCrossInterpreterData_RegisterClass() local
1768 PyThread_acquire_lock(xidregistry->mutex, WAIT_LOCK); in _PyCrossInterpreterData_RegisterClass()
1769 if (xidregistry->head == NULL) { in _PyCrossInterpreterData_RegisterClass()
1770 _register_builtins_for_crossinterpreter_data(xidregistry); in _PyCrossInterpreterData_RegisterClass()
1772 int res = _register_xidata(xidregistry, cls, getdata); in _PyCrossInterpreterData_RegisterClass()
1773 PyThread_release_lock(xidregistry->mutex); in _PyCrossInterpreterData_RegisterClass()
1784 struct _xidregistry *xidregistry = &_PyRuntime.xidregistry ; in _PyCrossInterpreterData_Lookup() local
1787 PyThread_acquire_lock(xidregistry->mutex, WAIT_LOCK); in _PyCrossInterpreterData_Lookup()
1788 struct _xidregitem *cur = xidregistry->head; in _PyCrossInterpreterData_Lookup()
1790 _register_builtins_for_crossinterpreter_data(xidregistry); in _PyCrossInterpreterData_Lookup()
1791 cur = xidregistry->head; in _PyCrossInterpreterData_Lookup()
1800 PyThread_release_lock(xidregistry->mutex); in _PyCrossInterpreterData_Lookup()
1907 _register_builtins_for_crossinterpreter_data(struct _xidregistry *xidregistry) in _register_builtins_for_crossinterpreter_data() argument
1910 if (_register_xidata(xidregistry, (PyTypeObject *)PyObject_Type(Py_None), _none_shared) != 0) { in _register_builtins_for_crossinterpreter_data()
1915 if (_register_xidata(xidregistry, &PyLong_Type, _long_shared) != 0) { in _register_builtins_for_crossinterpreter_data()
1920 if (_register_xidata(xidregistry, &PyBytes_Type, _bytes_shared) != 0) { in _register_builtins_for_crossinterpreter_data()
1925 if (_register_xidata(xidregistry, &PyUnicode_Type, _str_shared) != 0) { in _register_builtins_for_crossinterpreter_data()