diff options
| author | Ingo Molnar <mingo@kernel.org> | 2013-01-24 06:47:48 -0500 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2013-01-24 06:47:48 -0500 |
| commit | befddb21c845f8fb49e637997891ef97c6a869dc (patch) | |
| tree | 0e7629123184f2dd50291ad6d477b894175f0f26 /include/linux/idr.h | |
| parent | e716efde75267eab919cdb2bef5b2cb77f305326 (diff) | |
| parent | 7d1f9aeff1ee4a20b1aeb377dd0f579fe9647619 (diff) | |
Merge tag 'v3.8-rc4' into irq/core
Merge Linux 3.8-rc4 before pulling in new commits - we were on an old v3.7 base.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/idr.h')
| -rw-r--r-- | include/linux/idr.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/idr.h b/include/linux/idr.h index 87259a44c251..de7e190f1af4 100644 --- a/include/linux/idr.h +++ b/include/linux/idr.h | |||
| @@ -152,4 +152,15 @@ void ida_simple_remove(struct ida *ida, unsigned int id); | |||
| 152 | 152 | ||
| 153 | void __init idr_init_cache(void); | 153 | void __init idr_init_cache(void); |
| 154 | 154 | ||
| 155 | /** | ||
| 156 | * idr_for_each_entry - iterate over an idr's elements of a given type | ||
| 157 | * @idp: idr handle | ||
| 158 | * @entry: the type * to use as cursor | ||
| 159 | * @id: id entry's key | ||
| 160 | */ | ||
| 161 | #define idr_for_each_entry(idp, entry, id) \ | ||
| 162 | for (id = 0, entry = (typeof(entry))idr_get_next((idp), &(id)); \ | ||
| 163 | entry != NULL; \ | ||
| 164 | ++id, entry = (typeof(entry))idr_get_next((idp), &(id))) | ||
| 165 | |||
| 155 | #endif /* __IDR_H__ */ | 166 | #endif /* __IDR_H__ */ |
