cpusetMoveMigrate  -  move processes, identified by an ID,
       and their associate memory from one cpuset to another


SYNOPSIS

       #include <cpuset.h>

       int cpusetMoveMigrate(char *from_qname, char *to_qname, int idtype,
                       int64_t id);


DESCRIPTION

       The cpusetMoveMigrate function is used to  move  processes
       and  their  associated  memory,  identified by iidd from one
       cpuset to another.

       The ffrroomm_qqnnaammee argument is the name  of  the  cpuset  from
       which the processes are moved. Using a NULL for this argu­
       ment will result in having all the processes identified by
       iidd  to be moved into the global cpuset.  The global cpuset
       is a term used to describe all the CPUS that are not in  a
       cpuset.

       The  ttoo_qqnnaammee  argument  is  the  name  of the destination
       cpuset for the specified ID.  Using a NULL for this  argu­
       ment will result in having all the processes identified by
       iidd to be moved into the global cpuset.

       The iiddttyyppee argument defines the type of number  passed  in
       as  iidd.   The  possible  options for iiddttyyppee are CCPPUUSSEETT_PPIIDD
       (Process   ID),   CCPPUUSSEETT_AASSHH   (Array   Session   Handle),
       CCPPUUSSEETT_PPGGIIDD  (Process  Group ID), CCPPUUSSEETT_SSIIDD (Session ID),
       and CCPPUUSSEETT_JJIIDD (Job ID).  Not all these possible types are
       implemented.

       This function requires the processes associated with iidd to
       be stopped before it can enact the move.  A test  is  made
       to  see  if all the processes are stopped.  If iidd has pro­
       cesses A, B, and C and B is  stopped,  A  and  C  will  be
       stopped.  Then,  after the move, A and C will be restarted
       (but not B).

       This function requires root privilege.


EXAMPLES

       This example moves a process  ID  from  the  cpuset  queue
       named mpi_set to the cpuset queue named my_set.

            char *from_qname = "mpi_set";
            char *to_qname = "my_set";
            int64_t id = 1534;

            /* move from mpi_set to my_set,

             */
            if (!cpusetMoveMigrate(from_qname, to_qname,
                                        CPUSET_PID, id)) {
                perror("cpusetMoveMigrate");
                exit(1);
            }


NOTES

       cpusetMoveMigrate  is found in the library "libcpuset.so",
       and will be loaded if the option  --llccppuusseett  is  used  with
       cc(1) or ld(1).


RESTRICTIONS

       Not  all  of  the above capabilities are implemented.  See
       the RESTRICTIONS secion  in  manual  entry  cpuset(4)  for
       details.


SEE ALSO

       cpuset(1), cpusetCreate(3x), cpusetMove(3x), cpuset(5).


DIAGNOSTICS

       If  successful, cpusetMoveMigrate returns a 1.  If cpuset­
       MoveMigrate fails, it returns the value 0 and errno is set
       to indicate the error.  With any error, an attempt is made
       to move the processes back to their originating cpuset.


Man(1) output converted with man2html