X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/1dc68fca3f3bd110ddaaf88fb90a8bbb83a584b2..d740a86eb8bb0e5d729e0ad55db7395444dad131:/src/simix/smx_user.c diff --git a/src/simix/smx_user.c b/src/simix/smx_user.c index c1e51170f7..4184a76591 100644 --- a/src/simix/smx_user.c +++ b/src/simix/smx_user.c @@ -1,6 +1,23 @@ +/* smx_user.c - public interface to simix */ + +/* Copyright (c) 2010, 2011. Da SimGrid team. All rights reserved. */ + +/* 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. */ +#ifndef _SVID_SOURCE +# define _SVID_SOURCE /* strdup() */ +#endif +#ifndef _ISOC99_SOURCE +# define _ISOC99_SOURCE /* isfinite() */ +#endif +#ifndef _ISO_C99_SOURCE +# define _ISO_C99_SOURCE /* isfinite() */ +#endif +#include /* isfinite() */ + #include "private.h" #include "mc/mc.h" -#include /* isfinite() */ + XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix); @@ -790,8 +807,7 @@ void SIMIX_req_comm_destroy(smx_action_t comm) { xbt_assert(comm, "Invalid parameter"); - /* FIXME remove this request type: comms are auto-destroyed now, - * but what happens with unfinished comms? */ + /* FIXME remove this request type: comms are auto-destroyed now */ /* smx_req_t req = SIMIX_req_mine(); @@ -827,7 +843,7 @@ unsigned int SIMIX_req_comm_waitany(xbt_dynar_t comms) int SIMIX_req_comm_testany(xbt_dynar_t comms) { smx_req_t req = SIMIX_req_mine(); - if (xbt_dynar_length(comms)==0) + if (xbt_dynar_is_empty(comms)) return -1; req->call = REQ_COMM_TESTANY;