cpusetGetCPULimits(3x)                                  cpusetGetCPULimits(3x)


NAME
     cpusetGetCPULimits - get the CPU count limits for a cpuset

SYNOPSIS
     #include <cpuset.h>

     int cpusetGetCPULimits(char *qname, int *advisory, int *mandatory);

DESCRIPTION
     The cpusetGetCPULimits function is used to obtain the advisory and
     mandatory CPU counts that constrained the conditions under which the
     cpuset could be created.   The advisory CPU count limit will be copied
     into the memory referenced by the advisory argument.  The mandatory CPU
     count limit will be copied into the memory referenced by the mandatory
     argument.

     Only processes running with a user ID or group ID that has read access
     permissions on the permissions file can successfully execute this
     function.  The qname argument is the name of the specified cpuset.

     The return value of the function indicates if the function was
     successfully executed.

EXAMPLES
     This example prints out the advisory and mandatory CPU counts used when
     creating the cpuset mpi_set.

               char             *qname = "mpi_set";
               int              cpuadv = 0;
               int              cpuman = 0;

               /* Get the list of CPUs else print error & exit */
               if (!cpusetGetCPULimits(qname, &cpuadv, &cpuman)) ) {
                   perror("cpusetGetCPULimits");
                   exit(1);
               }
               printf("CPU count, advisory limit: %d\n", cpuadv);
               printf("CPU count, mandatory limit: %d\n", cpuman);


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

SEE ALSO
     cpuset(1), cpusetSetCPULimits(3x), cpuset(5).

DIAGNOSTICS
     If successful, cpusetGetCPULimits returns 1.  If cpusetGetCPULimits
     fails, it returns 0 and errno is set to indicate the error.  The possible
     values for errno include those values as set by sysmp(2) and sbrk(2).


                                                                        Page 1