]> rtime.felk.cvut.cz Git - frescor/fwp.git/commitdiff
Compilation fixes of aquosa cpu module
authorMartin <molnar@sum.(none)>
Mon, 22 Sep 2008 16:42:24 +0000 (18:42 +0200)
committerMartin <molnar@sum.(none)>
Mon, 22 Sep 2008 16:42:24 +0000 (18:42 +0200)
frsh_aquosa/Makefile.omk
frsh_aquosa/core.c

index 7dacc6e3fa8a856a16223c5fbb2b2b24a5a878a0..d56941bc4d2506b9e8d3ed980deb23edad60c8eb 100644 (file)
@@ -1,8 +1,6 @@
 lib_LIBRARIES = frsh_aquosa
-SUBDIRS = aquosa
+CFLAGS += -I /usr/local/aquosa/include
 frsh_aquosa_SOURCES += core.c cpu_contract.c 
-include_HEADERS += cpu_contract.h 
-include_HEADERS +=$(wildcard aquosa/qresmod/*.h)
-include_HEADERS +=$(wildcard aquosa/rresmod/*.h)
-
-lib_LOADLIBES+= frsh
+include_HEADERS += cpu_contract.h timespec_usec_ops.h 
+#include_HEADERS +=$(wildcard aquosa/qresmod/*.h)
+#include_HEADERS +=$(wildcard aquosa/rresmod/*.h)
index 18ef48e7224edd1a08164216a44357ebba2ad5ca..dc7135247b6b0f801fb8cf09d4aab81c389a5d1c 100644 (file)
@@ -94,9 +94,6 @@
  * AQuoSA will be in place
  */
 
-/*******************/
-/* I N C L U D E S */
-/*******************/
 
 /* Linux files */
 #include <unistd.h>
 
 /* FRSH files */
 #include "fosa.h"
+#include "frsh_error.h"
 
 /* AQuoSA files */
-#include "qres_lib.h"
-#include "qsup_lib.h"
+#include "aquosa/qres_lib.h"
+#include "aquosa/qsup_lib.h"
 
 /* local timepsec <-> usec utility macros */
-#include "frsh_time_extras.h"
+#include "timespec_usec_ops.h"
 
-/***********************************/
-/* G L O B A L   V A R I A B L E S */
-/***********************************/
+static int aqcpu_initialized = 0;              /* initialization flag */
+/*
+ * Test whether Aquosa Cpu modue is initialized 
+ *
+ */
+
+static inline int aqcpu_is_initialized()
+{
+       return (aqcpu_initialized == 1);
+}
 
-//int frsh_initialized = 0;            /* framework initialization flag */
+
+/*
+ * installed as an exit handler (with 'atexit()') by the initialization
+ * code... For now it only calls the cleanup function of the AQuoSA
+ * Framework
+ */
+static void aqcpu_cleanup_wrapper() {
+       return qres_cleanup();
+}
 
 /*
  * frsh_init(), initialize FRSH for the calling process
  *  FRSH_ERR_INTERNAL_ERROR (something, different from the previous case, gone wrong)
  */
 
-/* forward declarations, see below ... */
-static void frsh_qres_cleanup_wrapper();
 
-int frsh_aquosa_init()
+int aqcpu_init()
 {
        /* check FRSH is not already initialized */
        /*if (frsh_initialized)
@@ -162,22 +173,12 @@ int frsh_aquosa_init()
 
        /* install the cleanup function of th AQuoSA framework as an exit
         * handler function (quite futile but, for now, it's sufficent) */
-       if (atexit(frsh_qres_cleanup_wrapper))
+       if (atexit(aqcpu_cleanup_wrapper))
                FRSH_ERR_RET(FRSH_ERR_INTERNAL_ERROR);
 
        return FRSH_NO_ERROR;
 }
 
-/*
- * installed as an exit handler (with 'atexit()') by the initialization
- * code... For now it only calls the cleanup function of the AQuoSA
- * Framework
- */
-static void frsh_qres_cleanup_wrapper() {
-       if (qres_cleanup() != QOS_OK)
-               PERROR_FRESCOR(FRSH_ERR_INTERNAL_ERROR,
-                       "WARNING: error during clenup of AQuoSA framework");
-}
 
 /*
  * frsh_thread_bind(), create a new thread and bind it to a vres