提交 4764e280 编写于 作者: F Figo.zhang 提交者: Linus Torvalds

Documentation/atomic_ops.txt: fix sample code

list_add() lost a parameter in sample code.
Signed-off-by: NFigo.zhang <figo1802@gmail.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 73d05163
...@@ -229,10 +229,10 @@ kernel. It is the use of atomic counters to implement reference ...@@ -229,10 +229,10 @@ kernel. It is the use of atomic counters to implement reference
counting, and it works such that once the counter falls to zero it can counting, and it works such that once the counter falls to zero it can
be guaranteed that no other entity can be accessing the object: be guaranteed that no other entity can be accessing the object:
static void obj_list_add(struct obj *obj) static void obj_list_add(struct obj *obj, struct list_head *head)
{ {
obj->active = 1; obj->active = 1;
list_add(&obj->list); list_add(&obj->list, head);
} }
static void obj_list_del(struct obj *obj) static void obj_list_del(struct obj *obj)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册