]> rtime.felk.cvut.cz Git - frescor/frsh-include.git/blob - frsh_hierarchical_types.h
resource_id is unsigned int
[frescor/frsh-include.git] / frsh_hierarchical_types.h
1 // -----------------------------------------------------------------------
2 //  Copyright (C) 2006 - 2007 FRESCOR consortium partners:
3 //
4 //    Universidad de Cantabria,              SPAIN
5 //    University of York,                    UK
6 //    Scuola Superiore Sant'Anna,            ITALY
7 //    Kaiserslautern University,             GERMANY
8 //    Univ. Politécnica  Valencia,           SPAIN
9 //    Czech Technical University in Prague,  CZECH REPUBLIC
10 //    ENEA                                   SWEDEN
11 //    Thales Communication S.A.              FRANCE
12 //    Visual Tools S.A.                      SPAIN
13 //    Rapita Systems Ltd                     UK
14 //    Evidence                               ITALY
15 //    
16 //    See http://www.frescor.org for a link to partners' websites
17 //
18 //           FRESCOR project (FP6/2005/IST/5-034026) is funded
19 //        in part by the European Union Sixth Framework Programme
20 //        The European Union is not liable of any use that may be
21 //        made of this code.
22 //
23 //
24 //  based on previous work (FSF) done in the FIRST project
25 //                       
26 //   Copyright (C) 2005  Mälardalen University, SWEDEN
27 //                       Scuola Superiore S.Anna, ITALY
28 //                       Universidad de Cantabria, SPAIN
29 //                       University of York, UK
30 //
31 //   FSF API web pages: http://marte.unican.es/fsf/docs
32 //                      http://shark.sssup.it/contrib/first/docs/
33 //
34 //  This file is part of FRSH API
35 //
36 //  FRSH API is free software; you can  redistribute it and/or  modify
37 //  it under the terms of  the GNU General Public License as published by
38 //  the Free Software Foundation;  either  version 2, or (at  your option)
39 //  any later version.
40 //
41 //  FRSH API  is distributed  in  the hope  that  it  will  be useful,  but
42 //  WITHOUT  ANY  WARRANTY;     without  even the   implied   warranty  of
43 //  MERCHANTABILITY  or  FITNESS FOR  A  PARTICULAR PURPOSE. See  the  GNU
44 //  General Public License for more details.
45 //
46 //  You should have  received a  copy of  the  GNU  General Public License
47 //  distributed  with  FRSH API;  see file COPYING.   If not,  write to the
48 //  Free Software  Foundation,  59 Temple Place  -  Suite 330,  Boston, MA
49 //  02111-1307, USA.
50 //
51 //  As a special exception, if you include this header file into source
52 //  files to be compiled, this header file does not by itself cause
53 //  the resulting executable to be covered by the GNU General Public
54 //  License.  This exception does not however invalidate any other
55 //  reasons why the executable file might be covered by the GNU General
56 //  Public License.
57 // -----------------------------------------------------------------------
58
59 //==============================================
60 //  ******** *******    ********  **      **
61 //  **///// /**////**  **//////  /**     /**
62 //  **      /**   /** /**        /**     /**
63 //  ******* /*******  /********* /**********
64 //  **////  /**///**  ////////** /**//////**
65 //  **      /**  //**        /** /**     /**
66 //  **      /**   //** ********  /**     /**
67 //  //       //     // ////////   //      // 
68 //
69 // FRSH(FRescor ScHeduler), pronounced "fresh"
70 //==============================================
71 #ifndef         FRSH_HIERARCHICAL_TYPES_H_
72 #define         FRSH_HIERARCHICAL_TYPES_H_
73
74 /**
75  * @file frsh_hierarchical_types.h
76  **/
77
78 #include <time.h>
79
80 /**
81  * @addtogroup hierarchical
82  *
83  * @{
84  **/
85
86 /** Scheduling policies **/
87 typedef enum {FRSH_FP, FRSH_EDF, FRSH_TABLE_DRIVEN, FRSH_RR, FRSH_NONE} 
88     frsh_sched_policy_t;
89
90 #define FRSH_DEFAULT_SCHED_POLICY        FRSH_NONE
91
92 /**
93  * Scheduling policy and parameters
94  *
95  * The params member is a pointer to one of the 
96  * following:
97  *    FP:  int (priority)
98  *    EDF: struct timespec (deadline)
99  *    RR:  none
100  *    TABLE_DRIVEN : struct frsh_table_driven_params_t
101  **/
102 typedef struct {
103   frsh_sched_policy_t    policy;
104   void *                params;
105 } frsh_sched_params_t;
106
107
108 /**
109  * Scheduling parameters for the table-driven policy
110  * list of target windows 
111  **/
112 typedef struct {
113    struct timespec   start;
114    struct timespec   end;
115    struct timespec   comp_time;
116 } frsh_target_window_t;
117
118 /**
119  * Container for a frsh_target_window array
120  **/
121 typedef struct {
122   int size;
123   frsh_target_window_t  table[FRSH_MAX_N_TARGET_WINDOWS];
124 } frsh_table_driven_params_t;
125
126
127 /**
128  * Initialization information for a scheduling policy
129  *
130  * It shall be one of the following:
131  *    FP:  none
132  *    EDF: none
133  *    RR: struct timespec (slice duration)
134  *    TABLE_DRIVEN : struct timespec (schedule duration)
135  **/
136 typedef void * frsh_sched_init_info_t;
137
138 /*}*/
139
140 #endif      /* !FRSH_HIERARCHICAL_TYPES_H_ */