All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Shi <alex.shi@linux.alibaba.com>
To: linux-kernel@zh-kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, harryxiyou@gmail.com,
	corbet@lwn.net
Cc: Alex Shi <alex.shi@linux.alibaba.com>,
	Bryan Wu <bryan.wu@analog.com>, Li Zefan <lizefan@huawei.com>,
	Shawn Guo <shawn.guo@linaro.org>,
	Fengguang Wu <fengguang.wu@intel.com>, Coly Li <colyli@suse.de>
Subject: [PATCH 14/20] docs/zh_CN: volatile doc format changes
Date: Mon,  4 Mar 2019 11:57:37 +0800	[thread overview]
Message-ID: <20190304035744.155203-15-alex.shi@linux.alibaba.com> (raw)
In-Reply-To: <20190304035744.155203-1-alex.shi@linux.alibaba.com>

make it readble as rst format for html etc doc making.

Signed-off-by: Alex Shi <alex.shi@linux.alibaba.com>
Cc: Harry Wei <harryxiyou@gmail.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Bryan Wu <bryan.wu@analog.com>
Cc: Li Zefan <lizefan@huawei.com>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: Fengguang Wu <fengguang.wu@intel.com>
Cc: Coly Li <colyli@suse.de>
---
 .../process/volatile-considered-harmful.rst   | 35 ++++++++-----------
 1 file changed, 14 insertions(+), 21 deletions(-)

diff --git a/Documentation/translations/zh_CN/process/volatile-considered-harmful.rst b/Documentation/translations/zh_CN/process/volatile-considered-harmful.rst
index 475125967197..48b32ce58ef1 100644
--- a/Documentation/translations/zh_CN/process/volatile-considered-harmful.rst
+++ b/Documentation/translations/zh_CN/process/volatile-considered-harmful.rst
@@ -1,30 +1,23 @@
-Chinese translated version of Documentation/process/volatile-considered-harmful.rst
+.. _cn_volatile_considered_harmful:
 
-If you have any comment or update to the content, please contact the
-original document maintainer directly.  However, if you have a problem
-communicating in English you can also ask the Chinese maintainer for
-help.  Contact the Chinese maintainer if this translation is outdated
-or if there is a problem with the translation.
+.. include:: ../disclaimer-zh_CN.rst
 
-Maintainer: Jonathan Corbet <corbet@lwn.net>
-Chinese maintainer: Bryan Wu <bryan.wu@analog.com>
----------------------------------------------------------------------
-Documentation/process/volatile-considered-harmful.rst 的中文翻译
+:Original: :ref:`Documentation/process/volatile-considered-harmful.rst
+           <volatile_considered_harmful>`
 
 如果想评论或更新本文的内容,请直接联系原文档的维护者。如果你使用英文
 交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻
-译存在问题,请联系中文版维护者。
+译存在问题,请联系中文版维护者::
 
-英文版维护者: Jonathan Corbet <corbet@lwn.net>
-中文版维护者: 伍鹏  Bryan Wu <bryan.wu@analog.com>
-中文版翻译者: 伍鹏  Bryan Wu <bryan.wu@analog.com>
-中文版校译者: 张汉辉  Eugene Teo <eugeneteo@kernel.sg>
-               杨瑞  Dave Young <hidave.darkstar@gmail.com>
-以下为正文
----------------------------------------------------------------------
+        英文版维护者: Jonathan Corbet <corbet@lwn.net>
+        中文版维护者: 伍鹏  Bryan Wu <bryan.wu@analog.com>
+        中文版翻译者: 伍鹏  Bryan Wu <bryan.wu@analog.com>
+        中文版校译者: 张汉辉  Eugene Teo <eugeneteo@kernel.sg>
+                       杨瑞  Dave Young <hidave.darkstar@gmail.com>
+                       时奎亮 Alex Shi <alex.shi@linux.alibaba.com>
 
 为什么不应该使用“volatile”类型
-------------------------------
+==============================
 
 C程序员通常认为volatile表示某个变量可以在当前执行的线程之外被改变;因此,在内核
 中用到共享数据结构时,常常会有C程序员喜欢使用volatile这类变量。换句话说,他们经
@@ -41,7 +34,7 @@ C程序员通常认为volatile表示某个变量可以在当前执行的线程
 必要再使用volatile。如果仍然必须使用volatile,那么几乎可以肯定在代码的某处有一
 个bug。在正确设计的内核代码中,volatile能带来的仅仅是使事情变慢。
 
-思考一下这段典型的内核代码:
+思考一下这段典型的内核代码::
 
     spin_lock(&the_lock);
     do_something_on(&shared_data);
@@ -66,7 +59,7 @@ volatile的存储类型最初是为那些内存映射的I/O寄存器而定义。
 是必需的。
 
 另一种引起用户可能使用volatile的情况是当处理器正忙着等待一个变量的值。正确执行一
-个忙等待的方法是:
+个忙等待的方法是::
 
     while (my_variable != what_i_want)
         cpu_relax();
-- 
2.19.1.856.g8858448bb


  parent reply	other threads:[~2019-03-04  3:59 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-04  3:57 [PATCH 00/20] origanize Chinese kernel docs Alex Shi
2019-03-04  3:57 ` [PATCH 01/20] docs/zh_CN: add disclaimer file Alex Shi
2019-03-04  6:21   ` Alex Shi
     [not found]     ` <CADRPPNSjf4P14bwUMsa10XzBUVLszx4iMsL6gk-XQ0x3vTFr+g@mail.gmail.com>
     [not found]       ` <e342a3fa-20f6-46cd-4240-8403fa1aa736@linux.alibaba.com>
2019-03-04 17:33         ` Leo Li
2019-03-04 23:31           ` Li Yang
2019-03-05  1:44             ` Alex Shi
2019-03-05  4:06               ` Matthew Wilcox
2019-03-05  2:47             ` Alex Shi
2019-03-05  3:55               ` Li Yang
2019-03-05  7:05                 ` Alex Shi
2019-03-04 22:06   ` Li Yang
2019-03-05  1:42     ` Alex Shi
2019-03-05  8:28     ` Federico Vaga
2019-03-04  3:57 ` [PATCH 02/20] docs/zh_CN: move process related docs into process dir Alex Shi
2019-03-04  3:57 ` [PATCH 03/20] docs/zh_CN: change Chinese index to know " Alex Shi
2019-03-04  3:57 ` [PATCH 04/20] docs/zh_CN: add index file into " Alex Shi
2019-03-04  3:57 ` [PATCH 05/20] docs/zh_CN: rename HOWTO into process directory Alex Shi
2019-03-04  3:57 ` [PATCH 06/20] docs/zh_CN: howto format changes Alex Shi
2019-03-04  3:57 ` [PATCH 07/20] docs/zh_CN: rename SubmittingPatches for html links Alex Shi
2019-03-04  3:57 ` [PATCH 08/20] docs/zh_CN: format the submitting-patches doc to rst Alex Shi
2019-03-04  3:57 ` [PATCH 09/20] docs/zh_CN: rename stable_kernel_rules doc Alex Shi
2019-03-04  3:57 ` [PATCH 10/20] docs/zh_CN: rst format change for stable-kernel-rules Alex Shi
2019-03-04  3:57 ` [PATCH 11/20] docs/zh_CN: rename email-clients.txt as email-clients.rst Alex Shi
2019-03-04  3:57 ` [PATCH 12/20] docs/zh_CN: do rst format for email-clients.rst Alex Shi
2019-03-04  3:57 ` [PATCH 13/20] docs/zh_CN: rename volatile-consider-harmful doc Alex Shi
2019-03-04  3:57 ` Alex Shi [this message]
2019-03-04  3:57 ` [PATCH 15/20] docs/zh_CN: rename SubmittingDrivers Alex Shi
2019-03-04  3:57 ` [PATCH 16/20] docs/zh_CN: format submitting drivers as rst Alex Shi
2019-03-04  3:57 ` [PATCH 17/20] docs/zh_CN: rename magic-numbers as rst doc Alex Shi
2019-03-04  3:57 ` [PATCH 18/20] docs/zh_CN: format the magic-number doc as rst Alex Shi
2019-03-04  3:57 ` [PATCH 19/20] docs/zh_CN: rename stable_api_nonsense.txt as stable-api-nonsense.rst Alex Shi
2019-03-04  3:57 ` [PATCH 20/20] docs/zh_CN: format stable-api-nonsense Alex Shi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190304035744.155203-15-alex.shi@linux.alibaba.com \
    --to=alex.shi@linux.alibaba.com \
    --cc=bryan.wu@analog.com \
    --cc=colyli@suse.de \
    --cc=corbet@lwn.net \
    --cc=fengguang.wu@intel.com \
    --cc=harryxiyou@gmail.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kernel@zh-kernel.org \
    --cc=lizefan@huawei.com \
    --cc=shawn.guo@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.