]> rtime.felk.cvut.cz Git - frescor/frsh-include.git/blobdiff - frsh_opaque_types.h
Update transaction API
[frescor/frsh-include.git] / frsh_opaque_types.h
index a21414343ded673674a9410bb1d64618c3e3ba58..55e802c58d90c9873eea78d8ac5a354a8bc0556b 100644 (file)
@@ -1,5 +1,5 @@
 // -----------------------------------------------------------------------
-//  Copyright (C) 2006 - 2007 FRESCOR consortium partners:
+//  Copyright (C) 2006 - 2009 FRESCOR consortium partners:
 //
 //    Universidad de Cantabria,              SPAIN
 //    University of York,                    UK
@@ -12,7 +12,7 @@
 //    Visual Tools S.A.                      SPAIN
 //    Rapita Systems Ltd                     UK
 //    Evidence                               ITALY
-//    
+//
 //    See http://www.frescor.org for a link to partners' websites
 //
 //           FRESCOR project (FP6/2005/IST/5-034026) is funded
@@ -22,7 +22,7 @@
 //
 //
 //  based on previous work (FSF) done in the FIRST project
-//                       
+//
 //   Copyright (C) 2005  Mälardalen University, SWEDEN
 //                       Scuola Superiore S.Anna, ITALY
 //                       Universidad de Cantabria, SPAIN
 //   FSF API web pages: http://marte.unican.es/fsf/docs
 //                      http://shark.sssup.it/contrib/first/docs/
 //
-//  This file is part of FRSH API
-//
-//  FRSH API is free software; you can  redistribute it and/or  modify
-//  it under the terms of  the GNU General Public License as published by
-//  the Free Software Foundation;  either  version 2, or (at  your option)
-//  any later version.
+//   This file is part of FRSH (FRescor ScHeduler)
 //
-//  FRSH API  is distributed  in  the hope  that  it  will  be useful,  but
-//  WITHOUT  ANY  WARRANTY;     without  even the   implied   warranty  of
-//  MERCHANTABILITY  or  FITNESS FOR  A  PARTICULAR PURPOSE. See  the  GNU
-//  General Public License for more details.
+//  FRSH is free software; you can redistribute it and/or modify it
+//  under terms of the GNU General Public License as published by the
+//  Free Software Foundation; either version 2, or (at your option) any
+//  later version.  FRSH is distributed in the hope that it will be
+//  useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+//  of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+//  General Public License for more details. You should have received a
+//  copy of the GNU General Public License along with FRSH; see file
+//  COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
+//  Cambridge, MA 02139, USA.
 //
-//  You should have  received a  copy of  the  GNU  General Public License
-//  distributed  with  FRSH API;  see file COPYING.   If not,  write to the
-//  Free Software  Foundation,  59 Temple Place  -  Suite 330,  Boston, MA
-//  02111-1307, USA.
-//
-//  As a special exception, if you include this header file into source
-//  files to be compiled, this header file does not by itself cause
-//  the resulting executable to be covered by the GNU General Public
-//  License.  This exception does not however invalidate any other
-//  reasons why the executable file might be covered by the GNU General
-//  Public License.
+//  As a special exception, including FRSH header files in a file,
+//  instantiating FRSH generics or templates, or linking other files
+//  with FRSH objects to produce an executable application, does not
+//  by itself cause the resulting executable application to be covered
+//  by the GNU General Public License. This exception does not
+//  however invalidate any other reasons why the executable file might be
+//  covered by the GNU Public License.
 // -----------------------------------------------------------------------
 //frsh_opaque_types.h
 //==============================================
@@ -64,7 +61,7 @@
 //  **////  /**///**  ////////** /**//////**
 //  **      /**  //**        /** /**     /**
 //  **      /**   //** ********  /**     /**
-//  //       //     // ////////   //      // 
+//  //       //     // ////////   //      //
 //
 // FRSH(FRescor ScHeduler), pronounced "fresh"
 //==============================================
 #ifndef _FRSH_OPAQUE_TYPES_H_
 #define _FRSH_OPAQUE_TYPES_H_
 
+FRSH_CPP_BEGIN_DECLS
+
+/**
+ * @file frsh_opaque_types.h
+ **/
 
 /**
  * @defgroup opaque Opaque types
@@ -89,6 +91,8 @@
  * @{
  **/
 
+#define FRSH_VRES_ID_T_OPAQUE unsigned int
+
 /** frsh_contract_parameters_t **/
 #define FRSH_CONTRACT_T_OPAQUE struct { \
 \
 \
   /** Printable name for the contract
      Unique within the local node               **/         \
-  frsh_contract_id_t      contract_id;                        \
+  frsh_contract_label_t      contract_label;                        \
 \
-  /** Minimum budget needed to perform a job **/              \
-  struct timespec         budget_min;                         \
+  /** Minimum budget needed to perform a job.  With the energy
+      module this will be an array **/              \
+  frsh_rel_time_t         budget_min;                         \
 \
   /** Maximum period that the system system can sustain **/   \
-  struct timespec         period_max;                         \
+  frsh_rel_time_t         period_max;                         \
 \
   /** Maximum budget that the vres can use
-     (and would be happy to have)           **/              \
-  struct timespec         budget_max;                         \
+     (and would be happy to have).  With the energy module
+     this will be an array **/              \
+  frsh_rel_time_t         budget_max;                         \
 \
   /** Minimum period for that
      the system can use (and would be happy to have) **/     \
-  struct timespec         period_min;                         \
+  frsh_rel_time_t         period_min;                         \
+\
+  /** Set of discrete values for budget and period.  With the
+      energy module this will be an array **/        \
+  frsh_utilization_set_t   utilization_set;          \
 \
   /** Workload_type:  bounded, indeterminate, overhead **/    \
   frsh_workload_t          workload;                          \
   bool                    d_equals_t;                         \
 \
   /** Deadline (will be ignored if d_equals_t is TRUE **/     \
-  struct timespec         deadline;                           \
+  frsh_rel_time_t         deadline;                           \
 \
   /** Signal parameters for the case of
       attempting to use too much budget       **/             \
       in a continuous way (max-min) or as a set of
       discrete values                                    **/  \
   frsh_granularity_t       granularity;                       \
-\
-  /** Set of discrete values for budget and period **/        \
-  frsh_utilization_set_t   utilization_set;          \
 \
   /** Non-cooperative parameter for fair capacity
       distribution                                **/         \
       the allocated budget and capacity will be
       maintained across negotiations  and will
       not be affected for dynamic spare capacity    **/       \
-  struct timespec         remaining_stability_time;  \
+  frsh_rel_time_t         stability_time;  \
 \
   /** Low level parameter related with the elegibility
       preempt other threads                            **/    \
       as a pointer+size.  It's internal meaning is imple-
       mentation dependent.                              **/    \
   frsh_protocol_info_t    protocol_info; \
+  frsh_endpoint_queueing_info_t    queueing_info; \
 \
   /** Maximum loss rate
-      Percentage of packet loss in the network that is 
+      Percentage of packet loss in the network that is
       tolerated by the application **/                       \
 int                     max_loss_rate; \
+\
+ /** Minimum memory size to be reserved **/ \
+size_t                  minimum_memory; \
+\
+/** Maximum memory size to be reserved  **/ \
+size_t                  maximum_memory; \
 }
 
 
-#define FRSH_SYNCHOBJ_HANDLE_T_OPAQUE int
+typedef int FRSH_SYNCHOBJ_HANDLE_T_OPAQUE;
+
+typedef int FRSH_SHAREDOBJ_HANDLE_T_OPAQUE;
 
-#define FRSH_SHAREDOBJ_HANDLE_T_OPAQUE int
+typedef unsigned int FRSH_GROUP_ID_T_OPAQUE;
 
 /**
  * Critical section data
@@ -195,26 +211,31 @@ int                     max_loss_rate; \
  *     op_kind;     // kind of operation (READ or WRITE)
  *     obj_handle;  // handle to shared object
  *     wcet;        // Execution time
+ *     blocking;    // Blocking time (execution time + protection overheads)
  * - attributes used only for protected shared objects
  *     op;          // pointer to the operation
  * - attributes used only for protected write operations
  *     areas;       // memory areas to be protected
- * 
+ *
  **/
 #define FRSH_CSECT_T_OPAQUE struct { \
   frsh_csect_op_kind_t op_kind;                 \
   frsh_sharedobj_handle_t obj_handle;               \
-  struct timespec wcet;                              \
+  frsh_rel_time_t wcet;                              \
+  frsh_rel_time_t blocking;                              \
   frsh_csect_op_t op;                           \
   frsh_memory_areas_t areas;                         \
+  frsh_memory_areas_t storage;                         \
 }
 
 
 //opaque types for frsh endpoints
-#define FRSH_SEND_ENDPOINT_T_OPAQUE int
+typedef int FRSH_SEND_ENDPOINT_T_OPAQUE;
 
-#define FRSH_RECEIVE_ENDPOINT_T_OPAQUE int
+typedef int FRSH_RECEIVE_ENDPOINT_T_OPAQUE;
 
 /*@}*/
 
+FRSH_CPP_END_DECLS
+
 #endif // _FRSH_OPAQUE_TYPES_H_