Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

psradm(1M)

psrinfo(1M)

p_online(2)

sysconf(3C)

processor_bind(2)

NAME

processor_bind − bind LWPs to a processor

SYNOPSIS

#include <sys/types.h>
#include <sys/processor.h>
#include <sys/procset.h>

int processor_bind(idtype_t idtype, id_t id, processorid_t processorid,

processorid_t ∗obind);

DESCRIPTION

The LWP or set of LWPs specified by idtype and id are bound to the processor specified by processorid. Additionally, if obind is not NULL, the processorid_t variable pointed to by obind will be set to the previous binding of one of the specified LWPs. 

If idtype is P_PID, the binding effects all LWPs of the process with process I.D. (pid) id.

If idtype is P_LWP, the binding effects the LWP of the current process with LWP I.D.  id.

If id is P_MYID, the specified LWP or process is the current one. 

The effective user of the calling process must be super-user, or its real or effective user ID must match the real or effective user ID of the LWPs being bound.  If the calling process does not have permission to change all of the specified LWPs, the bindings of the LWPs for which it does have permission will be changed even though an error is returned. 

RETURN VALUES

processor_bind returns 0 if successful.  Otherwise -1 is returned and errno is set to reflect the error. 

ERRORS

ESRCH No processes or LWPs were found to match the criteria specified by idtype and id.

EINVAL An non-existent or offline processor was specified. 

EINVAL idtype was not P_PID or P_LWP. 

EFAULT The location pointed to by obind was not NULL and not writable by the user. 

EPERM The effective user of the calling process is not super-user, and its real or effective user ID does not match the real or effective user ID of one of the LWPs being bound. 

SEE ALSO

psradm(1M), psrinfo(1M), p_online(2), sysconf(3C)

Sun Microsystems  —  Last change: 23 Sep 1992

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026