svn commit: r314207 - head/sys/compat/linuxkpi/common/include/linux

Mateusz Guzik mjguzik at gmail.com
Fri Feb 24 15:06:38 UTC 2017


On Fri, Feb 24, 2017 at 02:40:15PM +0000, Hans Petter Selasky wrote:
> Author: hselasky
> Date: Fri Feb 24 14:40:15 2017
> New Revision: 314207
> URL: https://svnweb.freebsd.org/changeset/base/314207
> 
> Log:
>   Implement srcu_dereference() macro in the LinuxKPI.
>   
>   MFC after:		1 week
>   Sponsored by:		Mellanox Technologies
> 
> Modified:
>   head/sys/compat/linuxkpi/common/include/linux/srcu.h
> 
> Modified: head/sys/compat/linuxkpi/common/include/linux/srcu.h
> ==============================================================================
> --- head/sys/compat/linuxkpi/common/include/linux/srcu.h	Fri Feb 24 14:37:55 2017	(r314206)
> +++ head/sys/compat/linuxkpi/common/include/linux/srcu.h	Fri Feb 24 14:40:15 2017	(r314207)
> @@ -34,6 +34,8 @@ struct srcu_struct {
>  	struct ck_epoch_record *ss_epoch_record;
>  };
>  
> +#define	srcu_dereference(ptr,srcu)	((__typeof(*(ptr)) *)(ptr))
> +

Should not this cast to volatile and read through that?

-- 
Mateusz Guzik <mjguzik gmail.com>


More information about the svn-src-head mailing list