Lines Matching defs:new
28 * Added a bunch of new -o fields posix doesn't mention, and we don't
702 static int get_ps(struct dirtree *new)
721 if (!new->parent)
727 slot[SLOT_tid] = *slot = atol(new->name);
736 fd = dirtree_parentfd(new);
743 // parse oddball fields: the first field is same as new->name (skip it)
773 slot[SLOT_uid] = new->st.st_uid;
774 slot[SLOT_gid] = new->st.st_gid;
789 slot[SLOT_ruid] = s ? atol(s) : new->st.st_uid;
791 slot[SLOT_rgid] = s ? atol(s) : new->st.st_gid;
993 new->extra = (long)s;
1000 static int get_threads(struct dirtree *new)
1006 if (!new->parent) return get_ps(new);
1007 pid = atol(new->name);
1009 TT.threadparent = new;
1010 if (!get_ps(new)) {
1021 new->child = dirtree_flagread(toybuf, DIRTREE_SHUTUP|DIRTREE_PROC, get_ps);
1022 if (new->child == DIRTREE_ABORTVAL) new->child = 0;
1025 tb = (void *)new->extra;
1030 if (new->child) for (dt = new->child->child; dt; dt = dt->next) {
1038 TT.show_process((void *)new->extra);
1039 if ((dt = new->child)) {
1040 new->child = 0;
1042 new = dt->child->next;
1045 dt->child = new;
1260 // fields from dirtree leaf nodes. (top diffs old & new array to show changes)
1466 } plist[2], *plold, *plnew, old, new, mix;
1514 // Collate old and new into "mix", depends on /proc read in pid sort order
1516 new = *plnew;
1517 mix.tb = xmalloc((old.count+new.count)*sizeof(struct procpid));
1521 while (old.count || new.count) {
1523 *ntb = new.count ? *new.tb : 0;
1526 if (old.count && (!new.count || otb->slot[merge_idx] < ntb->slot[merge_idx])) {
1533 // If we just have new, use it verbatim
1537 if (filter(otb->slot, ntb->slot, new.whence-old.whence)) {
1544 new.tb++;
1545 new.count--;
1684 if (timeout<=now) timeout = new.whence+TT.top.d;
1786 // Compare old and new proces lists to measure changes