/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
+#include "src/internal_config.h"
#include "xbt/mallocator.h"
#include "xbt/asserts.h"
#include "xbt/sysdep.h"
* mallocators should be protected from concurrent accesses. */
static int initialization_done = 0;
-static XBT_INLINE void lock_reset(xbt_mallocator_t m)
+static inline void lock_reset(xbt_mallocator_t m)
{
m->lock = 0;
}
-static XBT_INLINE void lock_acquire(xbt_mallocator_t m)
+static inline void lock_acquire(xbt_mallocator_t m)
{
if (initialization_done > 1) {
int *lock = &m->lock;
}
}
-static XBT_INLINE void lock_release(xbt_mallocator_t m)
+static inline void lock_release(xbt_mallocator_t m)
{
if (initialization_done > 1)
__sync_lock_release(&m->lock);
}
/** used by the module to know if it's time to activate the mallocators yet */
-static XBT_INLINE int xbt_mallocator_is_active(void) {
-#if MALLOCATOR_COMPILED_IN
+static inline int xbt_mallocator_is_active(void) {
+#if HAVE_MALLOCATOR
return initialization_done && !MC_is_active();
#else
return 0;