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
Removed keyword 'register' from files.
[simgrid.git]
/
src
/
simdag
/
sd_link.c
diff --git
a/src/simdag/sd_link.c
b/src/simdag/sd_link.c
index
5308684
..
a79cd28
100644
(file)
--- a/
src/simdag/sd_link.c
+++ b/
src/simdag/sd_link.c
@@
-1,11
+1,11
@@
-/* Copyright (c) 2006-201
1
. The SimGrid Team.
+/* Copyright (c) 2006-201
4
. 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. */
#include "private.h"
* 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. */
#include "private.h"
-#include "sim
dag
/simdag.h"
+#include "sim
grid
/simdag.h"
#include "xbt/dict.h"
#include "xbt/sysdep.h"
#include "surf/surf.h"
#include "xbt/dict.h"
#include "xbt/sysdep.h"
#include "surf/surf.h"
@@
-23,7
+23,7
@@
SD_link_t __SD_link_create(void *surf_link, void *data)
link = xbt_new(s_SD_link_t, 1);
link->surf_link = surf_link;
link->data = data; /* user data */
link = xbt_new(s_SD_link_t, 1);
link->surf_link = surf_link;
link->data = data; /* user data */
- if (surf_
workstation_model->extension.workstation.link
_shared(surf_link))
+ if (surf_
network_link_is
_shared(surf_link))
link->sharing_policy = SD_LINK_SHARED;
else
link->sharing_policy = SD_LINK_FATPIPE;
link->sharing_policy = SD_LINK_SHARED;
else
link->sharing_policy = SD_LINK_FATPIPE;
@@
-51,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;
@@
-69,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)
;
}
/**
}
/**
@@
-118,8
+118,7
@@
const char *SD_link_get_name(SD_link_t link)
*/
double SD_link_get_current_bandwidth(SD_link_t link)
{
*/
double SD_link_get_current_bandwidth(SD_link_t link)
{
- return surf_workstation_model->extension.workstation.
- get_link_bandwidth(link->surf_link);
+ return surf_network_link_get_bandwidth(link->surf_link);
}
/**
}
/**
@@
-130,8
+129,7
@@
double SD_link_get_current_bandwidth(SD_link_t link)
*/
double SD_link_get_current_latency(SD_link_t link)
{
*/
double SD_link_get_current_latency(SD_link_t link)
{
- return surf_workstation_model->extension.workstation.
- get_link_latency(link->surf_link);
+ return surf_network_link_get_latency(link->surf_link);
}
/**
}
/**
@@
-146,12
+144,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);
-}