Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

+11 -8
+11 -8
Documentation/volatile-considered-harmful.txt
··· 22 22 almost certainly a bug in the code somewhere. In properly-written kernel 23 23 code, volatile can only serve to slow things down. 24 24 25 - Consider a typical block of kernel code: 25 + Consider a typical block of kernel code:: 26 26 27 27 spin_lock(&the_lock); 28 28 do_something_on(&shared_data); ··· 57 57 58 58 Another situation where one might be tempted to use volatile is 59 59 when the processor is busy-waiting on the value of a variable. The right 60 - way to perform a busy wait is: 60 + way to perform a busy wait is:: 61 61 62 62 while (my_variable != what_i_want) 63 63 cpu_relax(); ··· 103 103 been properly thought through. 104 104 105 105 106 - NOTES 107 - ----- 106 + References 107 + ========== 108 108 109 109 [1] http://lwn.net/Articles/233481/ 110 + 110 111 [2] http://lwn.net/Articles/233482/ 111 112 112 - CREDITS 113 - ------- 113 + Credits 114 + ======= 114 115 115 116 Original impetus and research by Randy Dunlap 117 + 116 118 Written by Jonathan Corbet 119 + 117 120 Improvements via comments from Satyam Sharma, Johannes Stezenbach, Jesper 118 - Juhl, Heikki Orsila, H. Peter Anvin, Philipp Hahn, and Stefan 119 - Richter. 121 + Juhl, Heikki Orsila, H. Peter Anvin, Philipp Hahn, and Stefan 122 + Richter.