220 38127 <0e5ce74c-3e9e-4cf2-4afd-f7333ed82c5d@gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Andrey Semashev <andrey.semashev@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: memcpy/memset/etc overloads for volatile memory
Date: Fri, 18 May 2018 23:46:33 +0300
Lines: 29
Approved: news@gmane.org
Message-ID: <0e5ce74c-3e9e-4cf2-4afd-f7333ed82c5d@gmail.com>
References: <CAFdMc-0NAvWrkwzpgEKq4DQj=0vL_0F2s17XyR9MSUNJk5R0sw@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"; format=flowed
X-Trace: blaine.gmane.org 1526676270 2275 195.159.176.226 (18 May 2018 20:44:30 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Fri, 18 May 2018 20:44:30 +0000 (UTC)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
 Thunderbird/52.7.0
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCXY5TXHWYJRBLHX7TLQKGQEEMVC4IA@isocpp.org Fri May 18 22:44:26 2018
Return-path: <std-proposals+bncBCXY5TXHWYJRBLHX7TLQKGQEEMVC4IA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-lf0-f71.google.com ([209.85.215.71])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCXY5TXHWYJRBLHX7TLQKGQEEMVC4IA@isocpp.org>)
	id 1fJmEj-0000Wf-E3
	for gclcip-std-proposals@m.gmane.org; Fri, 18 May 2018 22:44:25 +0200
Original-Received: by mail-lf0-f71.google.com with SMTP id u13-v6sf3613608lff.0
        for <gclcip-std-proposals@m.gmane.org>; Fri, 18 May 2018 13:46:37 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1526676396; cv=pass;
        d=google.com; s=arc-20160816;
        b=bmVvIOWK4ZArS9KinrNIE957apFLBatc8mfMI0Rp6TCvob5vgQX3lROGs9BPQQP5dW
         JxZ6ApWWhBJ5Ds5K/3xFPqEw+FT7XkYA10a422OxnkDmIZlFM1map4JVJdH56h6+dYSJ
         7X9SORcu/8LiZQrMDTw5uoVeaQEGQIcYNUm+mmwsZOX/C8XbxYrWaYZD2wufLMl4hJIP
         t6ZLEYEuw+CR7R7WFC1UOpHHYvabWL9BNOja9lHfwJWlWgJdtiPHXXQDZCEWDx1mlsfx
         ZMH4T9GtXXnFRYJroN2OmbY/gKu/JW9/t+kRc4UnLkfla6UP7B9MkkYmFXmBNRM3SzNn
         HXBg==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:reply-to:content-language
         :in-reply-to:mime-version:user-agent:date:message-id:from:references
         :to:subject:arc-authentication-results:arc-message-signature
         :dkim-signature:arc-authentication-results;
        bh=O2pG/6rWbn+t4akQsAQO3SsjHpjr01Tc/ycmDWdLANc=;
        b=B0qC4hsevQ/mmBQ2MwWc087OWuLNRj4s8kxDoHFJR+61ySrkGTEj7+qrncFActRiqA
         yScs5Os9nqQ/oGxkYip9dhYnV2qi6RkEu5SMaAbdKSqpkJwFAPabaRK6eTrnDaU2Bmtt
         KziJDQQY3Hw3iCYKDdrraKDS6KeT+rStS8QECj6Rmg11/XlLU6rEQudI22fd7KdN4U5+
         kQtKDCOK0mAGFc79LkCX2WU9dmSy+ZraucancGs0dXeUCCYpFj5/k53YZVgOAlv0An9F
         vid8QklhLI8Q0U3p9qSWl+tkKDHYDTTfTT6Lj/4nobRV28iEEOVwS040Sr+SPl4tYWtu
         naJQ==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=KA8iVmVI;
       spf=pass (google.com: domain of andrey.semashev@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=andrey.semashev@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=subject:to:references:from:message-id:date:user-agent:mime-version
         :in-reply-to:content-language:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe;
        bh=O2pG/6rWbn+t4akQsAQO3SsjHpjr01Tc/ycmDWdLANc=;
        b=YMkFdvyCw1LwNfoWBjgYyLSd+FQ3Qk9lVOdIV81WIOTLEByBFH6kUgntsJLKtz3sqX
         Z71dBYiNdnoC32Fm/OP0lQ2lqyo0EaEGcGijbSUbr3gRoDG7ax59AkN+zHuTbfSDixr4
         n86bCkOR2cvMMNr21MFYSQJFmeFNOAoA36+KGD2Nc1GQUowld9s6G4si//qXfC0gZD5B
         UJ3GpIeS9nmrfipajBJO4MRvnXEeZa2Wh9DOmXvhfzFsdSLOkRWXv2XOb3J+SZx1D9AI
         /syXPhPJKACaEjmLEq2r1+l+9cAcV7/L54yYf/Ejbg7a61z3KjxfTipWtqKZghs4Gbje
         vhKA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:subject:to:references:from:message-id:date
         :user-agent:mime-version:in-reply-to:content-language
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post
         :list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=O2pG/6rWbn+t4akQsAQO3SsjHpjr01Tc/ycmDWdLANc=;
        b=tneXrZdBdp7iDHAOk3mixGtvLEAGr0mOEp1A7o8Gp1wow+TmzyDYMk4aIZZ9evvH+4
         3duMT2SvchEpScQDBI7OS29purE6fzCT4rTAElLtx1XsST0Fme6WLCSrKAbUcwfP+Rwa
         RV36yQn5TdVfsfGQnSKa/KvFyFUH4sW6Sr/Y/xWxxJiTtiy/esyZlY2jLM6I1u9uf7R3
         IdG23o/GCVi3bWkZPETHlalSmfeXer6C38SM4nuz/CU2T7BT2YMgzCs552NBEuLkgo/A
         d22mQkZizplfqI/CGZB9cJ9o7k5Mwd2YgIA13vnFJb1Hnmxqzvey++sULU5rfSWRgIXU
         R 
X-Gm-Message-State: ALKqPweWcahnrCNgSv//mK6xHolENdrXqAigzrJXAYq86YZ7iEC4Aocu
	L77XI2t1YDr30Majn8qkPFLzEQ==
X-Google-Smtp-Source: AB8JxZrApgMk0Ncnq+hGoG89hZ8vG+MS3M5j4+4zmApVtJv5JHGHt6X4jxi0b8pfjwiBS8P3xeF4DQ==
X-Received: by 2002:a2e:3e05:: with SMTP id l5-v6mr663395lja.33.1526676396803;
        Fri, 18 May 2018 13:46:36 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 2002:a2e:2a03:: with SMTP id q3-v6ls1067525ljq.9.gmail; Fri, 18
 May 2018 13:46:35 -0700 (PDT)
X-Received: by 2002:a2e:330c:: with SMTP id d12-v6mr6947487ljc.8.1526676395452;
        Fri, 18 May 2018 13:46:35 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1526676395; cv=none;
        d=google.com; s=arc-20160816;
        b=bgZlOPBgpsfkRGvXDThbnIA1K2RRZeKDJvCG77MQgHfX8hB4DZi0L2fyZhkyuQ3dT4
         GihnC+kDYYQ0dptrRW9yItiirvb6W2UC1bX9AuGrqED/VSazM/9tdXUgBzLVvSUUL+QM
         MZQ34qioeW9yXsMVNF3uKTKQn2L/JF/NQzvGpGpfQeUA69raiMrmJcLkACd50bIKghfN
         ef0/ClNa81MxWPcJZBPHTgj4oNrn40YJ3R+UeZ0Bo6YLYTjhsZpv/xQXsemtvV+MqrS1
         LXTHEWUVQu5tysdDkdfELjifQNW/JttV3al6/D/psF/CIcTaiOofZMSdjIjl0C3GGy1s
         Px+w==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=content-transfer-encoding:content-language:in-reply-to:mime-version
         :user-agent:date:message-id:from:references:to:subject
         :dkim-signature:arc-authentication-results;
        bh=kB0+WnMnDyqM7sDqjxrsFdRzvJ03zGgleU07vypjp5s=;
        b=Rqrv2dP1VBu5lENgwQq6MgPcCw4AdUjiylCjlCnvuFtPaAdnfc8WLE5wgualifEXBL
         IruvaxDvpzlYiFOjgYp5vRw4gFlaHsdykSRL/QOFPxVBJrUxqTKT0pwPLPz/Du9YmvKy
         98SCoZypVnh78lDx+3T7TsxfoPIr6A9Wi4HhVGxVWn85vbkNNLGoDIZTe+W9Vwa3DmXt
         kCkolrdg3+8VawVq+1CNUBJ0llKLD3Q0kxFymZw4JVbn7jlZqEjJsyIEJQGxkaZWh+cZ
         YE1duNf4WXuRpEWBe/0ZP/kYE0u4BM7SRnBpEMZkRuO4fBLNTQjbxC9FHq6bDzyM2l2s
         EH+Q==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=KA8iVmVI;
       spf=pass (google.com: domain of andrey.semashev@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=andrey.semashev@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
Original-Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41])
        by mx.google.com with SMTPS id 24-v6sor2102562ljq.36.2018.05.18.13.46.35
        for <std-proposals@isocpp.org>
        (Google Transport Security);
        Fri, 18 May 2018 13:46:35 -0700 (PDT)
Received-SPF: pass (google.com: domain of andrey.semashev@gmail.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41;
X-Received: by 2002:a2e:8150:: with SMTP id t16-v6mr6574583ljg.32.1526676394810;
        Fri, 18 May 2018 13:46:34 -0700 (PDT)
Original-Received: from [192.168.1.2] (broadband-109-173-28-102.ip.moscow.rt.ru. [109.173.28.102])
        by smtp.googlemail.com with ESMTPSA id l124-v6sm2043522lfg.62.2018.05.18.13.46.33
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Fri, 18 May 2018 13:46:34 -0700 (PDT)
In-Reply-To: <CAFdMc-0NAvWrkwzpgEKq4DQj=0vL_0F2s17XyR9MSUNJk5R0sw@mail.gmail.com>
Content-Language: en-US
X-Original-Sender: andrey.semashev@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com header.s=20161025 header.b=KA8iVmVI;       spf=pass
 (google.com: domain of andrey.semashev@gmail.com designates 209.85.220.41 as
 permitted sender) smtp.mailfrom=andrey.semashev@gmail.com;       dmarc=pass
 (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Spam-Checked-In-Group: std-proposals@isocpp.org
X-Google-Group-Id: 399137483710
List-Post: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:38127
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/38127>

On 05/18/18 23:41, dgutson . wrote:
> This might be interesting.
> 
> In some systems, the implementation of memcpy() & friends cannot be used 
> for memory-mapped devices.
> Usually, mapped memory is marked as volatile.
> 
> I'm proposing to add volatile pointers overloads for the memcpy() 
> function and friends, without specifying exactly what should be 
> different at the standard-level, but allowing implementations to provide 
> a particular behavior. I'm just proposing to add the declaration to the 
> standard.
> 
> Particularly, in some x86-based systems, reading things like the SPI 
> should be done on byte-per-byte basis (rather than streamed with any 
> SIMD instruction).
> 
> I'm not sure what the wording should exactly say, but I'm just 
> initiating the discussion.

If it's not specified then the exact behavior wrt. memory accesses is 
not going to be portable, which means it's not going to be useful.

-- 
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/0e5ce74c-3e9e-4cf2-4afd-f7333ed82c5d%40gmail.com.

.
