osf1 man page for cpu_get_current

Query: cpu_get_current

OS: osf1

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

cpu_get_current(3)					     Library Functions Manual						cpu_get_current(3)

NAME
cpu_get_current - Return the caller's current CPU ID (libc library)
SYNOPSIS
#include <cpuset.h> cpuid_t cpu_get_current( void );
PARAMETERS
The cpu_get_current() function has no parameters.
DESCRIPTION
The cpu_get_current() function fetches the ID of the CPU on which the caller is executing.
NOTES
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
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
The cpu_get_current() function returns the CPU ID of the processor where the caller is executing. This function always completes success- fully.
ERRORS
None.
SEE ALSO
Functions: getsysinfo(2), numa_intro(3) Files: numa_types(4) cpu_get_current(3)
Related Man Pages
cpu_get_current(3) - osf1
cpuandset(3) - osf1
cpuisemptyset(3) - osf1
cpufillset(3) - osf1
rad_get_current_home(3) - osf1
Similar Topics in the Unix Linux Community
Number of CPU in LINUX server
Difference between CPU CHIP and CPU ID
Getting CPU usage without any commands
AIX CPU waits
What exactly does Kernel parameters do ?