#define _FOSA_TYPES_H_
#include "fosa_opaque_types.h"
-#include "frsh_fosa.h"
+/**
+ * @addtogroup threadandsignals
+ *
+ * @{
+ **/
+
+/* Coming from FRSH-FOSA */
+
+/** identifier of a FOSA thread **/
+typedef FOSA_THREAD_ID_T_OPAQUE fosa_thread_id_t;
+
+
+/** thread attributes object **/
+typedef FOSA_THREAD_ATTR_T_OPAQUE fosa_thread_attr_t;
+
+typedef FOSA_SIGNAL_T_OPAQUE fosa_signal_t;
+
+/**
+ * The type references a function that may become a thread's
+ * code
+ **/
+typedef void * (*fosa_thread_code_t) (void *);
+
+
+/** information associated to a signal **/
+#if defined(VIRTUAL_TIME)
+
+#include <vt_ose.h>
+typedef vt_posix_signal_info_t fosa_signal_info_t;
+
+#else
+
+typedef union {int sival_int; void * sival_ptr; } fosa_signal_info_t;
+/* typedef FOSA_SIGNAL_INFO_T_OPAQUE fosa_signal_info_t; */
+
+#endif
+
+/* @} */
+
+
/**
* @addtogroup clocksandtimers
*
* @{
**/
// a condition variable
+/** Mutex object. Attributes are handled by FOSA **/
+typedef FOSA_MUTEX_T_OPAQUE fosa_mutex_t;
+
typedef FOSA_COND_T_OPAQUE fosa_cond_t;
/*@}*/
typedef struct {
void (*init) (void * sched_data, void * arg);
void (*new_thread) (void * sched_data,
- frsh_thread_id_t thread,
+ fosa_thread_id_t thread,
fosa_ads_actions_t * actions,
struct timespec *current_time);
void (*thread_terminate) (void * sched_data,
- frsh_thread_id_t thread,
+ fosa_thread_id_t thread,
fosa_ads_actions_t * actions,
struct timespec *current_time);
void (*thread_ready) (void * sched_data,
- frsh_thread_id_t thread,
+ fosa_thread_id_t thread,
fosa_ads_actions_t * actions,
struct timespec *current_time);
void (*thread_block) (void * sched_data,
- frsh_thread_id_t thread,
+ fosa_thread_id_t thread,
fosa_ads_actions_t * actions,
struct timespec *current_time);
//void (*thread_yield) (void * sched_data,
- // frsh_thread_id_t thread,
+ // fosa_thread_id_t thread,
// fosa_ads_actions_t * actions,
// struct timespec *current_time);
void (*change_sched_param_thread) (void * sched_data,
- frsh_thread_id_t thread,
+ fosa_thread_id_t thread,
fosa_ads_actions_t * actions,
struct timespec *current_time);
//void msg_from_scheduler(void * sched_data,
// fosa_ads_actions_t * actions,
// struct timespec *current_time);
//void (*explicit_call) (void * sched_data,
- // frsh_thread_id_t thread,
+ // fosa_thread_id_t thread,
// int user_event_code,
// fosa_ads_actions_t * actions,
// struct timespec *current_time);
void (*explicit_call_with_data) (void * sched_data,
- frsh_thread_id_t thread,
+ fosa_thread_id_t thread,
const void * msg, size_t msg_size,
void *reply, size_t *reply_size,
fosa_ads_actions_t * actions,
struct timespec *current_time);
void (*notification_for_thread) (void * sched_data,
- frsh_thread_id_t thread,
+ fosa_thread_id_t thread,
fosa_clock_id_t clock,
fosa_ads_actions_t * actions,
struct timespec *current_time);
fosa_ads_actions_t * actions,
struct timespec *current_time);
void (*signal) (void * sched_data,
- frsh_signal_t signal,
- frsh_signal_info_t siginfo,
+ fosa_signal_t signal,
+ fosa_signal_info_t siginfo,
fosa_ads_actions_t * actions,
struct timespec *current_time);
//void (*priority_inherit) (void * sched_data,
- // frsh_thread_id_t thread,
+ // fosa_thread_id_t thread,
// int sched_priority,
// fosa_ads_actions_t * actions,
// struct timespec *current_time);
//void (*priority_uninherit) (void * sched_data,
- // frsh_thread_id_t thread,
+ // fosa_thread_id_t thread,
// int sched_priority,
// fosa_ads_actions_t * actions,
// struct timespec *current_time);
void (*appsched_error) (void * sched_data,
- frsh_thread_id_t thread,
+ fosa_thread_id_t thread,
fosa_ads_error_cause_t cause,
fosa_ads_actions_t * actions);
} fosa_ads_scheduler_ops_t;