aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@SteelEye.com>2005-08-19 09:14:01 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-09-05 19:03:13 -0400
commitd856f1e337782326c638c70c0b4df2b909350dec (patch)
tree15c070e3909cbd260b2616001f0a6dde4a0c24fa /include
parentfef6ec8dd96205fb22e3cfe2e4abd69d89413631 (diff)
[PATCH] klist: fix klist to have the same klist_add semantics as list_head
at the moment, the list_head semantics are list_add(node, head) whereas current klist semantics are klist_add(head, node) This is bound to cause confusion, and since klist is the newcomer, it should follow the list_head semantics. I also added missing include guards to klist.h Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include')
-rw-r--r--include/linux/klist.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/klist.h b/include/linux/klist.h
index eebf5e5696ec..c4d1fae4dd89 100644
--- a/include/linux/klist.h
+++ b/include/linux/klist.h
@@ -9,6 +9,9 @@
9 * This file is rleased under the GPL v2. 9 * This file is rleased under the GPL v2.
10 */ 10 */
11 11
12#ifndef _LINUX_KLIST_H
13#define _LINUX_KLIST_H
14
12#include <linux/spinlock.h> 15#include <linux/spinlock.h>
13#include <linux/completion.h> 16#include <linux/completion.h>
14#include <linux/kref.h> 17#include <linux/kref.h>
@@ -31,8 +34,8 @@ struct klist_node {
31 struct completion n_removed; 34 struct completion n_removed;
32}; 35};
33 36
34extern void klist_add_tail(struct klist * k, struct klist_node * n); 37extern void klist_add_tail(struct klist_node * n, struct klist * k);
35extern void klist_add_head(struct klist * k, struct klist_node * n); 38extern void klist_add_head(struct klist_node * n, struct klist * k);
36 39
37extern void klist_del(struct klist_node * n); 40extern void klist_del(struct klist_node * n);
38extern void klist_remove(struct klist_node * n); 41extern void klist_remove(struct klist_node * n);
@@ -53,3 +56,4 @@ extern void klist_iter_init_node(struct klist * k, struct klist_iter * i,
53extern void klist_iter_exit(struct klist_iter * i); 56extern void klist_iter_exit(struct klist_iter * i);
54extern struct klist_node * klist_next(struct klist_iter * i); 57extern struct klist_node * klist_next(struct klist_iter * i);
55 58
59#endif