kvm_getpcpu.3 (19b5cffe0b8aea1b378d354091d000a5b4f23d9f) | kvm_getpcpu.3 (9292aad4c9f2a604199cc6829f9fd48d1f692e6f) |
---|---|
1.\" Copyright (c) 2008 Yahoo!, Inc. 2.\" All rights reserved. 3.\" Written by: John Baldwin <jhb@FreeBSD.org> 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright --- 14 unchanged lines hidden (view full) --- 23.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27.\" SUCH DAMAGE. 28.\" 29.\" $FreeBSD$ 30.\" | 1.\" Copyright (c) 2008 Yahoo!, Inc. 2.\" All rights reserved. 3.\" Written by: John Baldwin <jhb@FreeBSD.org> 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright --- 14 unchanged lines hidden (view full) --- 23.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27.\" SUCH DAMAGE. 28.\" 29.\" $FreeBSD$ 30.\" |
31.Dd April 11, 2013 | 31.Dd February 12, 2014 |
32.Dt KVM_GETPCPU 3 33.Os 34.Sh NAME 35.Nm kvm_dpcpu_setcpu 36.Nm kvm_getmaxcpu , 37.Nm kvm_getpcpu 38.Nd access per-CPU data 39.Sh LIBRARY 40.Lb libkvm 41.Sh SYNOPSIS 42.In sys/param.h 43.In sys/pcpu.h 44.In sys/sysctl.h 45.In kvm.h 46.Ft int 47.Fn kvm_dpcpu_setcpu "kvm_t *kd" "u_int cpu" 48.Ft int 49.Fn kvm_getmaxcpu "kvm_t *kd" | 32.Dt KVM_GETPCPU 3 33.Os 34.Sh NAME 35.Nm kvm_dpcpu_setcpu 36.Nm kvm_getmaxcpu , 37.Nm kvm_getpcpu 38.Nd access per-CPU data 39.Sh LIBRARY 40.Lb libkvm 41.Sh SYNOPSIS 42.In sys/param.h 43.In sys/pcpu.h 44.In sys/sysctl.h 45.In kvm.h 46.Ft int 47.Fn kvm_dpcpu_setcpu "kvm_t *kd" "u_int cpu" 48.Ft int 49.Fn kvm_getmaxcpu "kvm_t *kd" |
50.Ft int 51.Fn kvm_getncpus "kvm_t *kd" |
|
50.Ft void * 51.Fn kvm_getpcpu "kvm_t *kd" "int cpu" 52.Ft ssize_t 53.Fn kvm_read_zpcpu "kvm_t *kd" "u_long base" "void *buf" "size_t size" "int cpu" 54.Ft uint64_t 55.Fn kvm_counter_u64_fetch "kvm_t *kd" "u_long base" 56.Sh DESCRIPTION 57The --- 10 unchanged lines hidden (view full) --- 68single kernel symbol refers to different data depending on what CPU it is 69accessed from. 70.Pp 71The 72.Fn kvm_getmaxcpu 73function returns the maximum number of CPUs supported by the kernel. 74.Pp 75The | 52.Ft void * 53.Fn kvm_getpcpu "kvm_t *kd" "int cpu" 54.Ft ssize_t 55.Fn kvm_read_zpcpu "kvm_t *kd" "u_long base" "void *buf" "size_t size" "int cpu" 56.Ft uint64_t 57.Fn kvm_counter_u64_fetch "kvm_t *kd" "u_long base" 58.Sh DESCRIPTION 59The --- 10 unchanged lines hidden (view full) --- 70single kernel symbol refers to different data depending on what CPU it is 71accessed from. 72.Pp 73The 74.Fn kvm_getmaxcpu 75function returns the maximum number of CPUs supported by the kernel. 76.Pp 77The |
78.Fn kvm_getncpus 79function returns the current number of CPUs in the kernel. 80.Pp 81The |
|
76.Fn kvm_getpcpu 77function returns a buffer holding the per-CPU data for a single CPU. 78This buffer is described by the 79.Vt "struct pcpu" 80type. 81The caller is responsible for releasing the buffer via a call to 82.Xr free 3 83when it is no longer needed. --- 80 unchanged lines hidden --- | 82.Fn kvm_getpcpu 83function returns a buffer holding the per-CPU data for a single CPU. 84This buffer is described by the 85.Vt "struct pcpu" 86type. 87The caller is responsible for releasing the buffer via a call to 88.Xr free 3 89when it is no longer needed. --- 80 unchanged lines hidden --- |