Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
13141489c8009e43561a755f496c0d3f2a804953
[simgrid.git] / include / gras / virtu.h
1 /* $Id$                    */
2
3 /* gras/virtu.h - public interface to virtualization (cross-OS portability) */
4
5 /* Copyright (c) 2003, 2004 Martin Quinson. All rights reserved.            */
6
7 /* This program is free software; you can redistribute it and/or modify it
8  * under the terms of the license (GNU LGPL) which comes with this package. */
9
10 #ifndef GRAS_VIRTU_H
11 #define GRAS_VIRTU_H
12
13 #include "xbt/misc.h" /* SG_BEGIN_DECL */
14
15 SG_BEGIN_DECL()
16
17 /** @addtogroup GRAS_virtu  
18  *  @brief System call abstraction layer (Virtualization).
19  *
20  * <center><table><tr><td><b>Top</b>    <td> [\ref index]::[\ref GRAS_API]
21  *                <tr><td><b>Prev</b>   <td> [\ref GRAS_timer]
22  *                <tr><td><b>Next</b>   <td> [\ref GRAS_globals]            </table></center>
23  *
24  *  @{
25  */
26
27 /** @brief Get the current time
28  *  @return number of second since the Epoch.
29  *  (00:00:00 UTC, January 1, 1970 in Real Life, and begining of simulation in SG)
30  */
31 double gras_os_time(void);
32
33 /** @brief sleeps for the given amount of time.
34  *  @param sec: number of seconds to sleep
35  */
36 void gras_os_sleep(double sec);
37
38 /** @brief get the fully-qualified name of the current host
39  *
40  * Returns the fully-qualified name of the host machine, or "localhost" if the name
41  * cannot be determined.  Always returns the same value, so multiple calls
42  * cause no problems.
43  */
44 const char *
45 gras_os_myname(void);
46
47 /** @brief get process identification
48  *
49  * Returns the process ID of the current process.  (This is often used
50    by routines that generate unique temporary file names.)
51  */
52 int gras_os_getpid(void);
53
54 /** @} */
55 SG_END_DECL()
56
57 #endif /* GRAS_VIRTU_H */
58