#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
#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
#include <unistd.h>
+FRSH_CPP_BEGIN_DECLS
+
/**
* @file frsh_configuration_parameters.h
*
/*@}*/
+FRSH_CPP_END_DECLS
+
#endif /* _FRSH_CONFIGURATION_PARAMETERS_H_ */
#include "frsh_core_types.h"
#include "frsh_spare_capacity.h"
+
+FRSH_CPP_BEGIN_DECLS
+
/**
* @defgroup core Core module
*
//threads
-
-
+FRSH_CPP_END_DECLS
#endif // _FRSH_CORE_H_
#include "frsh_distributed_types.h"
#include "frsh_error.h"
+FRSH_CPP_BEGIN_DECLS
+
/**
* @file frsh_core_types.h
**/
/*@}*/
+FRSH_CPP_END_DECLS
#endif /* !FRSH_CORE_TYPES_H_ */
--- /dev/null
+#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_
+
#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
**/
void FRSH_TRACE(bool is_active, const char *format, ...);
+FRSH_CPP_END_DECLS
+
#endif
#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;
#define FRSH_TRACE_POINT_ID_MAX 10
-
-
+FRSH_CPP_END_DECLS
#endif /* !FRSH_DEBUG_AND_TRACE_TYPES_H_ */
#ifndef _FRSH_DISTRIBUTED_H_
#define _FRSH_DISTRIBUTED_H_
+
/**
* @file frsh_distributed.h
**/
#include "frsh_distributed_types.h"
#include "frsh_core_types.h"
+FRSH_CPP_BEGIN_DECLS
+
/**
* @defgroup distributed Distributed module
*
/*@}*/
+FRSH_CPP_END_DECLS
+
#endif // _FRSH_DISTRIBUTED_H_
#include "frsh_opaque_types.h"
+FRSH_CPP_BEGIN_DECLS
+
/**
* @addtogroup distributed
*
/*@}*/
+FRSH_CPP_END_DECLS
+
#endif /* !FRSH_DISTRIBUTED_TYPES_H_ */
#include "frsh_energy_management_types.h"
#include "frsh_core_types.h"
+FRSH_CPP_BEGIN_DECLS
#define FRSH_ENERGY_MANAGEMENT_MODULE_SUPPORTED 1
/*@}*/
+FRSH_CPP_END_DECLS
+
#endif /* _FRSH_ENERGY_MANAGEMENT_H_ */
#include <time.h>
#include "frsh_core_types.h"
+FRSH_CPP_BEGIN_DECLS
+
/**
* @file frsh_energy_management_types.h
**/
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_ */
//#include "frsh_feedback_control_types.h"
#include "frsh_core_types.h"
+FRSH_CPP_BEGIN_DECLS
#define FRSH_FEEDBACKCTRL_MODULE_SUPPORTED 1
/*@}*/
+
+FRSH_CPP_END_DECLS
+
#endif
#include "frsh_opaque_types.h"
#include "frsh_configuration_parameters.h"
+FRSH_CPP_BEGIN_DECLS
/**
* @file frsh_feedback_control_types.h
**/
/*@}*/
+FRSH_CPP_END_DECLS
+
#endif /* !FRSH_FEEDBACK_CONTROL_TYPES_H_ */
#include "frsh_hierarchical_types.h"
#include "frsh_core.h"
+FRSH_CPP_BEGIN_DECLS
#define FRSH_HIERARCHICAL_MODULE_SUPPORTED 1
/*}*/
+FRSH_CPP_END_DECLS
+
#endif // _FRSH_HIERARCHICAL_H_
#include <time.h>
+FRSH_CPP_BEGIN_DECLS
+
/**
* @addtogroup hierarchical
*
/*}*/
+FRSH_CPP_END_DECLS
+
#endif /* !FRSH_HIERARCHICAL_TYPES_H_ */
#define FRSH_IMPLEMENTATION_SPECIFIC_MODULE_SUPPORTED 1
+FRSH_CPP_BEGIN_DECLS
+
/**
* @file frsh_implementation_specific.h
*
/*@}*/
+FRSH_CPP_END_DECLS
#endif // _FRSH_IMPLEMENTATION_SPECIFIC_H_
#ifndef FRSH_IMPLEMENTATION_SPECIFIC_TYPES_H_
#define FRSH_IMPLEMENTATION_SPECIFIC_TYPES_H_
+FRSH_CPP_BEGIN_DECLS
+
/**
* @file frsh_implementation_specific_types.h
**/
/*@}*/
+FRSH_CPP_END_DECLS
+
#endif /* !FRSH_IMPLEMENTATION_SPECIFIC_TYPES_H_ */
#define FRSH_MEMORY_MANAGEMENT_SUPPORTED 1
+FRSH_CPP_BEGIN_DECLS
+
/**
* @file frsh_memory_management.h
**/
/*@}*/
+FRSH_CPP_END_DECLS
+
#endif /* !FRSH_MEMORY_MANAGEMENT_H_ */
#ifndef _FRSH_OPAQUE_TYPES_H_
#define _FRSH_OPAQUE_TYPES_H_
+FRSH_CPP_BEGIN_DECLS
/**
* @file frsh_opaque_types.h
/*@}*/
+FRSH_CPP_END_DECLS
+
#endif // _FRSH_OPAQUE_TYPES_H_
#include "frsh_shared_objects_types.h"
#include "frsh_core_types.h"
+FRSH_CPP_BEGIN_DECLS
#define FRSH_SHAREDOBJS_MODULE_SUPPORTED 1
/*@}*/ /* For shared_objects group */
+FRSH_CPP_END_DECLS
+
#endif // _FRSH_SHARED_OBJECTS_H_
#include "frsh_opaque_types.h"
#include "frsh_configuration_parameters.h"
+FRSH_CPP_BEGIN_DECLS
+
/**
* @file frsh_shared_objects_types.h
**/
/*@}*/
+
+FRSH_CPP_END_DECLS
+
#endif /* !FRSH_SHARED_OBJECTS_TYPES_H_ */
#include "frsh_core_types.h"
#include "frsh_core.h"
+FRSH_CPP_BEGIN_DECLS
/**
* @file frsh_spare_capacity.h
/*@}*/
+FRSH_CPP_END_DECLS
+
#endif // _FRSH_SPARE_CAPACITY_H_
#include <time.h>
+FRSH_CPP_BEGIN_DECLS
+
/**
* @file frsh_spare_capacity_types.h
**/
(frsh_utilization_set_t *)NULL
/*@}*/
+
+FRSH_CPP_END_DECLS
+
+
#endif /* !FRSH_SPARE_CAPACITY_TYPES_H_ */
#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
**/
/*@}*/
+FRSH_CPP_END_DECLS
#endif
#ifndef FRSH_TIME_H_
#define FRSH_TIME_H_
+#include <frsh_core_types.h>
+#include <frsh_core.h>
+
+FRSH_CPP_BEGIN_DECLS
+
/**
* frsh_eat()
*
fosa_eat(cpu_time);
}
+FRSH_CPP_END_DECLS
#endif /* !FOSA_TIME_H_ */