diff options
Diffstat (limited to 'usr/src/lib')
-rw-r--r-- | usr/src/lib/libc/common/sys/_pset.s | 4 | ||||
-rw-r--r-- | usr/src/lib/libc/port/llib-lc | 2 | ||||
-rw-r--r-- | usr/src/lib/libc/port/mapfile-vers | 1 | ||||
-rw-r--r-- | usr/src/lib/libc/port/sys/psetsys.c | 20 | ||||
-rw-r--r-- | usr/src/lib/libproc/common/libproc.h | 2 | ||||
-rw-r--r-- | usr/src/lib/libproc/common/llib-lproc | 3 | ||||
-rw-r--r-- | usr/src/lib/libproc/common/mapfile-vers | 1 | ||||
-rw-r--r-- | usr/src/lib/libproc/common/pr_pbind.c | 72 |
8 files changed, 16 insertions, 89 deletions
diff --git a/usr/src/lib/libc/common/sys/_pset.s b/usr/src/lib/libc/common/sys/_pset.s index 1f07c80267..64d243959e 100644 --- a/usr/src/lib/libc/common/sys/_pset.s +++ b/usr/src/lib/libc/common/sys/_pset.s @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -32,7 +32,7 @@ * _pset(int subcode, long arg1, long arg2, long arg3, long arg4) * * Syscall entry point for pset_create, pset_assign, pset_destroy, - * pset_bind, and pset_info. + * pset_bind, pset_bind_lwp and pset_info. */ SYSCALL2_RVAL1(_pset,pset) RETC diff --git a/usr/src/lib/libc/port/llib-lc b/usr/src/lib/libc/port/llib-lc index 1f5ed5c517..ffd9185d61 100644 --- a/usr/src/lib/libc/port/llib-lc +++ b/usr/src/lib/libc/port/llib-lc @@ -1347,6 +1347,8 @@ int pset_assign(psetid_t pset, processorid_t cpu, psetid_t *opset); int pset_assign_forced(psetid_t pset, processorid_t cpu, psetid_t *opset); int pset_info(psetid_t pset, int *type, u_int *numcpus, processorid_t *cpulist); int pset_bind(psetid_t pset, idtype_t idtype, id_t id, psetid_t *opset); +int pset_bind_lwp(psetid_t pset, id_t id, pid_t, psetid_t *opset); + /* rctlsys.c */ int getrctl(const char *name, rctlblk_t *old_rblk, rctlblk_t *new_rblk, diff --git a/usr/src/lib/libc/port/mapfile-vers b/usr/src/lib/libc/port/mapfile-vers index 35861f0f73..d893f8bc0d 100644 --- a/usr/src/lib/libc/port/mapfile-vers +++ b/usr/src/lib/libc/port/mapfile-vers @@ -1605,6 +1605,7 @@ SUNWprivate_1.1 { __priv_bracket; __priv_relinquish; pset_assign_forced; + pset_bind_lwp; _psignal; _pthread_setcleanupinit; __putwchar_xpg5; diff --git a/usr/src/lib/libc/port/sys/psetsys.c b/usr/src/lib/libc/port/sys/psetsys.c index 05ee9a78e4..871a1c1941 100644 --- a/usr/src/lib/libc/port/sys/psetsys.c +++ b/usr/src/lib/libc/port/sys/psetsys.c @@ -20,22 +20,10 @@ */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - -#pragma weak _pset_create = pset_create -#pragma weak _pset_destroy = pset_destroy -#pragma weak _pset_assign = pset_assign -#pragma weak _pset_info = pset_info -#pragma weak _pset_bind = pset_bind -#pragma weak _pset_getloadavg = pset_getloadavg -#pragma weak _pset_list = pset_list -#pragma weak _pset_setattr = pset_setattr -#pragma weak _pset_getattr = pset_getattr - #include "lint.h" #include <sys/types.h> #include <sys/procset.h> @@ -84,6 +72,12 @@ pset_bind(psetid_t pset, idtype_t idtype, id_t id, psetid_t *opset) return (_pset(PSET_BIND, pset, idtype, id, opset)); } +int +pset_bind_lwp(psetid_t pset, id_t id, pid_t pid, psetid_t *opset) +{ + return (_pset(PSET_BIND_LWP, pset, id, pid, opset)); +} + /* * Get the per-processor-set load average. */ diff --git a/usr/src/lib/libproc/common/libproc.h b/usr/src/lib/libproc/common/libproc.h index c9807a4da7..a425d3c211 100644 --- a/usr/src/lib/libproc/common/libproc.h +++ b/usr/src/lib/libproc/common/libproc.h @@ -354,8 +354,6 @@ extern int pr_getsockopt(struct ps_prochandle *, int, int, int, void *, int *); extern int pr_processor_bind(struct ps_prochandle *, idtype_t, id_t, int, int *); -extern int pr_pset_bind(struct ps_prochandle *, - int, idtype_t, id_t, int *); /* * Function prototypes for accessing per-LWP register information. diff --git a/usr/src/lib/libproc/common/llib-lproc b/usr/src/lib/libproc/common/llib-lproc index 2faf27865d..9626e80024 100644 --- a/usr/src/lib/libproc/common/llib-lproc +++ b/usr/src/lib/libproc/common/llib-lproc @@ -22,7 +22,7 @@ /* PROTOLIB1 */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ #include "libproc.h" @@ -304,7 +304,6 @@ int pr_access(struct ps_prochandle *Pr, const char *path, int amode); /* pr_pbind.c */ int pr_processor_bind(struct ps_prochandle *Pr, idtype_t, id_t, int, int *); -int pr_pset_bind(struct ps_prochandle *Pr, int, idtype_t, id_t, int *); /* pr_rename.c */ int pr_rename(struct ps_prochandle *Pr, const char *old, const char *new); diff --git a/usr/src/lib/libproc/common/mapfile-vers b/usr/src/lib/libproc/common/mapfile-vers index 555ad60c31..8fff0bb1aa 100644 --- a/usr/src/lib/libproc/common/mapfile-vers +++ b/usr/src/lib/libproc/common/mapfile-vers @@ -220,7 +220,6 @@ SUNWprivate_1.1 { proc_walk; pr_open; pr_processor_bind; - pr_pset_bind; pr_rename; pr_setitimer; pr_setprojrctl; diff --git a/usr/src/lib/libproc/common/pr_pbind.c b/usr/src/lib/libproc/common/pr_pbind.c index 1a9f6de689..889a493eaa 100644 --- a/usr/src/lib/libproc/common/pr_pbind.c +++ b/usr/src/lib/libproc/common/pr_pbind.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,12 +19,10 @@ * CDDL HEADER END */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/types.h> #include <sys/procset.h> #include <sys/processor.h> @@ -90,66 +87,3 @@ pr_processor_bind(struct ps_prochandle *Pr, idtype_t idtype, id_t id, } return (rval.sys_rval1); } - -int -pr_pset_bind(struct ps_prochandle *Pr, int pset, idtype_t idtype, id_t id, - int *opset) -{ - sysret_t rval; /* return value */ - argdes_t argd[5]; /* arg descriptors */ - argdes_t *adp = &argd[0]; /* first argument */ - int error; - - if (Pr == NULL) /* no subject process */ - return (pset_bind(pset, idtype, id, opset)); - - adp->arg_value = PSET_BIND; /* PSET_BIND */ - adp->arg_object = NULL; - adp->arg_type = AT_BYVAL; - adp->arg_inout = AI_INPUT; - adp->arg_size = 0; - adp++; - - adp->arg_value = pset; /* pset */ - adp->arg_object = NULL; - adp->arg_type = AT_BYVAL; - adp->arg_inout = AI_INPUT; - adp->arg_size = 0; - adp++; - - adp->arg_value = idtype; /* idtype */ - adp->arg_object = NULL; - adp->arg_type = AT_BYVAL; - adp->arg_inout = AI_INPUT; - adp->arg_size = 0; - adp++; - - adp->arg_value = id; /* id */ - adp->arg_object = NULL; - adp->arg_type = AT_BYVAL; - adp->arg_inout = AI_INPUT; - adp->arg_size = 0; - adp++; - - if (opset == NULL) { - adp->arg_value = 0; /* opset */ - adp->arg_object = NULL; - adp->arg_type = AT_BYVAL; - adp->arg_inout = AI_INPUT; - adp->arg_size = 0; - } else { - adp->arg_value = 0; - adp->arg_object = opset; - adp->arg_type = AT_BYREF; - adp->arg_inout = AI_INOUT; - adp->arg_size = sizeof (int); - } - - error = Psyscall(Pr, &rval, SYS_pset, 5, &argd[0]); - - if (error) { - errno = (error < 0)? ENOSYS : error; - return (-1); - } - return (rval.sys_rval1); -} |