processor_bind(2) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

processor_bind(2)

processor_bind(2)                System Calls                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 new_binding,
            processorid_t *old_binding);

DESCRIPTION
       The  processor_bind()  function  binds the LWP (lightweight process) or
       set of LWPs specified by idtype and id to the  processor  specified  by
       new_binding.  If  old_binding is not NULL, it will contain the previous
       binding of one of the specified LWPs, or PBIND_NONE if none were previ‐
       ously bound.


       The following idtypes can be used to specify one or more LWPs:

       P_PID       The binding affects all LWPs of the process with PID id.


       P_LWPID     The binding affects the LWP of the current process with LWP
                   ID id.


       P_TASKID    The binding affects all LWPs of all processes with task  ID
                   id.


       P_PROJID    The  binding affects all LWPs of all processes with project
                   ID id.


       P_CTID      The binding affects all LWPs of all processes with  process
                   contract ID id.


       P_ZONEID    The  binding affects all LWPs of all processes with zone ID
                   id.



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


       If  processorid  is PBIND_NONE, the processor bindings of the specified
       LWPs are cleared.


       If processorid is PBIND_QUERY, the processor bindings are not changed.


       It is important to note that the runtime behavior determined by proces‐
       sor_bind(2)  is  subject to the continued online state of the specified
       CPU and affiliation to the same processor set as the  target  LWPs.  If
       these  underlying  conditions change, a LWP may lose its affinity for a
       given CPU and need to be reset once the conditions are restored.


       The {PRIV_PROC_OWNER} privilege must be asserted in the  effective  set
       of  the calling process or the real or effective user ID of the calling
       process 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.


       Processor bindings are inherited across fork(2) and exec(2).

RETURN VALUES
       Upon  successful  completion,  0 is returned. Otherwise, −1 is returned
       and errno is set to indicate the error.

ERRORS
       The processor_bind() function will fail if:

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


       EINVAL     The  specified processor is not on-line, or the idtype argu‐
                  ment was not P_PID, P_LWPID, P_PROJID, P_TASKID, P_CTID,  or
                  P_ZONEID.

                  The  caller  is  in a non-global zone, the pools facility is
                  active, and the processor is not  a  member  of  the  zone's
                  pool's processor set.


       ENOTSUP    Binding  a  system  process  to  a processor set is not sup‐
                  ported.


       EPERM      The {PRIV_PROC_OWNER}  privilege  is  not  asserted  in  the
                  effective  set of the calling process and its real or effec‐
                  tive user ID does not match the real or effective user ID of
                  one of the LWPs being bound.


       ESRCH      No  processes, LWPs, or tasks were found to match the crite‐
                  ria specified by idtype and id.


ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE  TYPEAT‐
       TRIBUTE  VALUE  _  Interface StabilityCommitted _ MT-LevelAsync-Signal-
       Safe


SEE ALSO
       exec(2), fork(2), p_online(2), pset_bind(2),  sysconf(3C),  process(5),
       project(5),   attributes(7),   privileges(7),   pooladm(8),  psradm(8),
       psrinfo(8), zoneadm(8)



Oracle Solaris 11.4               22 Feb 2021                processor_bind(2)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3