-/* Copyright (c) 2004, 2005, 2006, 2007, 2008, 2009, 2010. The SimGrid Team.
+/* Copyright (c) 2004-2011. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
static void *lmm_variable_mallocator_new_f(void);
static void lmm_variable_mallocator_free_f(void *var);
-static void lmm_variable_mallocator_reset_f(void *var);
+#define lmm_variable_mallocator_reset_f ((void_f_pvoid_t)NULL)
static void lmm_update_modified_set(lmm_system_t sys,
lmm_constraint_t cnst);
static void lmm_remove_all_modified_set(lmm_system_t sys);
xbt_free(var);
}
-static void lmm_variable_mallocator_reset_f(void *var)
-{
- /* lmm_variable_new() initializes everything */
-}
-
lmm_variable_t lmm_variable_new(lmm_system_t sys, void *id,
double weight,
double bound, int number_of_constraints)
trace_buf =
xbt_realloc(trace_buf, strlen(trace_buf) + strlen(print_buf) + 1);
strcat(trace_buf, print_buf);
- fprintf(stderr, "%s", trace_buf);
- //XBT_DEBUG("%20s", trace_buf); FIXME
+ XBT_DEBUG("%20s", trace_buf);
trace_buf[0] = '\000';
XBT_DEBUG("Constraints");
strlen(trace_buf) + strlen(print_buf) + 1);
strcat(trace_buf, print_buf);
}
- // XBT_DEBUG("%s", trace_buf);
- fprintf(stderr, "%s\n", trace_buf);
+ XBT_DEBUG("%s", trace_buf);
trace_buf[0] = '\000';
xbt_assert(!double_positive(sum - cnst->bound),
"Incorrect value (%f is not smaller than %f): %g",
*/
static void lmm_remove_all_modified_set(lmm_system_t sys)
{
- lmm_element_t elem = NULL;
- lmm_element_t elem_next = NULL;
- xbt_swag_t elem_list = NULL;
+ xbt_swag_t modified_constraint_set = &sys->modified_constraint_set;
+ lmm_constraint_t cnst;
+ lmm_constraint_t cnst_next;
- elem_list = &(sys->modified_constraint_set);
- xbt_swag_foreach_safe(elem, elem_next, elem_list) {
- xbt_swag_remove(elem, elem_list);
+ xbt_swag_foreach_safe(cnst, cnst_next, modified_constraint_set) {
+ xbt_swag_remove(cnst, modified_constraint_set);
}
}