Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 345724
b: refs/heads/master
c: 9749f30
h: refs/heads/master
v: v3
  • Loading branch information
Philipp Reisner committed Aug 29, 2011
1 parent ceddba5 commit d6aea6e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6618bf16384463c0b97a5f5f1f0ce5276f5865fd
refs/heads/master: 9749f30f1a387070e6e8351f35aeb829eacc3ab6
11 changes: 11 additions & 0 deletions trunk/include/linux/idr.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,4 +152,15 @@ void ida_simple_remove(struct ida *ida, unsigned int id);

void __init idr_init_cache(void);

/**
* idr_for_each_entry - iterate over an idr's elements of a given type
* @idp: idr handle
* @entry: the type * to use as cursor
* @id: id entry's key
*/
#define idr_for_each_entry(idp, entry, id) \
for (id = 0, entry = (typeof(entry))idr_get_next((idp), &(id)); \
entry != NULL; \
++id, entry = (typeof(entry))idr_get_next((idp), &(id)))

#endif /* __IDR_H__ */

0 comments on commit d6aea6e

Please sign in to comment.