From 15a33b1a47c8e50e4ee80abf72640b4ec07f86ee Mon Sep 17 00:00:00 2001 From: Martin Molnar Date: Wed, 9 Jul 2008 09:47:05 +0200 Subject: [PATCH] WIP: frsh proposal modifcation --- frsh/frsh_contract.h | 11 ++++++++--- frsh/frsh_resource.h | 7 ++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/frsh/frsh_contract.h b/frsh/frsh_contract.h index 860abd6..26dd802 100644 --- a/frsh/frsh_contract.h +++ b/frsh/frsh_contract.h @@ -6,18 +6,23 @@ #ifndef FRSH_CONTRACT_H #define FRSH_CONTRACT_H -typedef struct frsh_contract_params { +#include "frsh_vres.h" + +/*typedef struct frsh_contract_params { frsh_budget_t budget; frsh_period_t period; } frsh_contract_params_t; typedef frsh_contract{ frsh_resource_type type; + frsh_contract_params_t contract_params; + frsh_vres_params_t vres_params; frsh_vres_d_t vresd; frsh_contract_status_t status; } frsh_contract_t; - -typedef frsh_contract_t* frsh_contract_d_t; +*/ +typedef void frsh_contract_params; +typedef unsigned int frsh_contract_d_t; typedef struct frsh_contract_ops { int (*reserve)(frsh_contract_params_t* params, diff --git a/frsh/frsh_resource.h b/frsh/frsh_resource.h index 55c7b00..cf3ed89 100644 --- a/frsh/frsh_resource.h +++ b/frsh/frsh_resource.h @@ -6,12 +6,13 @@ * */ -#ifndef _FRSH_RESOURCE_H -#define _FRSH_RESOURCE_H +#ifndef FRSH_RESOURCE_H +#define FRSH_RESOURCE_H #define FRSH_RESOURCE_NUM 5 typedef enum { + FRSH_DUMMY = 0, FRSH_CPU = 1, FRSH_MEMORY = 2, FRSH_DISK = 3, @@ -26,4 +27,4 @@ typedef struct frsh_resource { int frsh_resource_register(frsh_resource_type_t type, frsh_resource_t* resource); int frsh_resource_unregister(frsh_resource_type_t type); -#endif /* _FRSH_RESOURCE_H */ +#endif /* FRSH_RESOURCE_H */ -- 2.39.2