Remove context from api, to keep it more simple.
[bertos.git] / bertos / dt / dnotifier.h
index 09a2c3487181c4c59b66d48adb771b415978055b..992a4ce144b6a2e44725ca8fab732a463230f560 100644 (file)
@@ -31,8 +31,7 @@
  *
  * \brief Notifier obj (interface).
  *
- * \version $Id$
- * \author Bernardo Innocenti <bernie@develer.com>
+ * \author Bernie Innocenti <bernie@codewiz.org>
  * \author Francesco Sacchi <batt@develer.com>
  */
 
 #define DT_DNOTIFIER_H
 
 #include <cfg/debug.h>
-#include <cfg/macros.h>
 
 #include <dt/dtag.h>
-#include <mware/list.h>
+#include <struct/list.h>
 
 //Fwd declaretion.
 struct DNotifier;
@@ -100,7 +98,7 @@ typedef struct DFilter
 } DFilter;
 
 /// Type for filter-mask checking
-typedef uint16_t dfilter_mask_t;
+typedef unsigned int dfilter_mask_t;
 
 /// Filter init
 void filter_init(DFilter *f, const DFilterMap *map, bool masked, DNotifier *source, DNotifier *target);
@@ -130,8 +128,8 @@ INLINE void dnotify(DNotifier *target, dtag_t tag, dval_t val)
 INLINE void dnotify_targets(DNotifier *target, dtag_t tag, dval_t val)
 {
        DFilter *f;
-       if (!ISLISTEMPTY(&target->targets))
-               FOREACHNODE(f, &target->targets)
+       if (!LIST_EMPTY(&target->targets))
+               FOREACH_NODE(f, &target->targets)
                        f->update(f, tag, val);
 }