cpusetMove  -  move  processes  associated  with  an ID to
       another cpuset


SYNOPSIS

       #include <cpuset.h>

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


DESCRIPTION

       The cpusetMove function is used to temporarily  move  pro­
       cesses  associated  with  an ID, identified by iidd from one
       cpuset to another.  This function does not move the memory
       associated  with  the  processes.  This function should be
       used in conjuction with ccppuusseettMMoovveeMMiiggrraattee.

       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 move 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 privileges.


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;

             * if error - print error & exit
             */
            if (!cpusetMove(from_qname, to_qname, CPUSET_PID,
                                            id)) {
                perror("cpusetMove");
                exit(1);
            }


NOTES

       cpusetMove  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),    cpusetMoveMigrate(3x),
       cpuset(5).


DIAGNOSTICS

       If successful, cpusetMove  returns  a  1.   If  cpusetMove
       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