Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
969a7387ffdbf251f6edbaffbe10019a7337d482
[simgrid.git] / src / simgrid / host.cpp
1 /* Copyright (c) 2013-2015. The SimGrid Team.
2  * All rights reserved.                                                     */
3
4 /* This program is free software; you can redistribute it and/or modify it
5  * under the terms of the license (GNU LGPL) which comes with this package. */
6
7 #include "xbt/dict.h"
8 #include "simgrid/host.h"
9 #include "surf/surf_routing.h" // SIMIX_HOST_LEVEL and friends FIXME: make private here
10
11 int SIMIX_HOST_LEVEL;           //Simix host level
12
13 #include "simix/smx_host_private.h" // SIMIX_host_destroy. FIXME: killme
14 void sg_host_init() {
15         SIMIX_HOST_LEVEL = xbt_lib_add_level(host_lib,SIMIX_host_destroy);
16 }
17
18 smx_host_priv_t sg_host_simix(sg_host_t host){
19   return (smx_host_priv_t) xbt_lib_get_level(host, SIMIX_HOST_LEVEL);
20 }
21 void sg_host_simix_set(sg_host_t host, smx_host_priv_t smx_host) {
22           xbt_lib_set(host_lib,host->key,SIMIX_HOST_LEVEL,smx_host);
23 }
24 void sg_host_simix_destroy(sg_host_t host) {
25           xbt_lib_unset(host_lib,host->key,SIMIX_HOST_LEVEL,1);
26 }
27
28
29 /*
30 host::host() {
31         // TODO Auto-generated constructor stub
32
33 }
34
35 host::~host() {
36         // TODO Auto-generated destructor stub
37 }*/
38