diff options
author | Eric Van Hensbergen <ericvh@ericvh-desktop.(none)> | 2008-03-05 08:08:09 -0500 |
---|---|---|
committer | Eric Van Hensbergen <ericvh@opteron.9grid.us> | 2008-05-14 20:23:25 -0400 |
commit | ee443996a35c1e04f210cafd43d5a98d41e46085 (patch) | |
tree | 58ee72b69a02d9dbb3a98e402a4561baba0eb9a8 /net/9p/util.c | |
parent | b32a09db4fb9a87246ba4e7726a979ac4709ad97 (diff) |
9p: Documentation updates
The kernel-doc comments of much of the 9p system have been in disarray since
reorganization. This patch fixes those problems, adds additional documentation
and a template book which collects the 9p information.
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'net/9p/util.c')
-rw-r--r-- | net/9p/util.c | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/net/9p/util.c b/net/9p/util.c index ef7215565d88..4d5646045330 100644 --- a/net/9p/util.c +++ b/net/9p/util.c | |||
@@ -32,11 +32,23 @@ | |||
32 | #include <linux/idr.h> | 32 | #include <linux/idr.h> |
33 | #include <net/9p/9p.h> | 33 | #include <net/9p/9p.h> |
34 | 34 | ||
35 | /** | ||
36 | * struct p9_idpool - per-connection accounting for tag idpool | ||
37 | * @lock: protects the pool | ||
38 | * @pool: idr to allocate tag id from | ||
39 | * | ||
40 | */ | ||
41 | |||
35 | struct p9_idpool { | 42 | struct p9_idpool { |
36 | spinlock_t lock; | 43 | spinlock_t lock; |
37 | struct idr pool; | 44 | struct idr pool; |
38 | }; | 45 | }; |
39 | 46 | ||
47 | /** | ||
48 | * p9_idpool_create - create a new per-connection id pool | ||
49 | * | ||
50 | */ | ||
51 | |||
40 | struct p9_idpool *p9_idpool_create(void) | 52 | struct p9_idpool *p9_idpool_create(void) |
41 | { | 53 | { |
42 | struct p9_idpool *p; | 54 | struct p9_idpool *p; |
@@ -52,6 +64,11 @@ struct p9_idpool *p9_idpool_create(void) | |||
52 | } | 64 | } |
53 | EXPORT_SYMBOL(p9_idpool_create); | 65 | EXPORT_SYMBOL(p9_idpool_create); |
54 | 66 | ||
67 | /** | ||
68 | * p9_idpool_destroy - create a new per-connection id pool | ||
69 | * @p: idpool to destory | ||
70 | */ | ||
71 | |||
55 | void p9_idpool_destroy(struct p9_idpool *p) | 72 | void p9_idpool_destroy(struct p9_idpool *p) |
56 | { | 73 | { |
57 | idr_destroy(&p->pool); | 74 | idr_destroy(&p->pool); |
@@ -61,9 +78,9 @@ EXPORT_SYMBOL(p9_idpool_destroy); | |||
61 | 78 | ||
62 | /** | 79 | /** |
63 | * p9_idpool_get - allocate numeric id from pool | 80 | * p9_idpool_get - allocate numeric id from pool |
64 | * @p - pool to allocate from | 81 | * @p: pool to allocate from |
65 | * | 82 | * |
66 | * XXX - This seems to be an awful generic function, should it be in idr.c with | 83 | * Bugs: This seems to be an awful generic function, should it be in idr.c with |
67 | * the lock included in struct idr? | 84 | * the lock included in struct idr? |
68 | */ | 85 | */ |
69 | 86 | ||
@@ -94,9 +111,10 @@ EXPORT_SYMBOL(p9_idpool_get); | |||
94 | 111 | ||
95 | /** | 112 | /** |
96 | * p9_idpool_put - release numeric id from pool | 113 | * p9_idpool_put - release numeric id from pool |
97 | * @p - pool to allocate from | 114 | * @id: numeric id which is being released |
115 | * @p: pool to release id into | ||
98 | * | 116 | * |
99 | * XXX - This seems to be an awful generic function, should it be in idr.c with | 117 | * Bugs: This seems to be an awful generic function, should it be in idr.c with |
100 | * the lock included in struct idr? | 118 | * the lock included in struct idr? |
101 | */ | 119 | */ |
102 | 120 | ||
@@ -111,11 +129,13 @@ EXPORT_SYMBOL(p9_idpool_put); | |||
111 | 129 | ||
112 | /** | 130 | /** |
113 | * p9_idpool_check - check if the specified id is available | 131 | * p9_idpool_check - check if the specified id is available |
114 | * @id - id to check | 132 | * @id: id to check |
115 | * @p - pool | 133 | * @p: pool to check |
116 | */ | 134 | */ |
135 | |||
117 | int p9_idpool_check(int id, struct p9_idpool *p) | 136 | int p9_idpool_check(int id, struct p9_idpool *p) |
118 | { | 137 | { |
119 | return idr_find(&p->pool, id) != NULL; | 138 | return idr_find(&p->pool, id) != NULL; |
120 | } | 139 | } |
121 | EXPORT_SYMBOL(p9_idpool_check); | 140 | EXPORT_SYMBOL(p9_idpool_check); |
141 | |||