提交 4bb6657d 编写于 作者: D Davidlohr Bueso 提交者: Linus Torvalds

ipc,msg: document volatile r_msg

The need for volatile is not obvious, document it.
Signed-off-by: NDavidlohr Bueso <davidlohr@hp.com>
Signed-off-by: NManfred Spraul <manfred@colorfullife.com>
Cc: Aswin Chandramouleeswaran <aswin@hp.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 3440a6bd
......@@ -42,9 +42,7 @@
#include <linux/uaccess.h>
#include "util.h"
/*
* one msg_receiver structure for each sleeping receiver:
*/
/* one msg_receiver structure for each sleeping receiver */
struct msg_receiver {
struct list_head r_list;
struct task_struct *r_tsk;
......@@ -53,6 +51,12 @@ struct msg_receiver {
long r_msgtype;
long r_maxsize;
/*
* Mark r_msg volatile so that the compiler
* does not try to get smart and optimize
* it. We rely on this for the lockless
* receive algorithm.
*/
struct msg_msg *volatile r_msg;
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册