Lines Matching refs:tfp

96 	struct tclass_for_proc *tfp;
98 TAILQ_FOREACH(tfp, &tfp_head, tfp_link) {
99 if (tfp->tfp_pid == pid)
102 return (tfp);
111 struct tclass_for_proc *tfp;
113 TAILQ_FOREACH(tfp, &tfp_head, tfp_link) {
114 if (strncmp(pname, tfp->tfp_pname,
115 sizeof (tfp->tfp_pname)) == 0)
118 return (tfp);
124 struct tclass_for_proc *tfp = NULL;
133 TAILQ_FOREACH(tfp, &tfp_head, tfp_link) {
134 if ((tfp->tfp_pid == pid) || (tfp->tfp_pid == -1 &&
135 strncmp(pname, tfp->tfp_pname,
136 sizeof (tfp->tfp_pname)) == 0)) {
137 *sotc = tfp->tfp_class;
144 return ((tfp == NULL) ? 0 : 1);
154 struct tclass_for_proc *tfp, *tvar;
158 TAILQ_FOREACH_SAFE(tfp, &tfp_head, tfp_link, tvar) {
161 if (tfp->tfp_pid == -1)
163 if ((p = proc_find(tfp->tfp_pid)) == NULL) {
165 TAILQ_REMOVE(&tfp_head, tfp, tfp_link);
167 _FREE(tfp, M_TEMP);
183 free_tclass_for_proc(struct tclass_for_proc *tfp)
185 if (tfp == NULL)
188 TAILQ_REMOVE(&tfp_head, tfp, tfp_link);
189 _FREE(tfp, M_TEMP);
199 struct tclass_for_proc *tfp, *tvar;
203 TAILQ_FOREACH_SAFE(tfp, &tfp_head, tfp_link, tvar) {
204 free_tclass_for_proc(tfp);
219 struct tclass_for_proc *tfp;
224 tfp = _MALLOC(sizeof (struct tclass_for_proc), M_TEMP, M_NOWAIT|M_ZERO);
225 if (tfp == NULL)
228 tfp->tfp_pid = pid;
234 TAILQ_INSERT_HEAD(&tfp_head, tfp, tfp_link);
236 strlcpy(tfp->tfp_pname, pname, sizeof (tfp->tfp_pname));
237 TAILQ_INSERT_TAIL(&tfp_head, tfp, tfp_link);
242 return (tfp);
255 struct tclass_for_proc *tfp;
266 /* Need a tfp */
269 tfp = find_tfp_by_pid(pid);
270 if (tfp == NULL) {
271 tfp = alloc_tclass_for_proc(pid, NULL);
272 if (tfp == NULL) {
278 tfp->tfp_class = tclass;
282 if (tfp != NULL) {
328 struct tclass_for_proc *tfp;
332 tfp = find_tfp_by_pname(so_tcdbg->so_tcdbg_pname);
333 if (tfp == NULL) {
334 tfp = alloc_tclass_for_proc(-1, so_tcdbg->so_tcdbg_pname);
335 if (tfp == NULL) {
341 tfp->tfp_class = so_tcdbg->so_tcdbg_tclass;
404 struct tclass_for_proc *tfp;
416 /* Need a tfp */
419 tfp = find_tfp_by_pid(pid);
420 if (tfp != NULL) {
421 so_tcdbg->so_tcdbg_tclass = tfp->tfp_class;
436 struct tclass_for_proc *tfp;
441 /* Need a tfp */
444 tfp = find_tfp_by_pname(so_tcdbg->so_tcdbg_pname);
445 if (tfp != NULL) {
446 so_tcdbg->so_tcdbg_tclass = tfp->tfp_class;
459 struct tclass_for_proc *tfp = NULL;
464 tfp = find_tfp_by_pid(pid);
466 tfp = find_tfp_by_pname(so_tcdbg->so_tcdbg_pname);
468 if (tfp != NULL) {
469 free_tclass_for_proc(tfp);
562 struct tclass_for_proc *tfp;
584 TAILQ_FOREACH(tfp, &tfp_head, tfp_link) {
587 if (tfp->tfp_pid != -1) {
589 ptr->so_tcdbg_pid = tfp->tfp_pid;
594 tfp->tfp_pname,
597 ptr->so_tcdbg_tclass = tfp->tfp_class;