]> rtime.felk.cvut.cz Git - frescor/frsh-include.git/commitdiff
Adding FRSH_CPP_BEGIN|END_DECLS to public .h files
authortelleriam <telleriam@35b4ef3e-fd22-0410-ab77-dab3279adceb>
Wed, 20 Feb 2008 15:49:37 +0000 (15:49 +0000)
committertelleriam <telleriam@35b4ef3e-fd22-0410-ab77-dab3279adceb>
Wed, 20 Feb 2008 15:49:37 +0000 (15:49 +0000)
git-svn-id: http://www.frescor.org/private/svn/frescor/frsh/trunk/include@1024 35b4ef3e-fd22-0410-ab77-dab3279adceb

26 files changed:
eat.h
frsh.h
frsh_configuration_parameters.h
frsh_core.h
frsh_core_types.h
frsh_cpp_macros.h [new file with mode: 0644]
frsh_debug_and_trace.h
frsh_debug_and_trace_types.h
frsh_distributed.h
frsh_distributed_types.h
frsh_energy_management.h
frsh_energy_management_types.h
frsh_feedback_control.h
frsh_feedback_control_types.h
frsh_hierarchical.h
frsh_hierarchical_types.h
frsh_implementation_specific.h
frsh_implementation_specific_types.h
frsh_memory_management.h
frsh_opaque_types.h
frsh_shared_objects.h
frsh_shared_objects_types.h
frsh_spare_capacity.h
frsh_spare_capacity_types.h
frsh_thread_attrs.h
frsh_time.h

diff --git a/eat.h b/eat.h
index c7795d5e04be72cb58e9e45d4f76f85b107c5791..00ed323ae4f002416ba4c7ea2736040ffdd8e3e8 100644 (file)
--- a/eat.h
+++ b/eat.h
 #ifndef _EAT_H
 #define _EAT_H
 
+
 #include <time.h>
+#include <frsh_cpp_macros.h>
 
+FRSH_CPP_BEGIN_DECLS
 /**
  * @file eat.h
  **/
 
 extern void inline eat(const struct timespec *cpu_time);
 
+FRSH_CPP_END_DECLS
+
 #endif
diff --git a/frsh.h b/frsh.h
index 5190444b2ac820770a5b2bd0f49c44f20d65e23a..fde0fdcfd0d933d39cd5fd98595f66a49d8efcba 100644 (file)
--- a/frsh.h
+++ b/frsh.h
@@ -86,6 +86,8 @@
 
 #include "fosa.h"
 
+#include "frsh_cpp_macros.h"
+
 #include "frsh_configuration_parameters.h"
 
 /* We include all the types because they are needed for the
 #include "frsh_memory_management.h"
 #include "frsh_energy_management.h"
 
+#include "frsh_debug_and_trace.h"
 
 #ifndef FRSH_HIERARCHICAL_MODULE_SUPPORTED
     #define FRSH_HIERARCHICAL_MODULE_SUPPORTED        0
index e2504cf89340c536ab548adc33e6b04691a25328..fe9e0ee93da17c5afbf0df9022e67512b2b678a4 100644 (file)
@@ -73,6 +73,8 @@
 
 #include <unistd.h>
 
+FRSH_CPP_BEGIN_DECLS
+
 /**
  * @file frsh_configuration_parameters.h
  *
@@ -356,5 +358,7 @@ int frsh_priority_map (unsigned long plevel);
 
 /*@}*/
 
+FRSH_CPP_END_DECLS
+
 #endif /* _FRSH_CONFIGURATION_PARAMETERS_H_ */
 
index 549bd1a4b0a1b8e8a3575edbc8d9b2d252a2d836..d3db7dbdcdb35c131ac4264f4527b2d46a14cd73 100644 (file)
@@ -84,6 +84,9 @@
 #include "frsh_core_types.h"
 #include "frsh_spare_capacity.h"
 
+
+FRSH_CPP_BEGIN_DECLS
+
 /**
  * @defgroup core Core module
  *
@@ -1521,7 +1524,6 @@ int frsh_service_thread_get_data
 //threads
 
 
-
-
+FRSH_CPP_END_DECLS
 
 #endif // _FRSH_CORE_H_
index 1afe99b754c6be085e9b43bb242ca359bd04e364..e727fdd9cce111f586e42a87900aca25cd2e679c 100644 (file)
@@ -84,6 +84,8 @@
 #include "frsh_distributed_types.h"
 #include "frsh_error.h"
 
+FRSH_CPP_BEGIN_DECLS
+
 /**
  * @file frsh_core_types.h
  **/
@@ -211,5 +213,6 @@ typedef FRSH_SYNCHOBJ_HANDLE_T_OPAQUE frsh_synchobj_handle_t;
 
 /*@}*/
 
+FRSH_CPP_END_DECLS
 
 #endif   /* !FRSH_CORE_TYPES_H_ */
diff --git a/frsh_cpp_macros.h b/frsh_cpp_macros.h
new file mode 100644 (file)
index 0000000..5664162
--- /dev/null
@@ -0,0 +1,17 @@
+#ifndef _FRSH_CPP_MACROS_H_
+#define _FRSH_CPP_MACROS_H_
+
+#if defined(__cplusplus)
+#define FRSH_CPP_BEGIN_DECLS  extern "C" {
+#else
+#define FRSH_CPP_BEGIN_DECLS
+#endif
+
+#if defined(__cplusplus)
+#define FRSH_CPP_END_DECLS }
+#else
+#define FRSH_CPP_END_DECLS
+#endif
+
+#endif // _FRSH_CPP_MACROS_H_
index ad03ff431c832c4d191679bd689656d12dd35c31..9d19e9ef4457646e467f9a46098f8629b9eaf188 100644 (file)
@@ -82,6 +82,8 @@
 #include "fosa_configuration_parameters.h" /* FOSA_CLOCK_REALTIME */
 #include "fosa_clocks_and_timers.h"
 
+FRSH_CPP_BEGIN_DECLS
+
 // Tune the following FLAGS to select the debugging messages to be generated
 #define FRSH_TRACE_CALLBACKS false
 #define FRSH_TRACE_SERVICE_TH false
@@ -158,4 +160,6 @@ static inline long int FRSH_TIMESPEC_TO_RELATIVE_MSECS(const struct timespec *ts
  **/
 void FRSH_TRACE(bool is_active, const char *format, ...);
 
+FRSH_CPP_END_DECLS
+
 #endif
index 1f9c90232469b612fd80f2c23e75772553a40082..ab3c16448e261fa57f22e5c8a516cc3234dfed67 100644 (file)
@@ -74,6 +74,8 @@
 #ifndef        FRSH_DEBUG_AND_TRACE_TYPES_H_
 #define        FRSH_DEBUG_AND_TRACE_TYPES_H_
 
+FRSH_CPP_BEGIN_DECLS
+
 /**  identifier of a trace point **/
 typedef int frsh_trace_point_id_t;
 
@@ -82,7 +84,6 @@ typedef int frsh_trace_point_id_t;
 #define FRSH_TRACE_POINT_ID_MAX 10
 
 
-
-
+FRSH_CPP_END_DECLS
 
 #endif             /* !FRSH_DEBUG_AND_TRACE_TYPES_H_ */
index bb501e25180e6ff5b4f9bef4ef2c16ca94a25cc5..1c5e4ca0438fc58ccbc97ff85f9612011aa2c672 100644 (file)
@@ -71,6 +71,7 @@
 #ifndef _FRSH_DISTRIBUTED_H_
 #define _FRSH_DISTRIBUTED_H_
 
+
 /**
  * @file frsh_distributed.h
  **/
@@ -79,6 +80,8 @@
 #include "frsh_distributed_types.h"
 #include "frsh_core_types.h"
 
+FRSH_CPP_BEGIN_DECLS
+
 /**
  * @defgroup distributed Distributed module
  *
@@ -714,4 +717,6 @@ int frsh_receive_endpoint_get_status
 
 /*@}*/
 
+FRSH_CPP_END_DECLS
+
 #endif // _FRSH_DISTRIBUTED_H_
index 7b87887983ad2866296bff72a0ff03113451893d..dcd774b6b9cd73d84b9cc5b7e9b4bbe988d0f6aa 100644 (file)
@@ -78,6 +78,8 @@
 
 #include "frsh_opaque_types.h"
 
+FRSH_CPP_BEGIN_DECLS
+
 /**
  * @addtogroup distributed
  *
@@ -171,4 +173,6 @@ typedef enum {
 
 /*@}*/
 
+FRSH_CPP_END_DECLS
+
 #endif  /* !FRSH_DISTRIBUTED_TYPES_H_ */
index b7287e1031b4579af655cee78fe291d9abe5bf60..626c22606505666ee3abbf80ec3e67a12080f559 100644 (file)
@@ -78,6 +78,7 @@
 #include "frsh_energy_management_types.h"
 #include "frsh_core_types.h"
 
+FRSH_CPP_BEGIN_DECLS
 
 #define FRSH_ENERGY_MANAGEMENT_MODULE_SUPPORTED       1
 
@@ -280,4 +281,6 @@ int frsh_battery_get_expiration(struct timespec *expiration);
 
 /*@}*/
 
+FRSH_CPP_END_DECLS
+
 #endif             /* _FRSH_ENERGY_MANAGEMENT_H_ */
index 63e147d3b1a69cc217971da63d3dc80d951a83e1..212a4c14f9653aca7cd9a11e5482232e3abdd277 100644 (file)
@@ -74,6 +74,8 @@
 #include <time.h>
 #include "frsh_core_types.h"
 
+FRSH_CPP_BEGIN_DECLS
+
 /**
  * @file frsh_energy_management_types.h
  **/
@@ -114,5 +116,6 @@ typedef struct {
     frsh_utilization_line_pow_t utilizations[FRSH_MAX_N_UTILIZATION_VALUES];
 } frsh_utilization_set_pow_t;
 
+FRSH_CPP_END_DECLS
 
 #endif             /* !FRSH_ENERGY_MANAGEMENT_TYPES_H_ */
index a655a5d922a047b97fc2c6434a86b5de90bd5f8a..af697fcce3d5117bd0da374a7c9604d1145c9e71 100644 (file)
@@ -78,6 +78,7 @@
 //#include "frsh_feedback_control_types.h"
 #include "frsh_core_types.h"
 
+FRSH_CPP_BEGIN_DECLS
 
 #define FRSH_FEEDBACKCTRL_MODULE_SUPPORTED       1
 
@@ -208,4 +209,7 @@ int frsh_feedback_get_actual_budget(frsh_vres_id_t vres_id, struct timespec *bud
 
 /*@}*/
 
+
+FRSH_CPP_END_DECLS
+
 #endif
index fedb8f8b464da1350115e140eec92d64e11f9f80..a98df8b2b738e753333a6bd22e04f29e212ca86a 100644 (file)
@@ -76,6 +76,7 @@
 #include "frsh_opaque_types.h"
 #include "frsh_configuration_parameters.h"
 
+FRSH_CPP_BEGIN_DECLS
 /**
  * @file frsh_feedback_control_types.h
  **/
@@ -94,4 +95,6 @@ typedef int frsh_spare_subset_t;
 
 /*@}*/
 
+FRSH_CPP_END_DECLS
+
 #endif             /* !FRSH_FEEDBACK_CONTROL_TYPES_H_ */
index ea04e229c29b26cc71d202a025e0d65d4087b52d..179ce0283a733e07294f76f6c2e45787570d36ca 100644 (file)
@@ -76,6 +76,7 @@
 #include "frsh_hierarchical_types.h"
 #include "frsh_core.h"
 
+FRSH_CPP_BEGIN_DECLS
 
 #define FRSH_HIERARCHICAL_MODULE_SUPPORTED       1
 
@@ -272,4 +273,6 @@ int frsh_thread_get_local_sched_params(frsh_thread_id_t            thread,
 
 /*}*/
 
+FRSH_CPP_END_DECLS
+
 #endif // _FRSH_HIERARCHICAL_H_
index c2b76d9d774e132e818f94bfaa06b2e321b69f74..ee2d16ec543160a226edfa8789e965fec5c0f8dc 100644 (file)
@@ -77,6 +77,8 @@
 
 #include <time.h>
 
+FRSH_CPP_BEGIN_DECLS
+
 /**
  * @addtogroup hierarchical
  *
@@ -137,4 +139,6 @@ typedef void * frsh_sched_init_info_t;
 
 /*}*/
 
+FRSH_CPP_END_DECLS
+
 #endif             /* !FRSH_HIERARCHICAL_TYPES_H_ */
index 3ba3009f81f4e081b8ae97bc4e6abe38d4b0c3dc..9af328d3d0f0b343cd32a2bfde8dc3b0817bf9c1 100644 (file)
@@ -76,6 +76,8 @@
 
 #define FRSH_IMPLEMENTATION_SPECIFIC_MODULE_SUPPORTED     1
 
+FRSH_CPP_BEGIN_DECLS
+
 /**
  * @file frsh_implementation_specific.h
  *
@@ -210,5 +212,6 @@ int frsh_sharedobj_get_preemption_level(frsh_sharedobj_handle_t  obj_handle,
 
 /*@}*/
 
+FRSH_CPP_END_DECLS
 
 #endif // _FRSH_IMPLEMENTATION_SPECIFIC_H_
index 8383dab5eb328eed1429becf83464e0725c23037..aadbd1a46e7cd8b7dd27416ce15a1253a5f7e0d3 100644 (file)
@@ -72,6 +72,8 @@
 #ifndef        FRSH_IMPLEMENTATION_SPECIFIC_TYPES_H_
 #define        FRSH_IMPLEMENTATION_SPECIFIC_TYPES_H_
 
+FRSH_CPP_BEGIN_DECLS
+
 /**
  * @file frsh_implementation_specific_types.h
  **/
@@ -87,5 +89,7 @@ typedef unsigned long frsh_preemption_level_t; // range 1..2**32-1
 
 /*@}*/
 
+FRSH_CPP_END_DECLS
+
 
 #endif             /* !FRSH_IMPLEMENTATION_SPECIFIC_TYPES_H_ */
index f0577fa2fc9d6d7cbe06435ce393f9f7c7d4c3fd..c5d3bc33920ed1f9520a59affe1505bacbabfbb1 100644 (file)
@@ -78,6 +78,8 @@
 
 #define FRSH_MEMORY_MANAGEMENT_SUPPORTED 1
 
+FRSH_CPP_BEGIN_DECLS
+
 /**
  * @file frsh_memory_management.h
  **/
@@ -186,4 +188,6 @@ int frsh_vres_memfree(frsh_vres_id_t vres_id,
 
 /*@}*/
 
+FRSH_CPP_END_DECLS
+
 #endif             /* !FRSH_MEMORY_MANAGEMENT_H_ */
index e12a8ad51e1e73418391beea3d33c89c2c84eae5..c6ee66d411d3d018acae9911b05569c171d30bc5 100644 (file)
@@ -73,6 +73,7 @@
 #ifndef _FRSH_OPAQUE_TYPES_H_
 #define _FRSH_OPAQUE_TYPES_H_
 
+FRSH_CPP_BEGIN_DECLS
 
 /**
  * @file frsh_opaque_types.h
@@ -234,4 +235,6 @@ typedef int FRSH_RECEIVE_ENDPOINT_T_OPAQUE;
 
 /*@}*/
 
+FRSH_CPP_END_DECLS
+
 #endif // _FRSH_OPAQUE_TYPES_H_
index f48dc9d5cb35f7d2baf968cc65cfd9bdeb6bd755..6492aad21cc7dca65b929f1906e237ff333635cd 100644 (file)
@@ -76,6 +76,7 @@
 #include "frsh_shared_objects_types.h"
 #include "frsh_core_types.h"
 
+FRSH_CPP_BEGIN_DECLS
 
 #define FRSH_SHAREDOBJS_MODULE_SUPPORTED       1
 
@@ -702,4 +703,6 @@ int frsh_contract_get_csects
 
 /*@}*/ /* For shared_objects group */
 
+FRSH_CPP_END_DECLS
+
 #endif // _FRSH_SHARED_OBJECTS_H_
index 8287b22aef7a2153eb069db53d951f194259874d..b0f86669795e8edd31ec09546cd5c9d1cdf67359 100644 (file)
@@ -76,6 +76,8 @@
 #include "frsh_opaque_types.h"
 #include "frsh_configuration_parameters.h"
 
+FRSH_CPP_BEGIN_DECLS
+
 /**
  * @file frsh_shared_objects_types.h
  **/
@@ -157,4 +159,7 @@ typedef struct {
 
 /*@}*/
 
+
+FRSH_CPP_END_DECLS
+
 #endif             /* !FRSH_SHARED_OBJECTS_TYPES_H_ */
index 2b14098631fa84fc77ea3310b08e9ba53b0d63b0..700797ce426bb72bdff1090ad6ad88cb143b8288 100644 (file)
@@ -77,6 +77,7 @@
 #include "frsh_core_types.h"
 #include "frsh_core.h"
 
+FRSH_CPP_BEGIN_DECLS
 
 /**
  * @file frsh_spare_capacity.h
@@ -340,4 +341,6 @@ int frsh_vres_decrease_capacity(frsh_vres_id_t vres,
 
 /*@}*/
 
+FRSH_CPP_END_DECLS
+
 #endif // _FRSH_SPARE_CAPACITY_H_
index 9da5c84063094bd253114cec55ed15a4e17462db..d002aa999842d2b7fcfca9bb708bff3c77215a53 100644 (file)
@@ -74,6 +74,8 @@
 
 #include <time.h>
 
+FRSH_CPP_BEGIN_DECLS
+
 /**
  * @file frsh_spare_capacity_types.h
  **/
@@ -114,4 +116,8 @@ typedef struct {
    (frsh_utilization_set_t *)NULL
 
 /*@}*/
+
+FRSH_CPP_END_DECLS
+
+
 #endif             /* !FRSH_SPARE_CAPACITY_TYPES_H_ */
index 014bdb640f3484d32157182a0f66f832f85ff061..562b2c8be552ece7860d1cfb9e10ff3a7c253f9b 100644 (file)
 #ifndef _FRSH_THREADS_H_
 #define _FRSH_THREADS_H_
 
+#include "frsh_core_types.h"
+#include "frsh_core.h"
+
+FRSH_CPP_BEGIN_DECLS
+
 /**
  * @file frsh_thread_attrs.h
  **/
@@ -161,6 +166,7 @@ static inline int frsh_thread_attr_get_stacksize
 
 /*@}*/
 
+FRSH_CPP_END_DECLS
  
 #endif
 
index a2eb6aee97aa8b728d9d8bfb98f70fb902a109d9..8e71621e895825ffdee1c4a08e6280d542df0960 100644 (file)
 #ifndef        FRSH_TIME_H_
 #define        FRSH_TIME_H_
 
+#include <frsh_core_types.h>
+#include <frsh_core.h>
+
+FRSH_CPP_BEGIN_DECLS
+
 /**
  * frsh_eat()
  *
@@ -20,5 +25,6 @@ static void inline frsh_eat(const struct timespec *cpu_time)
     fosa_eat(cpu_time);
 }
 
+FRSH_CPP_END_DECLS
 
 #endif             /* !FOSA_TIME_H_ */