aboutsummaryrefslogtreecommitdiff
path: root/sys/compat
diff options
context:
space:
mode:
authorBryan Drewery <bdrewery@FreeBSD.org>2014-03-22 10:26:09 +0000
committerBryan Drewery <bdrewery@FreeBSD.org>2014-03-22 10:26:09 +0000
commit44f1c916109d4d88941d257b7c4c96c26ab55477 (patch)
tree9a9561ab626d2c7b17fbd98a498de2fac743ab08 /sys/compat
parent856c73664bf3a16293fd3acf80e85eba1fdba278 (diff)
downloadsrc-44f1c916109d4d88941d257b7c4c96c26ab55477.tar.gz
src-44f1c916109d4d88941d257b7c4c96c26ab55477.zip
Rename global cnt to vm_cnt to avoid shadowing.
To reduce the diff struct pcu.cnt field was not renamed, so PCPU_OP(cnt.field) is still used. pc_cnt and pcpu are also used in kvm(3) and vmstat(8). The goal was to not affect externally used KPI. Bump __FreeBSD_version_ in case some out-of-tree module/code relies on the the global cnt variable. Exp-run revealed no ports using it directly. No objection from: arch@ Sponsored by: EMC / Isilon Storage Division
Notes
Notes: svn path=/head/; revision=263620
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/linprocfs/linprocfs.c18
-rw-r--r--sys/compat/linux/linux_misc.c2
-rw-r--r--sys/compat/svr4/svr4_misc.c4
3 files changed, 12 insertions, 12 deletions
diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c
index cb0f3b985eac..426047e41e83 100644
--- a/sys/compat/linprocfs/linprocfs.c
+++ b/sys/compat/linprocfs/linprocfs.c
@@ -159,14 +159,14 @@ linprocfs_domeminfo(PFS_FILL_ARGS)
/*
* The correct thing here would be:
*
- memfree = cnt.v_free_count * PAGE_SIZE;
+ memfree = vm_cnt.v_free_count * PAGE_SIZE;
memused = memtotal - memfree;
*
* but it might mislead linux binaries into thinking there
* is very little memory left, so we cheat and tell them that
* all memory that isn't wired down is free.
*/
- memused = cnt.v_wire_count * PAGE_SIZE;
+ memused = vm_cnt.v_wire_count * PAGE_SIZE;
memfree = memtotal - memused;
swap_pager_status(&i, &j);
swaptotal = (unsigned long long)i * PAGE_SIZE;
@@ -188,7 +188,7 @@ linprocfs_domeminfo(PFS_FILL_ARGS)
* like unstaticizing it just for linprocfs's sake.
*/
buffers = 0;
- cached = cnt.v_cache_count * PAGE_SIZE;
+ cached = vm_cnt.v_cache_count * PAGE_SIZE;
sbuf_printf(sb,
" total: used: free: shared: buffers: cached:\n"
@@ -486,12 +486,12 @@ linprocfs_dostat(PFS_FILL_ARGS)
"intr %u\n"
"ctxt %u\n"
"btime %lld\n",
- cnt.v_vnodepgsin,
- cnt.v_vnodepgsout,
- cnt.v_swappgsin,
- cnt.v_swappgsout,
- cnt.v_intr,
- cnt.v_swtch,
+ vm_cnt.v_vnodepgsin,
+ vm_cnt.v_vnodepgsout,
+ vm_cnt.v_swappgsin,
+ vm_cnt.v_swappgsout,
+ vm_cnt.v_intr,
+ vm_cnt.v_swtch,
(long long)boottime.tv_sec);
return (0);
}
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c
index 01073f45ff4d..ff5e8a25a487 100644
--- a/sys/compat/linux/linux_misc.c
+++ b/sys/compat/linux/linux_misc.c
@@ -148,7 +148,7 @@ linux_sysinfo(struct thread *td, struct linux_sysinfo_args *args)
LINUX_SYSINFO_LOADS_SCALE / averunnable.fscale;
sysinfo.totalram = physmem * PAGE_SIZE;
- sysinfo.freeram = sysinfo.totalram - cnt.v_wire_count * PAGE_SIZE;
+ sysinfo.freeram = sysinfo.totalram - vm_cnt.v_wire_count * PAGE_SIZE;
sysinfo.sharedram = 0;
mtx_lock(&vm_object_list_mtx);
diff --git a/sys/compat/svr4/svr4_misc.c b/sys/compat/svr4/svr4_misc.c
index 4005ce45bf1d..0db5453165f3 100644
--- a/sys/compat/svr4/svr4_misc.c
+++ b/sys/compat/svr4/svr4_misc.c
@@ -773,14 +773,14 @@ svr4_sys_sysconfig(td, uap)
#if defined(UVM)
*retval = uvmexp.free; /* XXX: free instead of total */
#else
- *retval = cnt.v_free_count; /* XXX: free instead of total */
+ *retval = vm_cnt.v_free_count; /* XXX: free instead of total */
#endif
break;
case SVR4_CONFIG_AVPHYS_PAGES:
#if defined(UVM)
*retval = uvmexp.active; /* XXX: active instead of avg */
#else
- *retval = cnt.v_active_count; /* XXX: active instead of avg */
+ *retval = vm_cnt.v_active_count;/* XXX: active instead of avg */
#endif
break;
#endif /* NOTYET */