Lines Matching defs:pset
36 #include <sys/pset.h>
137 bind_err(psetid_t pset, const char *zname, id_t pid, id_t lwpid, int err)
141 switch (pset) {
166 create_out(psetid_t pset)
168 (void) printf("%s %d\n", gettext("created processor set"), pset);
198 query_out(id_t pid, id_t lwpid, psetid_t pset)
211 if (pset == PS_NONE)
215 (void) printf(gettext("%s id %s: %d\n"), proclwp, pidstr, pset);
222 info_out(psetid_t pset, int type, uint_t numcpus, processorid_t *cpus)
226 (void) printf(gettext("system processor set %d:"), pset);
228 (void) printf(gettext("user processor set %d:"), pset);
244 print_out(processorid_t cpu, psetid_t pset)
246 if (pset == PS_NONE)
249 (void) printf(gettext("processor %d: %d\n"), cpu, pset);
287 bind_lwp(id_t pid, id_t lwpid, psetid_t pset)
291 if (pset_bind_lwp(pset, lwpid, pid, &old_pset) != 0) {
292 bind_err(pset, NULL, pid, lwpid, errno);
299 bind_out(pid, lwpid, old_pset, pset);
304 do_cpu(psetid_t pset, processorid_t cpu, int print, int mustexist)
309 if ((!Fflag && pset_assign(pset, cpu, &old_pset) != 0) ||
310 (Fflag && pset_assign_forced(pset, cpu, &old_pset) != 0)) {
315 switch (pset) {
331 assign_out(cpu, old_pset, pset);
336 do_range(psetid_t pset, processorid_t first, processorid_t last, int print)
344 if ((err = do_cpu(pset, cpu, print, 0)) == 0)
357 do_info(psetid_t pset)
370 if (pset_info(pset, &type, &numcpus, cpus) != 0) {
371 warn(gettext("cannot get info for processor set %d"), pset);
375 info_out(pset, type, numcpus, cpus);
381 do_destroy(psetid_t pset)
383 if (pset_destroy(pset) != 0) {
384 warn(gettext("could not remove processor set %d"), pset);
387 (void) printf(gettext("removed processor set %d\n"), pset);
392 do_intr(psetid_t pset, int flag)
405 if (pset_info(pset, NULL, &numcpus, cpus) != 0) {
407 "cannot set interrupt status for processor set %d"), pset);
471 psetid_t pset;
477 if (pset_assign(PS_QUERY, cpuid, &pset) == 0) {
478 if (pset != PS_NONE)
479 print_out(cpuid, pset);
528 exec_cmd(psetid_t pset, char **argv)
530 if (pset_bind(pset, P_PID, P_MYID, NULL) != 0) {
531 warn(gettext("cannot exec in processor set %d"), pset);
567 do_lwps(id_t pid, const char *range, psetid_t pset)
586 bind_err(pset, NULL, pid, -1, errno);
591 bind_err(pset, NULL, pid, -1, errno);
598 bind_err(pset, NULL, pid, -1, errno);
602 bind_err(pset, NULL, pid, -1, errno);
622 bind_lwp(pid, lwp->pr_lwpid, pset);
646 psetid_t pset, old_pset;
671 pset = PS_NONE;
675 pset = PS_QUERY;
685 pset = PS_NONE;
692 pset = PS_QUERY;
775 pset = strtol(*argv, &errptr, 10);
776 if (errptr != NULL && *errptr != '\0' || pset < 0) {
785 if (pset_create(&pset) != 0) {
789 create_out(pset);
803 pset = (psetid_t)strtol(*argv, &errptr, 10);
811 errors = do_info(pset);
813 errors = do_destroy(pset);
817 errors = do_intr(pset, P_ONLINE);
819 errors = do_intr(pset, P_NOINTR);
825 exec_cmd(pset, argv);
852 if (do_cpu(pset, cpu, pflag, 1))
877 if (do_range(pset, first, last, pflag))
899 } else if (pset_bind(pset, P_ZONEID, zid,
901 bind_err(pset, zname, -1, -1, errno);
905 zname, pset);
936 ret = do_lwps(pid, lwps, pset);
945 if (pset_bind(pset, P_PID, pid,
947 bind_err(pset, NULL, pid, -1, errno);
954 bind_out(pid, -1, old_pset, pset);
965 pset = (id_t)strtol(*argv, &errptr, 10);
973 &pset, PR_WALK_LWP);
977 if (pset_bind(PS_NONE, P_PSETID, pset,
980 "processor set %d"), (int)pset);