]> rtime.felk.cvut.cz Git - frescor/fosa.git/blobdiff - include/fosa_types.h
Makefile: Add missing header file
[frescor/fosa.git] / include / fosa_types.h
index d46651a10055ef4f60ebbe49a506409f2b354f66..9abb16cf58ead18e6f5f6e1cf1a3d89a4b9ddd13 100644 (file)
@@ -1,11 +1,11 @@
-//----------------------------------------------------------------------
-//  Copyright (C) 2006 - 2007 by the FRESCOR consortium:
+// -----------------------------------------------------------------------
+//  Copyright (C) 2006 - 2009 FRESCOR consortium partners:
 //
 //    Universidad de Cantabria,              SPAIN
 //    University of York,                    UK
 //    Scuola Superiore Sant'Anna,            ITALY
 //    Kaiserslautern University,             GERMANY
-//    Univ. Politecnica  Valencia,           SPAIN
+//    Univ. Politécnica  Valencia,           SPAIN
 //    Czech Technical University in Prague,  CZECH REPUBLIC
 //    ENEA                                   SWEDEN
 //    Thales Communication S.A.              FRANCE
@@ -13,9 +13,9 @@
 //    Rapita Systems Ltd                     UK
 //    Evidence                               ITALY
 //
-//    See http://www.frescor.org
+//    See http://www.frescor.org for a link to partners' websites
 //
-//        The FRESCOR project (FP6/2005/IST/5-034026) is funded
+//           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.
 //                       Universidad de Cantabria, SPAIN
 //                       University of York, UK
 //
-// This file is part of FOSA (Frsh Operating System Abstraction)
+//   FSF API web pages: http://marte.unican.es/fsf/docs
+//                      http://shark.sssup.it/contrib/first/docs/
+//
+//   This file is part of FOSA (Frsh Operating System Adaption)
 //
-// FOSA 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.  FOSA 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 FOSA; see file
-// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
-// Cambridge, MA 02139, USA.
+//  FOSA 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.  FOSA 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 FOSA; see file
+//  COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
+//  Cambridge, MA 02139, USA.
 //
-// As a special exception, including FOSA header files in a file,
-// instantiating FOSA generics or templates, or linking other files
-// with FOSA 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.
+//  As a special exception, including FOSA header files in a file,
+//  instantiating FOSA generics or templates, or linking other files
+//  with FOSA 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.
 // -----------------------------------------------------------------------
 //fosa_types.h
 //==============================================
@@ -68,6 +71,9 @@
 #define        _FOSA_TYPES_H_
 
 #include "fosa_opaque_types.h"
+
+FOSA_CPP_BEGIN_DECLS
+
 /**
  * @addtogroup threadandsignals
  *
@@ -115,6 +121,10 @@ typedef union {int sival_int; void * sival_ptr; } fosa_signal_info_t;
  **/  
 // identifier of a clock
 // either a real-time clock or a cpu-time clock
+
+typedef FOSA_REL_TIME_T_OPAQUE fosa_rel_time_t;
+typedef FOSA_ABS_TIME_T_OPAQUE fosa_abs_time_t;
+
 typedef    FOSA_CLOCK_ID_T_OPAQUE    fosa_clock_id_t;
 
 #define FOSA_SYSTEM_CLOCK   FOSA_SYSTEM_CLOCK_OPAQUE
@@ -321,66 +331,66 @@ typedef struct {
    void (*new_thread) (void * sched_data,
             fosa_thread_id_t thread,
             fosa_ads_actions_t * actions,
-            struct timespec *current_time);
+            fosa_abs_time_t *current_time);
    void (*thread_terminate) (void * sched_data,
             fosa_thread_id_t thread,
             fosa_ads_actions_t * actions,
-            struct timespec *current_time);
+            fosa_abs_time_t *current_time);
    void (*thread_ready) (void * sched_data,
             fosa_thread_id_t thread,
             fosa_ads_actions_t * actions,
-            struct timespec *current_time);
+            fosa_abs_time_t *current_time);
    void (*thread_block) (void * sched_data,
             fosa_thread_id_t thread,
             fosa_ads_actions_t * actions,
-            struct timespec *current_time);
+            fosa_abs_time_t *current_time);
   //void (*thread_yield) (void * sched_data,
   //          fosa_thread_id_t thread,
   //          fosa_ads_actions_t * actions,
-  //          struct timespec *current_time);
+  //          fosa_abs_time_t *current_time);
    void (*change_sched_param_thread) (void * sched_data,
             fosa_thread_id_t thread,
             fosa_ads_actions_t * actions,
-            struct timespec *current_time);
+            fosa_abs_time_t *current_time);
   //void msg_from_scheduler(void * sched_data,
   //          fosa_ads_scheduler_id_t scheduler_id,
   //          const void * msg, size_t msg_size,
   //          fosa_ads_actions_t * actions,
-  //          struct timespec *current_time);
+  //          fosa_bas_time_t *current_time);
   //void (*explicit_call) (void * sched_data,
   //          fosa_thread_id_t thread,
   //         int user_event_code,
   //         fosa_ads_actions_t * actions,
-  //         struct timespec *current_time);
+  //         fosa_abs_time_t *current_time);
   void (*explicit_call_with_data) (void * sched_data,
            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);
+           fosa_abs_time_t *current_time);
   void (*notification_for_thread) (void * sched_data,
            fosa_thread_id_t thread,
            fosa_clock_id_t clock,
            fosa_ads_actions_t * actions,
-           struct timespec *current_time);
+           fosa_abs_time_t *current_time);
   void (*timeout) (void * sched_data,
            fosa_ads_actions_t * actions,
-           struct timespec *current_time);
+           fosa_abs_time_t *current_time);
   void (*signal) (void * sched_data,
           fosa_signal_t signal,
            fosa_signal_info_t siginfo,
            fosa_ads_actions_t * actions,
-           struct timespec *current_time);
+           fosa_abs_time_t *current_time);
   //void (*priority_inherit) (void * sched_data,
   //         fosa_thread_id_t thread,
   //         int sched_priority,
   //         fosa_ads_actions_t * actions,
-  //         struct timespec *current_time);
+  //         fosa_abs_time_t *current_time);
   //void (*priority_uninherit) (void * sched_data,
   //         fosa_thread_id_t thread,
   //         int sched_priority,
   //         fosa_ads_actions_t * actions,
-  //         struct timespec *current_time);
+  //         fosa_abs_time_t *current_time);
   void (*appsched_error) (void * sched_data,
           fosa_thread_id_t thread,
           fosa_ads_error_cause_t cause,
@@ -403,6 +413,21 @@ typedef struct {
 typedef     FOSA_LONG_JUMP_CONTEXT_T_OPAQUE    fosa_long_jump_context_t; 
 
 
+/*********************
+ *   GROUP CLOCKS
+ *********************/
+/**
+ * @addtogroup threadgroups
+ *
+ * @{
+ **/  
+typedef FOSA_THREAD_SET_ID_T_OPAQUE fosa_thread_set_id_t;
+
+#define FOSA_NULL_THREAD_SET_ID  FOSA_NULL_THREAD_SET_ID_OPAQUE 
+
+/*@}*/
+
+FOSA_CPP_END_DECLS
 
 
 #endif // _FOSA_TYPES_H_