]> rtime.felk.cvut.cz Git - frescor/fwp.git/commitdiff
compilation fixes
authorMartin <molnar@sum.(none)>
Tue, 9 Sep 2008 16:32:21 +0000 (18:32 +0200)
committerMartin <molnar@sum.(none)>
Tue, 9 Sep 2008 16:32:21 +0000 (18:32 +0200)
frsh/Makefile.omk
frsh/frsh_contract.c
frsh/frsh_contract.h
frsh/frsh_error.c
frsh/frsh_time_types.h
frsh/frsh_vres.c

index 1da8e03dd553561adf23dc207f955d6abce476cd..0ae7d3a898ec429827842ae5fc8b8be8586f12ff 100644 (file)
@@ -1,5 +1,4 @@
 lib_LIBRARIES = frsh
-CFLAGS = -Wall -D_REENTRANT -g -D_FWP_INTERNALS_
-#LDFLAGS = -lpthread  -lrt
-frsh_SOURCES += frsh_resource.c 
-include_HEADERS= frsh_resource.h frsh_contract.h 
+#CFLAGS += -Wall -D_REENTRANT -g
+frsh_SOURCES += frsh_contract.c frsh_vres.c frsh_error.c 
+include_HEADERS= frsh_contract.h frsh_vres.h frsh_error.h
index 4ee2834abbefdda987249079a9993a7897f7bad3..b100130af66514ec12a657365472ed8c3a8892f2 100644 (file)
@@ -44,7 +44,9 @@ typedef unsigned long frsh_vres_handle;
 int frsh_contract_init(frsh_contract_t *contract)
 {
        // alocates contract 
-       cntr = frsh_calloc(FRSH_CONTRACT_SIZE);
+       //cntr = frsh_calloc(FRSH_CONTRACT_SIZE);
+       
+       return FRSH_NO_ERROR;
 }
 
 /* Functions: frsh_contract_init, 
@@ -142,13 +144,11 @@ int frsh_contract_negotiate
  */
 int frsh_contract_cancel(const frsh_vres_id_t vres)
 {
-       frsh_in_msg_t vres_msg;
-       frsh_out_msg_t reply_msg;
-
        /* check for framework initialization and arguments */
-       if (!frsh_initialized)
+       /*if (!frsh_initialized)
                PERROR_AND_RETURN(FRSH_ERR_NOT_INITIALIZED,
                                "can't proceed before initializing FRSH with 'frsh_init()'!");
+               */
 
        return FRSH_NO_ERROR;
 }
@@ -189,10 +189,10 @@ int frsh_contract_renegotiate_sync(const frsh_contract_t *new_contract,
        const frsh_vres_id_t vres)
 {
        /* check for framework initialization and arguments */
-       if (!frsh_initialized)
+       /*if (!frsh_initialized)
                PERROR_AND_RETURN(FRSH_ERR_NOT_INITIALIZED,
                                "can't proceed before initializing FRSH with 'frsh_init()'!");
-
+*/
        return FRSH_NO_ERROR;
 }
 
@@ -212,6 +212,7 @@ int frsh_contract_renegotiate_sync(const frsh_contract_t *new_contract,
  *  FRSH_NO_ERROR
  *  FRSH_ERR_INVALID_SCHEDULER_REPLY (error in communication with the service thread)
  */
+#if 0
 int frsh_contract_renegotiate_async(const frsh_contract_t *new_contract,
        const frsh_vres_id_t vres,
        const frsh_signal_t signal_to_notify,
@@ -219,13 +220,15 @@ int frsh_contract_renegotiate_async(const frsh_contract_t *new_contract,
 
 {
        /* check for framework initialization and arguments */
-       if (!frsh_initialized)
+       /*if (!frsh_initialized)
                PERROR_AND_RETURN(FRSH_ERR_NOT_INITIALIZED,
                                "can't proceed before initializing FRSH with 'frsh_init()'!");
-
+       */
        return FRSH_NO_ERROR;
 }
 
+#endif
+
 #if 0
 /////////////////////////////////////////////////////////////
 // G R O U P   O F   C O N T R A C T S   O P E R A T I O N S
@@ -367,4 +370,5 @@ int frsh_contract_release(frsh_contract_handle_t contract)
 {
 
 }
-i#endif
+
+#endif
index de4fbd3774943b5956e5ce490b241d8cd50e0dc4..24f76457ccad74e6c02443a7828336e8c1cb6c00 100644 (file)
@@ -74,6 +74,8 @@
 #define FRSH_CONTRACT_H
 
 #include "frsh_time_types.h"
+#include "frsh_error.h"
+//#include "fosa_time.h"
 
 //FRSH_CPP_BEGIN_DECLS
 
@@ -135,6 +137,7 @@ typedef enum {
 } frsh_contract_type_t;
 
 // The name of this constant has been updated to have the FRSH_ prefix
+#define FRSH_CONTRACT_LABEL_MAXLENGTH 30
 typedef char frsh_contract_label_t[FRSH_CONTRACT_LABEL_MAXLENGTH + 1];
 
 typedef struct frsh_contract_basic_params {
index bdff34813320cbcb65b585cceda5a953d69b314a..7c82cc0b20f98b346e02b363ed494f7e1fc126ea 100644 (file)
 
 #include <stdio.h>
 #include <string.h>
-
-#include "frsh.h"
-#include "frsh_internal.h"
-
+#include "frsh_error.h"
+//#include "frsh_time.h"
 
 ////////////////////////////////////////////////////////////////////////
 //           ERROR REPORTING
@@ -84,8 +82,8 @@ int global_error_condition = 0;
 
 /* These variables get initialised in frsh_init() */
 /**************************************************/
-fosa_abs_time_t frsh_trace_init_timespec;
-long frsh_trace_init_timemsec = -1;
+//fosa_abs_time_t frsh_trace_init_timespec;
+//long frsh_trace_init_timemsec = -1;
 
 
 //error codes to message section
index 72510388a65bd28c12d7d91e78f6202686370ea9..45d045fb88bd25f571c1977fb22b80fa817f0415 100644 (file)
@@ -69,7 +69,7 @@
 #ifndef        FRSH_TIME_TYPES_H_
 #define        FRSH_TIME_TYPES_H_
 
-
+#include "fosa_platform_values.h"
 /**
  * @file frsh_time_types.h
  **/
index 7b20d8d85df55d16d73e4867e618edee209e8c92..3d8a4a067e5e2417a358e730d24f3d79bd8eadfc 100644 (file)
@@ -1,3 +1,72 @@
+// -----------------------------------------------------------------------
+//  Copyright (C) 2006 - 2008 FRESCOR consortium partners:
+//
+//    Universidad de Cantabria,              SPAIN
+//    University of York,                    UK
+//    Scuola Superiore Sant'Anna,            ITALY
+//    Kaiserslautern University,             GERMANY
+//    Univ. Politécnica  Valencia,           SPAIN
+//    Czech Technical University in Prague,  CZECH REPUBLIC
+//    ENEA                                   SWEDEN
+//    Thales Communication S.A.              FRANCE
+//    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
+//        in part by the European Union Sixth Framework Programme
+//        The European Union is not liable of any use that may be
+//        made of this code.
+//
+//
+//  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
+//                       University of York, UK
+//
+//   FSF API web pages: http://marte.unican.es/fsf/docs
+//                      http://shark.sssup.it/contrib/first/docs/
+//
+//   This file is part of FRSH (FRescor ScHeduler)
+//
+//  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.
+//
+//  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_vres.c
+//==============================================
+//  ******** *******    ********  **      **
+//  **///// /**////**  **//////  /**     /**
+//  **      /**   /** /**        /**     /**
+//  ******* /*******  /********* /**********
+//  **////  /**///**  ////////** /**//////**
+//  **      /**  //**        /** /**     /**
+//  **      /**   //** ********  /**     /**
+//  //       //     // ////////   //      //
+//
+// FRSH(FRescor ScHeduler), pronounced "fresh"
+//==============================================
+
+#include "frsh_contract.h"
 
 /*
  * frsh_vres_get_contract(), get the contract associated to a vres
@@ -19,8 +88,8 @@
  */
 int frsh_vres_get_contract(const frsh_vres_id_t vres, frsh_contract_t *contract)
 {
-       if (!frsh_initialized)
-               FRSH_ERROR(FRSH_ERR_NOT_INITIALIZED);
+       /*if (!frsh_initialized)
+               FRSH_ERROR(FRSH_ERR_NOT_INITIALIZED);*/
        if (contract == NULL) 
                FRSH_ERROR(FRSH_ERR_BAD_ARGUMENT);
        
@@ -79,12 +148,12 @@ int frsh_vres_get_renegotiation_status (const frsh_vres_id_t vres,
 {
 
        /* check for framework initialization and arguments */
-       if (!frsh_initialized)
+       /*if (!frsh_initialized)
                PERROR_AND_RETURN(FRSH_ERR_NOT_INITIALIZED,
-                               "can't proceed before initializing FRSH with 'frsh_init()'!");
-       if (renegotiation_status == NULL)
+                               "can't proceed before initializing FRSH with 'frsh_init()'!");*/
+/*     if (renegotiation_status == NULL)
                PERROR_AND_RETURN(FRSH_ERR_BAD_ARGUMENT,
-                               "can't return status in a NULL renegotiation_status");
+                               "can't return status in a NULL renegotiation_status");*/
        /* prepare the message */
        return FRSH_NO_ERROR;
 }
@@ -113,4 +182,5 @@ int frsh_resource_get_vres_from_label(const frsh_contract_label_t contract_label
        const frsh_resource_id_t resource_id,
        frsh_vres_id_t *vres)
 {
+       return FRSH_NO_ERROR;
 }