| print_affinitylist(struct tcb *tcp, long list, unsigned int len) |
| unsigned long w, min_len; |
| if (abbrev(tcp) && len / sizeof(w) > max_strlen) |
| min_len = len - max_strlen * sizeof(w); |
| for (; len >= sizeof(w) && len > min_len; |
| len -= sizeof(w), list += sizeof(w)) { |
| if (umove(tcp, list, &w) < 0) |
| tprintf(", %s}", (len >= sizeof(w) && len > min_len ? |
| tprints(first ? "{}" : "}"); |
| sys_sched_setaffinity(struct tcb *tcp) |
| tprintf("%ld, %lu, ", tcp->u_arg[0], tcp->u_arg[1]); |
| print_affinitylist(tcp, tcp->u_arg[2], tcp->u_arg[1]); |
| sys_sched_getaffinity(struct tcb *tcp) |
| tprintf("%ld, %lu, ", tcp->u_arg[0], tcp->u_arg[1]); |
| tprintf("%#lx", tcp->u_arg[2]); |
| print_affinitylist(tcp, tcp->u_arg[2], tcp->u_rval); |