summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@s-opensource.com>2016-09-23 21:33:27 +0200
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-10-24 12:12:35 +0200
commit9c27d77d999491d6c80c570887dc95d32908cae5 (patch)
tree760c2e137ce161bccd6284435c78bb3d52998e74
parentDocumentation/VGA-softcursor.txt: convert to ReST markup (diff)
downloadlinux-9c27d77d999491d6c80c570887dc95d32908cae5.tar.xz
linux-9c27d77d999491d6c80c570887dc95d32908cae5.zip
Documentation/volatile-considered-harmful.txt: convert to ReST markup
- Fix document section markups; - use quote blocks where needed; - adjust spaces and blank lines; - add it to the development-processs book. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
-rw-r--r--Documentation/volatile-considered-harmful.txt19
1 files changed, 11 insertions, 8 deletions
diff --git a/Documentation/volatile-considered-harmful.txt b/Documentation/volatile-considered-harmful.txt
index db0cb228d64a..e0d042af386c 100644
--- a/Documentation/volatile-considered-harmful.txt
+++ b/Documentation/volatile-considered-harmful.txt
@@ -22,7 +22,7 @@ need to use volatile as well. If volatile is still necessary, there is
almost certainly a bug in the code somewhere. In properly-written kernel
code, volatile can only serve to slow things down.
-Consider a typical block of kernel code:
+Consider a typical block of kernel code::
spin_lock(&the_lock);
do_something_on(&shared_data);
@@ -57,7 +57,7 @@ optimization, so, once again, volatile is unnecessary.
Another situation where one might be tempted to use volatile is
when the processor is busy-waiting on the value of a variable. The right
-way to perform a busy wait is:
+way to perform a busy wait is::
while (my_variable != what_i_want)
cpu_relax();
@@ -103,17 +103,20 @@ they come with a justification which shows that the concurrency issues have
been properly thought through.
-NOTES
------
+References
+==========
[1] http://lwn.net/Articles/233481/
+
[2] http://lwn.net/Articles/233482/
-CREDITS
--------
+Credits
+=======
Original impetus and research by Randy Dunlap
+
Written by Jonathan Corbet
+
Improvements via comments from Satyam Sharma, Johannes Stezenbach, Jesper
- Juhl, Heikki Orsila, H. Peter Anvin, Philipp Hahn, and Stefan
- Richter.
+Juhl, Heikki Orsila, H. Peter Anvin, Philipp Hahn, and Stefan
+Richter.