svn commit: r261595 - in head: share/man/man9 sys/sys
Gleb Smirnoff
glebius at FreeBSD.org
Fri Feb 7 14:34:32 UTC 2014
Author: glebius
Date: Fri Feb 7 14:34:31 2014
New Revision: 261595
URL: http://svnweb.freebsd.org/changeset/base/261595
Log:
sysctl_handle_counter_u64() doesn't use arg2 argument, thus simplify
the SYSCTL_COUNTER_U64() macro.
Sponsored by: Nginx, Inc.
Modified:
head/share/man/man9/counter.9
head/sys/sys/sysctl.h
Modified: head/share/man/man9/counter.9
==============================================================================
--- head/share/man/man9/counter.9 Fri Feb 7 14:31:51 2014 (r261594)
+++ head/share/man/man9/counter.9 Fri Feb 7 14:34:31 2014 (r261595)
@@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd April 3, 2013
+.Dd February 7, 2014
.Dt COUNTER 9
.Os
.Sh NAME
@@ -52,7 +52,7 @@
.Ft void
.Fn counter_u64_zero "counter_u64_t c"
.In sys/sysctl.h
-.Fn SYSCTL_COUNTER_U64 parent nbr name access ptr val descr
+.Fn SYSCTL_COUNTER_U64 parent nbr name access ptr descr
.Fn SYSCTL_ADD_COUNTER_U64 ctx parent nbr name access ptr descr
.Sh DESCRIPTION
.Nm
@@ -126,7 +126,7 @@ value for any moment.
Clear the counter
.Fa c
and set it to zero.
-.It Fn SYSCTL_COUNTER_U64 parent nbr name access ptr val descr
+.It Fn SYSCTL_COUNTER_U64 parent nbr name access ptr descr
Declare a static
.Xr sysctl
oid that would represent a
Modified: head/sys/sys/sysctl.h
==============================================================================
--- head/sys/sys/sysctl.h Fri Feb 7 14:31:51 2014 (r261594)
+++ head/sys/sys/sysctl.h Fri Feb 7 14:34:31 2014 (r261595)
@@ -393,11 +393,11 @@ SYSCTL_ALLOWED_TYPES(UINT64, uint64_t *a
sysctl_handle_64, "QU", __DESCR(descr))
/* Oid for a 64-bit unsigned counter(9). The pointer must be non NULL. */
-#define SYSCTL_COUNTER_U64(parent, nbr, name, access, ptr, val, descr) \
+#define SYSCTL_COUNTER_U64(parent, nbr, name, access, ptr, descr) \
SYSCTL_ASSERT_TYPE(UINT64, ptr, parent, name); \
SYSCTL_OID(parent, nbr, name, \
CTLTYPE_U64 | CTLFLAG_MPSAFE | (access), \
- ptr, val, sysctl_handle_counter_u64, "QU", descr)
+ ptr, 0, sysctl_handle_counter_u64, "QU", descr)
#define SYSCTL_ADD_COUNTER_U64(ctx, parent, nbr, name, access, ptr, descr)\
sysctl_add_oid(ctx, parent, nbr, name, \
More information about the svn-src-all
mailing list