* // other members here...
* } MyType;
*
- * DECLARE_POOL(mypool, MyType, POOL_SIZE);
+ * DEFINE_POOL(mypool, MyType, POOL_SIZE);
*
* static void elem_init(MyType *e)
* {
#define EXTERN_POOL(name) \
extern List name
-#define DECLARE_POOL_WITH_STORAGE(name, type, num, storage) \
+#define DEFINE_POOL_WITH_STORAGE(name, type, num, storage) \
static type name##_items[num]; \
storage name; \
INLINE void name##_init(void (*init_func)(type*)) \
INLINE void name##_init(void (*init_func)(type*)) \
/**/
+/* For backwards compatibily */
+#define DECLARE_POOL_WITH_STORAGE DEFINE_POOL_WITH_STORAGE
+
/**
* \brief Helper macro to declare a Pool data type.
*
* \param type Data type held by the pool.
* \param num Number of elements in pool.
*/
-#define DECLARE_POOL(name, type, num) \
- DECLARE_POOL_WITH_STORAGE(name, type, num, List)
+#define DEFINE_POOL(name, type, num) \
+ DEFINE_POOL_WITH_STORAGE(name, type, num, List)
+
+/* For backwards compatibily */
+#define DECLARE_POOL DEFINE_POOL
/**
* \brief Static Pool declaration
*
- * \sa DECLARE_POOL
+ * \sa DEFINE_POOL
*/
-#define DECLARE_POOL_STATIC(name, type, num) \
- DECLARE_POOL_WITH_STORAGE(name, type, num, static List)
+#define DEFINE_POOL_STATIC(name, type, num) \
+ DEFINE_POOL_WITH_STORAGE(name, type, num, static List)
+
+/* For backwards compatibily */
+#define DECLARE_POOL_STATIC DEFINE_POOL_STATIC
/**
* Initialize the pool \a name, calling \a init_func on each element.