Lines Matching refs:up
162 struct uproc *up, *parent, *pgrp;
278 PRINTF((gettext("up")));
357 up = findhash(info.pr_pid);
358 up->p_ttyd = info.pr_ttydev;
359 up->p_state = (info.pr_nlwp == 0? ZOMBIE : RUNNING);
360 up->p_time = 0;
361 up->p_ctime = 0;
362 up->p_igintr = 0;
363 (void) strncpy(up->p_comm, info.pr_fname,
365 up->p_args[0] = 0;
367 if (up->p_state != NONE && up->p_state != ZOMBIE) {
395 up->p_time = statinfo.pr_utime.tv_sec +
397 up->p_ctime = statinfo.pr_cutime.tv_sec +
427 up->p_igintr =
434 up->p_args[0] = 0;
436 (void) strcat(up->p_args, info.pr_psargs);
437 if (up->p_args[0] == 0 ||
438 up->p_args[0] == '-' && up->p_args[1] <= ' ' ||
439 up->p_args[0] == '?') {
440 (void) strcat(up->p_args, " (");
441 (void) strcat(up->p_args, up->p_comm);
442 (void) strcat(up->p_args, ")");
453 up->p_pgrpl = pgrp->p_pgrpl;
454 pgrp->p_pgrpl = up;
461 up->p_sibling = parent->p_child;
462 up->p_child = 0;
464 parent->p_child = up;
525 showtotals(struct uproc *up)
533 calctotals(up);
550 * tree starting from the given process pointer(up).
558 calctotals(struct uproc *up)
568 if (up->p_state == VISITED)
570 up->p_state = VISITED;
571 if (up->p_state == NONE || up->p_state == ZOMBIE)
574 if (empty && !up->p_igintr) {
579 if (up->p_upid > curpid && (!up->p_igintr || empty)) {
580 curpid = up->p_upid;
582 (void) strcpy(doing, up->p_args);
584 (void) strcpy(doing, up->p_comm);
588 jobtime += up->p_time + up->p_ctime;
589 proctime += up->p_time;
593 if (up->p_child) {
594 calctotals(up->p_child);
595 for (zp = up->p_child->p_sibling; zp; zp = zp->p_sibling)
611 struct uproc *up, *tp;
613 tp = up = &pr_htbl[pid % HSIZE];
614 if (up->p_upid == 0) { /* empty slot */
615 up->p_upid = pid;
616 up->p_state = NONE;
617 up->p_child = up->p_sibling = up->p_pgrpl = up->p_link = 0;
618 return (up);
620 if (up->p_upid == pid) { /* found in hash table */
621 return (up);
623 for (tp = up->p_link; tp; tp = tp->p_link) { /* follow chain */
637 tp->p_link = up->p_link; /* insert after head */
638 up->p_link = tp;