Subversion Repositories shark

Rev

Rev 985 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1063 tullio 1
 
2
/*
3
 * This program is free software; you can redistribute it and/or modify
4
 * it under the terms of the GNU General Public License as published by
5
 * the Free Software Foundation; either version 2 of the License, or
6
 * (at your option) any later version.
7
 *
8
 * This program is distributed in the hope that it will be useful,
9
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
 * GNU General Public License for more details.
12
 *
13
 * You should have received a copy of the GNU General Public License
14
 * along with this program; if not, write to the Free Software
15
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
 *
17
 */
18
 
881 trimarchi 19
//fsf_opaque_types.h
20
//=======================================================================
21
//       FFFFFFIII   RRRRR      SSTTTTTTT
22
//      FF         IIR   RR    SS
23
//     FF           IR        SS
24
//    FFFFFF         RRRR    SSSSST
25
//   FF       FI       RRR  SS
26
//  FF         II     RRR  SS
27
// FF           IIIIIR    RS
28
//
29
// Basic FSF(FIRST Scheduling Framework) contract management opaque types
30
//=======================================================================
31
// Implementation dependent definitions
32
 
33
#include <signal.h>
34
 
35
#ifndef _FSF_OPAQUE_TYPES_H_
36
#define _FSF_OPAQUE_TYPES_H_
37
 
38
 
39
#define FSF_CONTRACT_PARAMETERS_T_OPAQUE struct {   \
40
\
41
  struct timespec         budget_min;                \
42
  struct timespec         period_max;                \
43
  struct timespec         budget_max;                \
44
  struct timespec         period_min;                \
45
  fsf_workload_t          workload;                  \
46
                                                     \
47
  bool                    d_equals_t;                \
48
  struct timespec         deadline;                  \
49
  int                     budget_overrun_sig_notify; \
50
  union sigval            budget_overrun_sig_value;  \
51
  int                     deadline_miss_sig_notify;  \
52
  union sigval            deadline_miss_sig_value;   \
53
                                                     \
54
  fsf_granularity_t       granularity;               \
55
  fsf_utilization_set_t   utilization_set;           \
56
  int                     quality;                   \
57
  int                     importance;                \
58
                                                     \
59
  fsf_preemption_level_t  preemption_level;          \
60
  fsf_critical_sections_t critical_sections;         \
61
                                                     \
62
  fsf_sched_policy_t      policy;                    \
63
                                                     \
900 trimarchi 64
  fsf_network_id_t        network_id;                \
65
  bool                    granted_capacity_flag;     \
66
                                                     \
881 trimarchi 67
}
68
 
69
 
70
//Default values for fsf_contract_parameters_t:
71
//  budget_min                 => {0,0};
72
//  period_max                 => {0,0};
73
//  budget_max                 => {0,0};
74
//  period_min                 => {0,0};
75
//  workload                   => DEFAULT_WORKLOAD;
76
 
77
//  d_equals_t                 => DEFAULT_D_EQUALS_T;
78
//                               (false or true)
79
//  deadline                   => DEFAULT_DEADLINE;
80
//  budget_overrun_sig_notify  => 0;  (signal number)
81
//  budget_overrun_sig_value   => {0, NULL};
82
//  deadline_miss_sig_notify   => 0;  (signal number)
83
//  deadline_miss_sig_value    => {0, NULL};
84
//
85
//  granularity                => DEFAULT_GRANULARITY;
86
 
87
//  utilization_set;           => size = 0
88
//  quality                    => DEFAULT_QUALITY; 
985 julio 89
//                                (range 0..2**32-1)
881 trimarchi 90
//  importance                 => DEFAULT_IMPORTANCE;
91
//                                (range 1..5)
92
//
93
//  preemption_level           => 0;
94
//                                (range 1..2**32-1)
95
//  critical_sections          => size = 0
96
//
97
//  policy                     => DEFAULT_SCHED_POLICY;
98
//                                (FSF_NONE)             
900 trimarchi 99
//
100
//  network_id                 => FSF_NULL_NETWORK_ID;
101
//                                (0)
102
//  granted_capacity_flag      => false;
881 trimarchi 103
 
104
 
105
#define FSF_SYNCH_OBJ_HANDLE_T_OPAQUE int
106
 
107
#define FSF_SHARED_OBJ_HANDLE_T_OPAQUE int
108
 
109
 
900 trimarchi 110
//opaque types for fsf endpoints
111
#define FSF_SEND_ENDPOINT_T_OPAQUE int
112
 
113
#define FSF_RECEIVE_ENDPOINT_T_OPAQUE int
114
 
115
 
881 trimarchi 116
#endif // _FSF_OPAQUE_TYPES_H_