Date: Thu, 16 Feb 2017 12:20:57 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313807 - head/sys/compat/linuxkpi/common/include/asm Message-ID: <201702161220.v1GCKvbN004717@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Thu Feb 16 12:20:57 2017 New Revision: 313807 URL: https://svnweb.freebsd.org/changeset/base/313807 Log: Allow passing a constant atomic_t to atomic_read(). Obtained from: kmacy @ MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/asm/atomic.h Modified: head/sys/compat/linuxkpi/common/include/asm/atomic.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/asm/atomic.h Thu Feb 16 12:08:52 2017 (r313806) +++ head/sys/compat/linuxkpi/common/include/asm/atomic.h Thu Feb 16 12:20:57 2017 (r313807) @@ -81,9 +81,9 @@ atomic_set_mask(unsigned int mask, atomi } static inline int -atomic_read(atomic_t *v) +atomic_read(const atomic_t *v) { - return atomic_load_acq_int(&v->counter); + return atomic_load_acq_int(&__DECONST(atomic_t *, v)->counter); } static inline int
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201702161220.v1GCKvbN004717>