*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> cpu_get_max (3)              
Title
Content
Arch
Section
 

cpu_get_info(3)

Contents


NAME    [Toc]    [Back]

       cpu_get_info,  cpu_get_num, cpu_get_max - Query CPU information
 for the platform (libc library)

SYNOPSIS    [Toc]    [Back]

       #include <cpuset.h>

       int cpu_get_info(
               ncpu_info_t *info ); int cpu_get_num(
               void ); int cpu_get_max(
               void );

PARAMETERS    [Toc]    [Back]

       Points to an ncpu_info_t buffer to receive the CPU  information
 for the booted configuration.

DESCRIPTION    [Toc]    [Back]

       The cpu_get_info() function returns the following information
 about the platform CPU configuration  in  the  buffer
       pointed  to by the info parameter: Revision number.  Maximum
 number of CPUs supported by the machine  architecture.
       CPU processor set that is physically plugged into the system
 and recognized by the system console.  Set  of  online
       CPUs  in  the caller's partition; that is, the set of CPUs
       on which the caller can schedule work.  Set of CPUs in the
       partition  that have processes bound to them.  Set of CPUs
       in the partition whose processor set is marked for  exclusive
 use.

       The  CPU  sets specified in the ncpu_info_t structure must
       have been created by the caller prior to the call.  If the
       caller specifies zero for a CPU set, the function silently
       ignores filling in data for that set.

       The information returned by the cpu_get_info() function is
       relative to the caller's partition.

       The  cpu_get_num()  function  returns the actual number of
       CPUs available in the caller's partition.

       The cpu_get_max() function returns the maximum  number  of
       CPUs, including unpopulated CPU slots, that can be configured
 in the system.

NOTES    [Toc]    [Back]

       A  cpu_get_info()   call   is   similar   to   a   getsysinfo(GSI_CPU_INFO,
  ...)   call.  The principal difference
       is that the  main ncpu_info_t structure fields returned by
       cpu_get_info()  are  of  type  cpuset_t,  whereas the same
       information returned by getsysinfo()is  of  type  ulong_t.
       Furthermore, a getsysinfo(GSI_CPU_INFO, ...)  call returns
       information only about the first n CPUs, where  n  is  the
       number of bits in a ulong_t field, or (sizeof(ulong_t)*8).

       For cpu_get_info(), the ncpu_version  field  of  the  info
       argument  must  be  set  to NCPU_INFO_VERSION prior to the
       call.





RESTRICTIONS    [Toc]    [Back]

       The information returned by these functions is a  snapshot
       of  the  platform/partition  configuration at the time the
       information is sampled.  The data may be stale by the time
       the caller uses the information.

RETURN VALUES    [Toc]    [Back]

       The  cpu_get_info() function returns the following values:
       Success.  Failure. In this case, errno is set to  indicate
       the error.

       The  cpu_get_num() and cpu_get_max() functions return values
 as stated in the DESCRIPTION. These  functions  always
       complete successfully.

ERRORS    [Toc]    [Back]

       The  cpu_get_info()  function fails,  it sets errno to one
       of the following values: The info argument or one  of  the
       cpuset_t  elements,  points to an invalid address.  One or
       more of the cpuset_t elements of the info argument  points
       to  an  invalid CPU set, possibly one that was not created
       by cpusetcreate().  The version number  specified  in  the
       ncpu_version  field of the info argument is not recognized
       by the system.

SEE ALSO    [Toc]    [Back]

      
      
       Functions: cpusetops(3), numa_intro(3)



                                                  cpu_get_info(3)
[ Back ]
 Similar pages
Name OS Title
cpu_foreach Tru64 enumerate members of a CPU set (libc library)
id_foreach Tru64 enumerate members of an ID set (libc library)
idandset Tru64 Perform operations on ID sets (libc library)
cpusetdestroy Tru64 Perform operations on CPU sets (libc library)
iddelset Tru64 Perform operations on ID sets (libc library)
cpusetcreate Tru64 Perform operations on CPU sets (libc library)
idcountset Tru64 Perform operations on ID sets (libc library)
idcopyset Tru64 Perform operations on ID sets (libc library)
cpuxorset Tru64 Perform operations on CPU sets (libc library)
idfillset Tru64 Perform operations on ID sets (libc library)
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service