Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Kill old $Id$ command dating from CVS
[simgrid.git] / src / gras / Virtu / rl_emul.c
1 /* rl_emul - Emulation support (real life)                                  */
2
3 /* Copyright (c) 2003-5 Arnaud Legrand, Martin Quinson. All rights reserved.*/
4
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. */
7
8 #include "gras/emul.h"
9 #include "gras/Virtu/virtu_rl.h"
10 #include "gras_modinter.h"
11
12 XBT_LOG_NEW_SUBCATEGORY(gras_virtu_emul, gras_virtu, "Emulation support");
13
14 /*** CPU burning */
15 void gras_cpu_burn(double flops) {
16   while (flops>0) {
17     flops-=2;
18   }
19 }
20
21
22 /*** Timing macros: nothing to do in RL. Actually do the job and shutup ***/
23
24 void gras_emul_init(void)
25 {
26 }
27
28 void gras_emul_exit(void)
29 {
30 }
31
32 int gras_bench_always_begin(const char *location, int line)
33 {
34   return 0;
35 }
36
37 int gras_bench_always_end(void)
38 {
39   return 0;
40 }
41
42 int gras_bench_once_begin(const char *location, int line)
43 {
44   return 1;
45 }
46
47 int gras_bench_once_end(void)
48 {
49   return 0;
50 }
51
52 /*** Conditional execution support ***/
53
54 int gras_if_RL(void)
55 {
56   return 1;
57 }
58
59 int gras_if_SG(void)
60 {
61   return 0;
62 }