git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@2834
48e7efb5-ca39-0410-a469-
dd3cf9ba447f
#if defined(__GNUC__) && ! defined(__STRICT_ANSI__)
# define _XBT_FUNCTION __FUNCTION__
#if defined(__GNUC__) && ! defined(__STRICT_ANSI__)
# define _XBT_FUNCTION __FUNCTION__
-# define _XBT_INLINE inline
+# define XBT_INLINE inline
#elif (defined(__STDC__) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
# define _XBT_FUNC__ __func__ /* ISO-C99 compliant */
#elif (defined(__STDC__) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
# define _XBT_FUNC__ __func__ /* ISO-C99 compliant */
-# define _XBT_INLINE inline
+# define XBT_INLINE inline
#else
# define _XBT_FUNCTION "function"
#else
# define _XBT_FUNCTION "function"
int xbt_swag_size(xbt_swag_t swag);
int xbt_swag_belongs(void *obj, xbt_swag_t swag);
int xbt_swag_size(xbt_swag_t swag);
int xbt_swag_belongs(void *obj, xbt_swag_t swag);
-static _XBT_INLINE void *xbt_swag_getFirst(xbt_swag_t swag)
+static XBT_INLINE void *xbt_swag_getFirst(xbt_swag_t swag)
* of 'length' bytes set to 0.
* FIXME: Check in configure?
*/
* of 'length' bytes set to 0.
* FIXME: Check in configure?
*/
gras_dd_is_r_null(char **r_ptr, long int length) {
int i;
gras_dd_is_r_null(char **r_ptr, long int length) {
int i;
gras_dd_alloc_ref(xbt_dict_t refs,
long int size,
char **r_ref,
gras_dd_alloc_ref(xbt_dict_t refs,
long int size,
char **r_ref,
-static _XBT_INLINE void double_update(double *variable, double value)
+static XBT_INLINE void double_update(double *variable, double value)
{
*variable -= value;
if(*variable< 0.00001) *variable = 0.0;
{
*variable -= value;
if(*variable< 0.00001) *variable = 0.0;
/* Functions to test if the task is in a given state. */
/* Returns whether the given task is scheduled or ready. */
/* Functions to test if the task is in a given state. */
/* Returns whether the given task is scheduled or ready. */
-static _XBT_INLINE int __SD_task_is_scheduled_or_ready(SD_task_t task) {
+static XBT_INLINE int __SD_task_is_scheduled_or_ready(SD_task_t task) {
return task->state_set == sd_global->scheduled_task_set ||
task->state_set == sd_global->ready_task_set;
}
/* Returns whether the state of the given task is SD_NOT_SCHEDULED. */
return task->state_set == sd_global->scheduled_task_set ||
task->state_set == sd_global->ready_task_set;
}
/* Returns whether the state of the given task is SD_NOT_SCHEDULED. */
-static _XBT_INLINE int __SD_task_is_not_scheduled(SD_task_t task) {
+static XBT_INLINE int __SD_task_is_not_scheduled(SD_task_t task) {
return task->state_set == sd_global->not_scheduled_task_set;
}
/* Returns whether the state of the given task is SD_SCHEDULED. */
return task->state_set == sd_global->not_scheduled_task_set;
}
/* Returns whether the state of the given task is SD_SCHEDULED. */
-static _XBT_INLINE int __SD_task_is_scheduled(SD_task_t task) {
+static XBT_INLINE int __SD_task_is_scheduled(SD_task_t task) {
return task->state_set == sd_global->scheduled_task_set;
}
/* Returns whether the state of the given task is SD_READY. */
return task->state_set == sd_global->scheduled_task_set;
}
/* Returns whether the state of the given task is SD_READY. */
-static _XBT_INLINE int __SD_task_is_ready(SD_task_t task) {
+static XBT_INLINE int __SD_task_is_ready(SD_task_t task) {
return task->state_set == sd_global->ready_task_set;
}
/* Returns whether the state of the given task is SD_IN_FIFO. */
return task->state_set == sd_global->ready_task_set;
}
/* Returns whether the state of the given task is SD_IN_FIFO. */
-static _XBT_INLINE int __SD_task_is_in_fifo(SD_task_t task) {
+static XBT_INLINE int __SD_task_is_in_fifo(SD_task_t task) {
return task->state_set == sd_global->in_fifo_task_set;
}
/* Returns whether the state of the given task is SD_READY or SD_IN_FIFO. */
return task->state_set == sd_global->in_fifo_task_set;
}
/* Returns whether the state of the given task is SD_READY or SD_IN_FIFO. */
-static _XBT_INLINE int __SD_task_is_ready_or_in_fifo(SD_task_t task) {
+static XBT_INLINE int __SD_task_is_ready_or_in_fifo(SD_task_t task) {
return task->state_set == sd_global->ready_task_set ||
task->state_set == sd_global->in_fifo_task_set;
}
/* Returns whether the state of the given task is SD_RUNNING. */
return task->state_set == sd_global->ready_task_set ||
task->state_set == sd_global->in_fifo_task_set;
}
/* Returns whether the state of the given task is SD_RUNNING. */
-static _XBT_INLINE int __SD_task_is_running(SD_task_t task) {
+static XBT_INLINE int __SD_task_is_running(SD_task_t task) {
return task->state_set == sd_global->running_task_set;
}
return task->state_set == sd_global->running_task_set;
}
/*
* Sanity check to see if the head contains something
*/
/*
* Sanity check to see if the head contains something
*/
-static _XBT_INLINE void __cursor_not_null(xbt_dict_cursor_t cursor) {
+static XBT_INLINE void __cursor_not_null(xbt_dict_cursor_t cursor) {
xbt_assert0(cursor, "Null cursor");
}
xbt_assert0(cursor, "Null cursor");
}
xbt_assert1(dynar->used, \
"dynar %p contains nothing",(void*)dynar)
xbt_assert1(dynar->used, \
"dynar %p contains nothing",(void*)dynar)
void _xbt_clear_mem(void * const ptr,
const unsigned long length) {
memset(ptr, 0, length);
}
void _xbt_clear_mem(void * const ptr,
const unsigned long length) {
memset(ptr, 0, length);
}
void
_xbt_dynar_expand(xbt_dynar_t const dynar,
const int nb) {
void
_xbt_dynar_expand(xbt_dynar_t const dynar,
const int nb) {
void *
_xbt_dynar_elm(const xbt_dynar_t dynar,
const unsigned long idx) {
void *
_xbt_dynar_elm(const xbt_dynar_t dynar,
const unsigned long idx) {
return data + idx*elmsize;
}
return data + idx*elmsize;
}
void
_xbt_dynar_get_elm(void * const dst,
const xbt_dynar_t dynar,
void
_xbt_dynar_get_elm(void * const dst,
const xbt_dynar_t dynar,
memcpy(dst, elm, dynar->elmsize);
}
memcpy(dst, elm, dynar->elmsize);
}
void
_xbt_dynar_put_elm(const xbt_dynar_t dynar,
const unsigned long idx,
void
_xbt_dynar_put_elm(const xbt_dynar_t dynar,
const unsigned long idx,