summaryrefslogtreecommitdiffstats
path: root/lib/libkvm/kvm_getpcpu.3
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2014-03-04 14:49:05 +0000
committerglebius <glebius@FreeBSD.org>2014-03-04 14:49:05 +0000
commit1b9278cc989bd23a4e620f1b58d624819ca8e1c0 (patch)
treee6cab10d804696e76d834c1b19644b92664d2d09 /lib/libkvm/kvm_getpcpu.3
parent8a9528c4d0ec97d5f0c55b27a51613851b619e04 (diff)
downloadFreeBSD-src-1b9278cc989bd23a4e620f1b58d624819ca8e1c0.zip
FreeBSD-src-1b9278cc989bd23a4e620f1b58d624819ca8e1c0.tar.gz
Merge r261796 from head:
While it isn't too late and kvm_read_zpcpu() function isn't yet used outside libkvm(3), change its order of arguments, so that it is the same as in kvm_read(). Merge r261805 from head: Add kvm_getncpus() to obtain mp_ncpus.
Diffstat (limited to 'lib/libkvm/kvm_getpcpu.3')
-rw-r--r--lib/libkvm/kvm_getpcpu.310
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/libkvm/kvm_getpcpu.3 b/lib/libkvm/kvm_getpcpu.3
index 4087f1c..13192c2 100644
--- a/lib/libkvm/kvm_getpcpu.3
+++ b/lib/libkvm/kvm_getpcpu.3
@@ -28,7 +28,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd April 11, 2013
+.Dd February 12, 2014
.Dt KVM_GETPCPU 3
.Os
.Sh NAME
@@ -47,10 +47,12 @@
.Fn kvm_dpcpu_setcpu "kvm_t *kd" "u_int cpu"
.Ft int
.Fn kvm_getmaxcpu "kvm_t *kd"
+.Ft int
+.Fn kvm_getncpus "kvm_t *kd"
.Ft void *
.Fn kvm_getpcpu "kvm_t *kd" "int cpu"
.Ft ssize_t
-.Fn kvm_read_zpcpu "kvm_t *kd" "void *buf" "u_long base" "size_t size" "int cpu"
+.Fn kvm_read_zpcpu "kvm_t *kd" "u_long base" "void *buf" "size_t size" "int cpu"
.Ft uint64_t
.Fn kvm_counter_u64_fetch "kvm_t *kd" "u_long base"
.Sh DESCRIPTION
@@ -73,6 +75,10 @@ The
function returns the maximum number of CPUs supported by the kernel.
.Pp
The
+.Fn kvm_getncpus
+function returns the current number of CPUs in the kernel.
+.Pp
+The
.Fn kvm_getpcpu
function returns a buffer holding the per-CPU data for a single CPU.
This buffer is described by the
OpenPOWER on IntegriCloud