1 /* virtu - virtualization layer for XBT to choose between GRAS and MSG implementation */
3 /* Copyright (c) 2007, 2008, 2009, 2010. The SimGrid Team.
4 * All rights reserved. */
6 /* This program is free software; you can redistribute it and/or modify it
7 * under the terms of the license (GNU LGPL) which comes with this package. */
10 #include "xbt/virtu.h"
11 #include "xbt/function_types.h"
12 #include "simgrid/simix.h"
14 char *xbt_os_procname_data = NULL;
16 static int xbt_fake_pid(void)
21 int_f_void_t xbt_getpid = xbt_fake_pid;
24 * Time elapsed since the beginning of the simulation.
28 /* FIXME: check if we should use the request mechanism or not */
29 return SIMIX_get_clock();
33 * Freeze the process for the specified amount of time
35 void xbt_sleep(double sec)
37 simcall_process_sleep(sec);
40 const char *xbt_procname(void)
42 return SIMIX_process_self_get_name();
45 const char *xbt_os_procname(void)
47 return xbt_os_procname_data;