Date: Wed, 29 Apr 2015 04:08:17 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282210 - head/sys/sys Message-ID: <201504290408.t3T48Ha7027642@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Wed Apr 29 04:08:17 2015 New Revision: 282210 URL: https://svnweb.freebsd.org/changeset/base/282210 Log: Constify some const parameters in seq.h. The NUMA work I'm doing uses const for read-only parameters, which requires the seq.h API to also use const for read-only parameters. Reviewed by: mjg Modified: head/sys/sys/seq.h Modified: head/sys/sys/seq.h ============================================================================== --- head/sys/sys/seq.h Wed Apr 29 02:01:46 2015 (r282209) +++ head/sys/sys/seq.h Wed Apr 29 04:08:17 2015 (r282210) @@ -79,7 +79,7 @@ typedef uint32_t seq_t; * on amd64 but still has unnecessary cost. */ static __inline int -atomic_load_rmb_int(volatile u_int *p) +atomic_load_rmb_int(volatile const u_int *p) { volatile u_int v; @@ -89,7 +89,7 @@ atomic_load_rmb_int(volatile u_int *p) } static __inline int -atomic_rmb_load_int(volatile u_int *p) +atomic_rmb_load_int(volatile const u_int *p) { volatile u_int v = 0; @@ -122,7 +122,7 @@ seq_write_end(seq_t *seqp) } static __inline seq_t -seq_read(seq_t *seqp) +seq_read(const seq_t *seqp) { seq_t ret; @@ -139,7 +139,7 @@ seq_read(seq_t *seqp) } static __inline seq_t -seq_consistent(seq_t *seqp, seq_t oldseq) +seq_consistent(const seq_t *seqp, seq_t oldseq) { return (atomic_rmb_load_int(seqp) == oldseq);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504290408.t3T48Ha7027642>