Date: Wed, 16 Mar 2016 13:34:48 -0700 From: Gleb Smirnoff <glebius@FreeBSD.org> To: Hans Petter Selasky <hselasky@FreeBSD.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r296933 - in head: share/man/man9 sys/sys Message-ID: <20160316203448.GN1328@FreeBSD.org> In-Reply-To: <20160316203241.GM1328@FreeBSD.org> References: <201603160837.u2G8bqgr087126@repo.freebsd.org> <20160316203241.GM1328@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Mar 16, 2016 at 01:32:41PM -0700, Gleb Smirnoff wrote: T> H> +.Sh EXAMPLES T> H> +The following example creates a static counter array exported to T> H> +userspace through a sysctl: T> H> +.Bd -literal -offset indent T> H> +#define MY_SIZE 8 T> H> +static counter_u64_t array[MY_SIZE]; T> H> +SYSCTL_COUNTER_U64_ARRAY(_debug, OID_AUTO, counter_array, CTLFLAG_RW, T> H> + &array[0], MY_SIZE, "Test counter array"); T> T> I always wondered what is stylistically better: array or &array[0]? I T> usually prefer the former. And now your assertion forces to do the latter. -- Totus tuus, Glebius.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160316203448.GN1328>