1 /* Public interface to the Link datatype */
3 /* Copyright (c) 2018-2020. The SimGrid Team. All rights reserved. */
5 /* This program is free software; you can redistribute it and/or modify it
6 * under the terms of the license (GNU LGPL) which comes with this package. */
8 #ifndef INCLUDE_SIMGRID_VM_H_
9 #define INCLUDE_SIMGRID_VM_H_
11 #include <simgrid/forward.h>
17 /** @brief Opaque type describing a Virtual Machine.
20 * All this is highly experimental and the interface will probably change in the future.
21 * Please don't depend on this yet (although testing is welcomed if you feel so).
22 * Usual lack of guaranty of any kind applies here, and is even increased.
25 XBT_PUBLIC sg_vm_t sg_vm_create_core(sg_host_t pm, const char* name);
26 XBT_PUBLIC sg_vm_t sg_vm_create_multicore(sg_host_t pm, const char* name, int coreAmount);
28 XBT_PUBLIC int sg_vm_is_created(sg_vm_t vm);
29 XBT_PUBLIC int sg_vm_is_running(sg_vm_t vm);
30 XBT_PUBLIC int sg_vm_is_suspended(sg_vm_t vm);
32 XBT_PUBLIC const char* sg_vm_get_name(const_sg_vm_t vm);
33 XBT_PUBLIC void sg_vm_set_ramsize(sg_vm_t vm, size_t size);
34 XBT_PUBLIC size_t sg_vm_get_ramsize(const_sg_vm_t vm);
35 XBT_PUBLIC void sg_vm_set_bound(sg_vm_t vm, double bound);
36 XBT_PUBLIC sg_host_t sg_vm_get_pm(const_sg_vm_t vm);
38 XBT_PUBLIC void sg_vm_start(sg_vm_t vm);
39 XBT_PUBLIC void sg_vm_suspend(sg_vm_t vm);
40 XBT_PUBLIC void sg_vm_resume(sg_vm_t vm);
41 XBT_PUBLIC void sg_vm_shutdown(sg_vm_t vm);
42 XBT_PUBLIC void sg_vm_destroy(sg_vm_t vm);
46 #endif /* INCLUDE_SIMGRID_VM_H_ */