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

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

cpu_get_current(3)

Contents


NAME    [Toc]    [Back]

       cpu_get_current - Return the caller's current CPU ID (libc
       library)

SYNOPSIS    [Toc]    [Back]

       #include <cpuset.h>

       cpuid_t cpu_get_current(
               void );

PARAMETERS    [Toc]    [Back]

       The cpu_get_current() function has no parameters.

DESCRIPTION    [Toc]    [Back]

       The cpu_get_current() function fetches the ID of  the  CPU
       on which the caller is executing.

NOTES    [Toc]    [Back]

       This function is similar to the following call:

       getsysinfo(GSI_CPU_CURRENT, &cpuid, ...);

       However,  cpu_get_current()  returns  the  CPU  identifier
       directly (as type cpuid_t), whereas the getsysinfo()  call
       stores  the  identifier into a buffer (as type long) whose
       address is passed to the function.

RESTRICTIONS    [Toc]    [Back]

       As is true for many system information queries,  the  data
       returned  by cpu_get_current() may be stale by the time it
       is returned to or used by the caller. In  other  words,  a
       context  switch  to  a  different  CPU can occur after the
       "current CPU" has been fetched by the application.

RETURN VALUES    [Toc]    [Back]

       The cpu_get_current() function returns the CPU ID  of  the
       processor  where  the  caller  is executing. This function
       always completes successfully.

ERRORS    [Toc]    [Back]

       None.

SEE ALSO    [Toc]    [Back]

      
      
       Functions: getsysinfo(2), numa_intro(3)

       Files: numa_types(4)



                                               cpu_get_current(3)
[ Back ]
 Similar pages
Name OS Title
id_foreach Tru64 enumerate members of an ID set (libc library)
cpu_foreach Tru64 enumerate members of a CPU set (libc library)
cpuandset Tru64 Perform operations on CPU sets (libc library)
cpu_get_max Tru64 Query CPU information for the platform (libc library)
cpu_get_num Tru64 Query CPU information for the platform (libc library)
idxorset Tru64 Perform operations on ID sets (libc library)
cpusetdestroy Tru64 Perform operations on CPU sets (libc library)
idsetdestroy Tru64 Perform operations on ID sets (libc library)
idsetcreate Tru64 Perform operations on ID sets (libc library)
idorset Tru64 Perform operations on ID sets (libc library)
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service