diff options
author | glebius <glebius@FreeBSD.org> | 2014-02-12 09:41:17 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2014-02-12 09:41:17 +0000 |
commit | 25d59f119cec731ecb10ac4b7e740e2e637dba07 (patch) | |
tree | 282fd1cd7a9ab11e8df9e22201bdbe3c7f5bb694 /lib | |
parent | cdbc178e948cfadd22ea560e986c7564f56e2501 (diff) | |
download | FreeBSD-src-25d59f119cec731ecb10ac4b7e740e2e637dba07.zip FreeBSD-src-25d59f119cec731ecb10ac4b7e740e2e637dba07.tar.gz |
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().
Sponsored by: Nginx, Inc.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libkvm/kvm.h | 2 | ||||
-rw-r--r-- | lib/libkvm/kvm_getpcpu.3 | 2 | ||||
-rw-r--r-- | lib/libkvm/kvm_pcpu.c | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/lib/libkvm/kvm.h b/lib/libkvm/kvm.h index d2ee8fa..b99a5ef 100644 --- a/lib/libkvm/kvm.h +++ b/lib/libkvm/kvm.h @@ -88,7 +88,7 @@ kvm_t *kvm_open kvm_t *kvm_openfiles (const char *, const char *, const char *, int, char *); ssize_t kvm_read(kvm_t *, unsigned long, void *, size_t); -ssize_t kvm_read_zpcpu(kvm_t *, void *, u_long, size_t, int); +ssize_t kvm_read_zpcpu(kvm_t *, unsigned long, void *, size_t, int); ssize_t kvm_write(kvm_t *, unsigned long, const void *, size_t); __END_DECLS diff --git a/lib/libkvm/kvm_getpcpu.3 b/lib/libkvm/kvm_getpcpu.3 index 4087f1c..d1eb9b1 100644 --- a/lib/libkvm/kvm_getpcpu.3 +++ b/lib/libkvm/kvm_getpcpu.3 @@ -50,7 +50,7 @@ .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 diff --git a/lib/libkvm/kvm_pcpu.c b/lib/libkvm/kvm_pcpu.c index 2d7fb41..ff7c119 100644 --- a/lib/libkvm/kvm_pcpu.c +++ b/lib/libkvm/kvm_pcpu.c @@ -306,7 +306,7 @@ kvm_dpcpu_setcpu(kvm_t *kd, u_int cpu) * Obtain a per-CPU copy for given cpu from UMA_ZONE_PCPU allocation. */ ssize_t -kvm_read_zpcpu(kvm_t *kd, void *buf, u_long base, size_t size, int cpu) +kvm_read_zpcpu(kvm_t *kd, u_long base, void *buf, size_t size, int cpu) { return (kvm_read(kd, (uintptr_t)(base + sizeof(struct pcpu) * cpu), @@ -327,7 +327,7 @@ kvm_counter_u64_fetch(kvm_t *kd, u_long base) r = 0; for (int i = 0; i < mp_ncpus; i++) { - if (kvm_read_zpcpu(kd, &c, base, sizeof(c), i) != sizeof(c)) + if (kvm_read_zpcpu(kd, base, &c, sizeof(c), i) != sizeof(c)) return (0); r += c; } |