- Implement all the state switching stuff needed for efficient fpu mode
[libfirm] / ir / adt / pset.h
index 6e06bde..4ffc69b 100644 (file)
@@ -30,7 +30,7 @@ int pset_default_ptr_cmp(const void *x, const void *y);
  * The abstract type of a pset (Set of pointers).
  *
  * This kind of sets stores only pointer to elements, the elements itself
- * must be stored somewere else.
+ * must be stored somewhere else.
  *
  * @see set
  */
@@ -149,6 +149,7 @@ pset_entry *pset_hinsert (pset *pset, const void *key, unsigned hash);
  *
  * @remark
  *    The current implementation did not allow to remove non-existing elements.
+ *    @@@ so, does it do now?
  *    Further, it is allowed to remove elements during an iteration
  *    including the current one.
  */
@@ -182,6 +183,14 @@ void *pset_next (pset *pset);
  */
 void pset_break (pset *pset);
 
+/**
+ * Iterates oven an pset.
+ *
+ * @param pset   the pset
+ * @param entry  the iterator
+ */
+#define foreach_pset(pset, entry) for (entry = pset_first(pset); entry; entry = pset_next(pset))
+
 /**
  * Inserts all elements of the pointer set src into
  * the set target (union).