Lines Matching defs:list

160 static list_t	lwps;				/* list of lwps/processes */
161 static list_t users; /* list of users */
162 static list_t tasks; /* list of tasks */
163 static list_t projects; /* list of projects */
164 static list_t zones; /* list of zones */
165 static list_t lgroups; /* list of lgroups */
226 * Queries the memory virtual and rss size for each member of a list.
230 list_getsize(list_t *list)
307 for (id = list->l_head; id != NULL; id = id->id_next) {
351 * A routine to display the contents of the list on the screen
354 list_print(list_t *list)
370 if (list->l_size == 0)
382 ((list->l_type == LT_LWPS) || !(opts.o_outpmode & OPT_SPLIT)))
388 switch (list->l_type) {
440 for (i = 0; i < list->l_used; i++) {
441 switch (list->l_type) {
446 id = list->l_ptrs[i];
458 if (list->l_type == LT_USERS) {
463 } else if (list->l_type == LT_ZONES) {
482 if (list->l_type == LT_PROJECTS)
486 else if (list->l_type == LT_TASKS)
490 else if (list->l_type == LT_ZONES)
501 lwp = list->l_ptrs[i];
589 switch (list->l_type) {
610 if ((opts.o_outpmode & OPT_SPLIT) && list->l_type == LT_LWPS)
625 list_add_lwp(list_t *list, pid_t pid, id_t lwpid)
629 if (list->l_head == NULL) {
630 list->l_head = list->l_tail = lwp = Zalloc(sizeof (lwp_info_t));
633 lwp->li_prev = list->l_tail;
634 ((lwp_info_t *)list->l_tail)->li_next = lwp;
635 list->l_tail = lwp;
640 list->l_count++;
645 list_remove_lwp(list_t *list, lwp_info_t *lwp)
650 list->l_head = lwp->li_next; /* removing the head */
654 list->l_tail = lwp->li_prev; /* removing the tail */
658 list->l_count--;
663 list_clear(list_t *list)
665 if (list->l_type == LT_LWPS) {
666 lwp_info_t *lwp = list->l_tail;
676 id_info_t *id = list->l_head;
684 list->l_count = 0;
685 list->l_head = list->l_tail = NULL;
690 list_update(list_t *list, lwp_info_t *lwp)
694 if (list->l_head == NULL) { /* first element */
695 list->l_head = list->l_tail = id = Zalloc(sizeof (id_info_t));
699 for (id = list->l_head; id; id = id->id_next) {
700 if ((list->l_type == LT_USERS) &&
703 if ((list->l_type == LT_TASKS) &&
706 if ((list->l_type == LT_PROJECTS) &&
709 if ((list->l_type == LT_ZONES) &&
712 if ((list->l_type == LT_LGRPS) &&
737 id = list->l_tail;
739 id->id_next->id_prev = list->l_tail;
741 list->l_tail = id->id_next;
742 id = list->l_tail;
764 list->l_count++;
1074 * This procedure removes all dead lwps from the linked list of all lwps.
1075 * It also creates linked list of ids if necessary.
1078 list_refresh(list_t *list)
1082 if (!(list->l_type & LT_LWPS))
1085 for (lwp = list->l_head; lwp != NULL; ) {
1093 lwp->li_key = list_getkeyval(list, lwp);