Remove arduino preset from night_test awaiting the avr toolchain updates on building...
[bertos.git] / bertos / struct / pool.h
index 01c18d38a15a28bcdb8706d60e1d1d0c9acbe131..f53d4061c828bb3679ddf3381cd201922811bf4a 100644 (file)
  *
  * \brief Pool macros.
  *
- * \version $Id: pool.h 1294 2008-05-20 13:43:57Z asterix $
  * \author Giovanni Bajo <rasky@develer.com>
  */
 
-#ifndef MWARE_POOL_H
-#define MWARE_POOL_H
+#ifndef STRUCT_POOL_H
+#define STRUCT_POOL_H
 
 #include <cfg/macros.h>
 #include <struct/list.h>
@@ -49,7 +48,7 @@
        storage name; \
        INLINE void name##_init(void (*init_func)(type*)) \
        { \
-               int i; \
+               size_t i; \
                LIST_INIT(&name); \
                for (i=0;i<countof(name##_items);++i) \
                { \
@@ -67,8 +66,8 @@
        DECLARE_POOL_WITH_STORAGE(name, type, num, static List)
 
 #define pool_init(name, init_func)     (*(name##_init))(init_func)
-#define pool_alloc(name)               REMHEAD(name)
+#define pool_alloc(name)               list_remHead(name)
 #define pool_free(name, elem)          ADDHEAD(name, (Node*)elem)
 #define pool_empty(name)               ISLISTEMPTY(name)
 
-#endif /* MWARE_POOL_H */
+#endif /* STRUCT_POOL_H */