Lines Matching refs:pthreads
445 static int pyrf_thread_map__init(struct pyrf_thread_map *pthreads, in pyrf_thread_map__init() argument
455 pthreads->threads = thread_map__new(pid, tid, uid); in pyrf_thread_map__init()
456 if (pthreads->threads == NULL) in pyrf_thread_map__init()
461 static void pyrf_thread_map__delete(struct pyrf_thread_map *pthreads) in pyrf_thread_map__delete() argument
463 thread_map__delete(pthreads->threads); in pyrf_thread_map__delete()
464 pthreads->ob_type->tp_free((PyObject*)pthreads); in pyrf_thread_map__delete()
469 struct pyrf_thread_map *pthreads = (void *)obj; in pyrf_thread_map__length() local
471 return pthreads->threads->nr; in pyrf_thread_map__length()
476 struct pyrf_thread_map *pthreads = (void *)obj; in pyrf_thread_map__item() local
478 if (i >= pthreads->threads->nr) in pyrf_thread_map__item()
481 return Py_BuildValue("i", pthreads->threads->map[i]); in pyrf_thread_map__item()
631 PyObject *pcpus = NULL, *pthreads = NULL; in pyrf_evsel__open() local
636 &pcpus, &pthreads, &group, &inherit)) in pyrf_evsel__open()
639 if (pthreads != NULL) in pyrf_evsel__open()
640 threads = ((struct pyrf_thread_map *)pthreads)->threads; in pyrf_evsel__open()
697 PyObject *pcpus = NULL, *pthreads = NULL; in pyrf_evlist__init() local
701 if (!PyArg_ParseTuple(args, "OO", &pcpus, &pthreads)) in pyrf_evlist__init()
704 threads = ((struct pyrf_thread_map *)pthreads)->threads; in pyrf_evlist__init()