A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
allow tasks to take no output nor produce any output
[simgrid.git]
/
src
/
simdag
/
sd_link.c
diff --git
a/src/simdag/sd_link.c
b/src/simdag/sd_link.c
index
f3a3750
..
da64d74
100644
(file)
--- a/
src/simdag/sd_link.c
+++ b/
src/simdag/sd_link.c
@@
-1,4
+1,4
@@
-/* Copyright (c) 2006
, 2007, 2008, 2009, 2010
. The SimGrid Team.
+/* Copyright (c) 2006
-2011
. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
@@
-9,6
+9,8
@@
#include "xbt/dict.h"
#include "xbt/sysdep.h"
#include "surf/surf.h"
#include "xbt/dict.h"
#include "xbt/sysdep.h"
#include "surf/surf.h"
+#include "surf/surf_resource.h"
+
/* Creates a link and registers it in SD.
*/
/* Creates a link and registers it in SD.
*/
@@
-49,11
+51,11
@@
const SD_link_t *SD_link_get_list(void)
int i;
if (sd_global->link_list == NULL) { /* this is the first time the function is called */
int i;
if (sd_global->link_list == NULL) { /* this is the first time the function is called */
- sd_global->link_list = xbt_new(SD_link_t,
link_lib->count
);
+ sd_global->link_list = xbt_new(SD_link_t,
xbt_lib_length(link_lib)
);
i = 0;
xbt_lib_foreach(link_lib, cursor, key, data) {
i = 0;
xbt_lib_foreach(link_lib, cursor, key, data) {
-
sd_global->link_list[i++] = (SD_link_t) data[SD_LINK_LEVEL];
+ sd_global->link_list[i++] = (SD_link_t) data[SD_LINK_LEVEL];
}
}
return sd_global->link_list;
}
}
return sd_global->link_list;
@@
-67,7
+69,7
@@
const SD_link_t *SD_link_get_list(void)
*/
int SD_link_get_number(void)
{
*/
int SD_link_get_number(void)
{
- return
link_lib->count
;
+ return
xbt_lib_length(link_lib)
;
}
/**
}
/**
@@
-144,12
+146,3
@@
e_SD_link_sharing_policy_t SD_link_get_sharing_policy(SD_link_t link)
{
return link->sharing_policy;
}
{
return link->sharing_policy;
}
-
-
-/* Destroys a link.
- */
-void __SD_link_destroy(void *link)
-{
- /* link->surf_link is freed by surf_exit and link->data is freed by the user */
- xbt_free(link);
-}