Lines Matching defs:up

165 	struct uproc	*up, *parent, *pgrp;
281 PRINTF((gettext(" up")));
358 up = findhash(info.pr_pid);
359 up->p_ttyd = info.pr_ttydev;
360 up->p_state = (info.pr_nlwp == 0? ZOMBIE : RUNNING);
361 up->p_time = 0;
362 up->p_ctime = 0;
363 up->p_igintr = 0;
364 (void) strncpy(up->p_comm, info.pr_fname,
366 up->p_args[0] = 0;
368 if (up->p_state != NONE && up->p_state != ZOMBIE) {
396 up->p_time = statinfo.pr_utime.tv_sec +
398 up->p_ctime = statinfo.pr_cutime.tv_sec +
428 up->p_igintr =
435 up->p_args[0] = 0;
437 (void) strcat(up->p_args, info.pr_psargs);
438 if (up->p_args[0] == 0 ||
439 up->p_args[0] == '-' && up->p_args[1] <= ' ' ||
440 up->p_args[0] == '?') {
441 (void) strcat(up->p_args, " (");
442 (void) strcat(up->p_args, up->p_comm);
443 (void) strcat(up->p_args, ")");
454 up->p_pgrpl = pgrp->p_pgrpl;
455 pgrp->p_pgrpl = up;
462 up->p_sibling = parent->p_child;
463 up->p_child = 0;
465 parent->p_child = up;
528 showtotals(struct uproc *up)
536 calctotals(up);
553 * tree starting from the given process pointer(up).
561 calctotals(struct uproc *up)
571 if (up->p_state == VISITED)
573 up->p_state = VISITED;
574 if (up->p_state == NONE || up->p_state == ZOMBIE)
577 if (empty && !up->p_igintr) {
582 if (up->p_upid > curpid && (!up->p_igintr || empty)) {
583 curpid = up->p_upid;
585 (void) strcpy(doing, up->p_args);
587 (void) strcpy(doing, up->p_comm);
591 jobtime += up->p_time + up->p_ctime;
592 proctime += up->p_time;
596 if (up->p_child) {
597 calctotals(up->p_child);
598 for (zp = up->p_child->p_sibling; zp; zp = zp->p_sibling)
614 struct uproc *up, *tp;
616 tp = up = &pr_htbl[pid % HSIZE];
617 if (up->p_upid == 0) { /* empty slot */
618 up->p_upid = pid;
619 up->p_state = NONE;
620 up->p_child = up->p_sibling = up->p_pgrpl = up->p_link = 0;
621 return (up);
623 if (up->p_upid == pid) { /* found in hash table */
624 return (up);
626 for (tp = up->p_link; tp; tp = tp->p_link) { /* follow chain */
640 tp->p_link = up->p_link; /* insert after head */
641 up->p_link = tp;