]> rtime.felk.cvut.cz Git - frescor/frsh-include.git/blobdiff - frsh_core_types.h
conf params: the distributed module is enabled with a -D
[frescor/frsh-include.git] / frsh_core_types.h
index f038f70181e3ba22a1e82a4df821eddf43119012..d7be2e0a641ac8eee976bed9507f99e6a27c4656 100644 (file)
 //  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.
-//  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.
 // -----------------------------------------------------------------------
 //frsh_core_types.h
 //==============================================
@@ -88,6 +82,8 @@
 #include "frsh_distributed_types.h"
 #include "frsh_error.h"
 
+#include "fosa.h"
+
 FRSH_CPP_BEGIN_DECLS
 
 /**
@@ -108,7 +104,7 @@ typedef fosa_thread_id_t frsh_thread_id_t;
 /** thread attributes object **/
 typedef fosa_thread_attr_t frsh_thread_attr_t;
 
-/** 
+/**
  *  The type references a function that may become a thread's
  *  code
  **/
@@ -155,13 +151,11 @@ typedef enum {FRSH_RS_IN_PROGRESS,
               FRSH_RS_ADMITTED,
               FRSH_RS_NOT_REQUESTED} frsh_renegotiation_status_t;
 
-
-
 /**
  *  Vres Id type, that identifies a vres created to manage a given
  *  contract
  **/
-typedef unsigned int      frsh_vres_id_t;             // => 0
+typedef FRSH_VRES_ID_T_OPAQUE frsh_vres_id_t;             // => 0
 
 /** Contract ressource type:  processor, network, memory **/
 typedef enum {
@@ -173,7 +167,7 @@ typedef enum {
 
 /** Ressource Id: processor_id or network_id **/
 /**********************************************/
-typedef unsigned int frsh_resource_id_t;
+typedef fosa_resource_id_t frsh_resource_id_t;
 
 /** Kind of contract: regular, background or dummy **/
 typedef enum {
@@ -197,20 +191,16 @@ typedef FRSH_CONTRACT_T_OPAQUE  frsh_contract_t;
 /** List of vres **/
 typedef  struct {
   int             size;
-  frsh_vres_id_t  vres[FRSH_MAX_N_VRES];
+  frsh_vres_id_t  vres[FRSH_MAX_GROUP_OPS];
 } frsh_vres_group_t;
 
 /** List of contracts to negotiate **/
 typedef struct {
     int  size;
-    frsh_contract_t*  contracts[FRSH_MAX_N_VRES];
+    frsh_contract_t contracts[FRSH_MAX_GROUP_OPS];
 } frsh_contracts_group_t;
 
-typedef struct {
-    int size;
-    frsh_contract_label_t contract_labels[FRSH_MAX_N_VRES];
-} frsh_contract_labels_group_t;
-
+typedef FRSH_GROUP_ID_T_OPAQUE frsh_group_id_t;
 
 /**
  * An abstract synchronization object is defined by the application.