xref: /illumos-gate/usr/src/man/man3c/getcpuid.3c (revision bbf21555)
te
Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved.
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
GETCPUID 3C "Apr 16, 2003"
NAME
getcpuid, gethomelgroup - obtain information on scheduling decisions
SYNOPSIS

#include <sys/processor.h>

processorid_t getcpuid(void);

ushort_t gethomelgroup(void);
DESCRIPTION

The getcpuid() function returns the processor ID on which the calling thread is currently executing.

The gethomelgroup() function returns the home locality group ID of the calling thread.

RETURN VALUES

See DESCRIPTION.

ERRORS

No errors are defined.

USAGE

Both the current CPU and the home locality group can change at any time.

ATTRIBUTES

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE ATTRIBUTE VALUE
Interface Stability
getcpuid() is Stable; gethomelgroup() is Obsolete.
MT-Level MT-Safe
SEE ALSO

meminfo (2), p_online (2), processor_bind (2), processor_info (2), pset_assign (2), pset_bind (2), pset_info (2), sysconf (3C), lgrp_home (3LGRP), attributes (7), psradm (8), psrinfo (8), psrset (8)

NOTES

The gethomelgroup() function is obsolete and might be removed in a future release. It has been replaced by lgrp_home(3LGRP).