X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/0caba370ea99d7ba91606850d0ee8657f39bdbe1..f2e9baad7ddb5f9e86719879f359f57c99d258ed:/src/include/surf/surf_resource.h diff --git a/src/include/surf/surf_resource.h b/src/include/surf/surf_resource.h index 8fb6861578..78afcd72f4 100644 --- a/src/include/surf/surf_resource.h +++ b/src/include/surf/surf_resource.h @@ -1,5 +1,6 @@ -/* Copyright (c) 2009 The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2009, 2010. The 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. */ @@ -8,6 +9,16 @@ #ifndef SURF_RESOURCE_H #define SURF_RESOURCE_H +static XBT_INLINE +surf_resource_t surf_resource_new(size_t childsize, + surf_model_t model, char *name, xbt_dict_t props) { + surf_resource_t res = xbt_malloc0(childsize); + res->model = model; + res->name = name; + res->properties = props; + return res; +} + static XBT_INLINE void surf_resource_free(void* r) { surf_resource_t resource = r; if (resource->name)