Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Stupid me. The code produced by the gras_stub_generator need these symbols, making...
[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 /* Initialization of the simulation world. Do not call them in RL. 
18    Indeed, do not call them at all. Let gras_stub_generator do it for you. */
19 void gras_global_init(int *argc, char **argv);
20 void gras_create_environment(const char *file);
21 void gras_function_register(const char *name, xbt_main_func_t code);
22 void gras_launch_application(const char *file);
23 void gras_clean(void);
24 void gras_main(void);
25
26
27 /** @addtogroup GRAS_virtu  
28  *  @brief System call abstraction layer.
29  *
30  *
31  *  @{
32  */
33
34 /** @brief Get the current time
35  *  @return number of second since the Epoch.
36  *  (00:00:00 UTC, January 1, 1970 in Real Life, and begining of simulation in SG)
37  */
38 XBT_PUBLIC(double) gras_os_time(void);
39
40 /** @brief sleeps for the given amount of time.
41  *  @param sec: number of seconds to sleep
42  */
43 XBT_PUBLIC(void) gras_os_sleep(double sec);
44
45 /** @brief get the fully-qualified name of the current host
46  *
47  * Returns the fully-qualified name of the host machine, or "localhost" if the name
48  * cannot be determined.  Always returns the same value, so multiple calls
49  * cause no problems.
50  */
51 XBT_PUBLIC(const char *)
52 gras_os_myname(void);
53
54 /** @brief returns the number on which this process is listening for incoming messages */
55 XBT_PUBLIC(int) gras_os_myport(void);
56
57 /** @brief get process identification
58  *
59  * Returns the process ID of the current process.  (This is often used
60    by routines that generate unique temporary file names.)
61  */
62 XBT_PUBLIC(int) gras_os_getpid(void);
63
64 /** @} */
65 SG_END_DECL()
66
67 #endif /* GRAS_VIRTU_H */
68