Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
First attempt on SURF design. I'd like a 5'10" short board with a swallow
[simgrid.git] / src / surf / cpu.c
1 /* Authors: Arnaud Legrand                                                  */
2
3 /* This program is free software; you can redistribute it and/or modify it
4    under the terms of the license (GNU LGPL) which comes with this package. */
5
6 #include "host_private.h"
7
8 surf_host_resource_t surf_host_resource = NULL;
9
10 static void parse_file(const char *file)
11 {
12 }
13
14 static void *name_service(const char *name)
15 {
16   return NULL;
17 }
18
19 static surf_action_t action_new(void *callback)
20 {
21   return NULL;
22 }
23
24 static e_surf_action_state_t action_get_state(surf_action_t action)
25 {
26   return SURF_ACTION_NOT_IN_THE_SYSTEM;
27 }
28
29 static void action_free(surf_action_t * action)
30 {
31   return;
32 }
33
34 static void action_cancel(surf_action_t action)
35 {
36   return;
37 }
38
39 static void action_recycle(surf_action_t action)
40 {
41   return;
42 }
43
44 static void action_change_state(surf_action_t action, e_surf_action_state_t state)
45 {
46   return;
47 }
48
49 static xbt_heap_float_t share_resources(void)
50 {
51   return -1.0;
52 }
53
54 static void solve(xbt_heap_float_t date)
55 {
56   return;
57 }
58
59 static void execute(void *host, xbt_maxmin_float_t size, surf_action_t action)
60 {
61 }
62
63 static e_surf_host_state_t get_state(void *host)
64 {
65   return SURF_HOST_OFF;
66 }
67
68
69 surf_host_resource_t surf_host_resource_init(void)
70 {
71   surf_host_resource = xbt_new0(s_surf_host_resource_t,1);
72
73   surf_host_resource->resource.parse_file = parse_file;
74   surf_host_resource->resource.name_service = name_service;
75   surf_host_resource->resource.action_new=action_new;
76   surf_host_resource->resource.action_get_state=surf_action_get_state;
77   surf_host_resource->resource.action_free = action_free;
78   surf_host_resource->resource.action_cancel = action_cancel;
79   surf_host_resource->resource.action_recycle = action_recycle;
80   surf_host_resource->resource.action_change_state = action_change_state;
81   surf_host_resource->resource.share_resources = share_resources;
82   surf_host_resource->resource.solve = solve;
83
84   surf_host_resource->execute = execute;
85   surf_host_resource->get_state = get_state;
86
87   return surf_host_resource;
88 }