Subversion Repositories shark

Rev

Rev 235 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
235 giacomo 1
/*
2
 * Project: S.Ha.R.K.
3
 *
4
 * Coordinators:
5
 *   Giorgio Buttazzo    <giorgio@sssup.it>
6
 *   Paolo Gai           <pj@gandalf.sssup.it>
7
 *
8
 * Authors     :
9
 *   Paolo Gai           <pj@gandalf.sssup.it>
10
 *   Massimiliano Giorgi <massy@gandalf.sssup.it>
11
 *   Luca Abeni          <luca@gandalf.sssup.it>
12
 *   (see the web pages for full authors list)
13
 *
14
 * ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy)
15
 *
16
 * http://www.sssup.it
17
 * http://retis.sssup.it
18
 * http://shark.sssup.it
19
 */
20
 
21
/**
22
 ------------
814 trimarchi 23
 CVS :        $Id: rmstar.h,v 1.2 2004-09-06 10:05:23 trimarchi Exp $
235 giacomo 24
 
25
 File:        $File$
814 trimarchi 26
 Revision:    $Revision: 1.2 $
27
 Last update: $Date: 2004-09-06 10:05:23 $
235 giacomo 28
 ------------
29
 
30
 Title:
31
   RMSTAR
32
 
33
 Task Models Accepted:
34
   HARD_TASK_MODEL - Hard Tasks (only Periodic)
35
     wcet field and mit field must be != 0. They are used to set the wcet
36
       and period of the tasks.
37
     periodicity field can be only PERIODIC
38
     drel field is ignored
39
 
40
 Guest Models Accepted:
41
   JOB_TASK_MODEL - a single guest task activation
42
     Identified by an absolute deadline and a period.
43
     period field is ignored
44
 
45
 Description:
46
 
47
   This module schedule his tasks following the classic RM
48
   scheme.
49
 
50
   Note: This module is derived from the EDFSTAR Scheduling Module. I
51
   have just changed RM in EDF and iq_timespec_insert with
52
   iq_priority_insert...
53
 
54
 Exceptions raised:
55
   XUNVALID_GUEST XUNVALID_TASK
56
     some primitives are not implemented:
57
     task_sleep, task_delay, guest_endcycle, guest_sleep, guest_delay
58
 
59
   XACTIVATION
60
     If a task is actiated through task_activate or guest_activate more than
61
     one time
62
 
63
 Restrictions & special features:
64
   see edfstar.h
65
 
66
**/
67
 
68
/*
69
 * Copyright (C) 2001 Paolo Gai
70
 *
71
 * This program is free software; you can redistribute it and/or modify
72
 * it under the terms of the GNU General Public License as published by
73
 * the Free Software Foundation; either version 2 of the License, or
74
 * (at your option) any later version.
75
 *
76
 * This program is distributed in the hope that it will be useful,
77
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
78
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
79
 * GNU General Public License for more details.
80
 *
81
 * You should have received a copy of the GNU General Public License
82
 * along with this program; if not, write to the Free Software
83
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
84
 *
85
 */
86
 
87
 
88
#ifndef __RMSTAR_H__
89
#define __RMSTAR_H__
90
 
91
#include <ll/ll.h>
92
#include <kernel/config.h>
93
#include <sys/types.h>
94
#include <kernel/types.h>
95
 
96
 
97
 
98
/* flags... */
99
#define RMSTAR_ENABLE_GUARANTEE      1  /* Task Guarantee enabled */
100
#define RMSTAR_ENABLE_ALL            1
101
 
102
#define RMSTAR_FAILED_GUARANTEE      8  /* used in the module, unsettabl
103
                                         in RM_register_level... */
104
 
105
 
106
 
107
#define RMSTAR_LEVELNAME        "RMSTAR base"
108
#define RMSTAR_LEVEL_CODE       166
109
#define RMSTAR_LEVEL_VERSION    1
110
 
111
 
112
/* Registration function:
113
   int budget      The budget used by this module (see CBSSTAR.h)
114
   int master      The master module used by RMSTAR
115
*/
116
LEVEL RMSTAR_register_level(int master);
117
 
118
/* returns respectively the number of dline, wcet or nact; -1 if error */
119
int RMSTAR_get_dline_miss(PID p);
120
int RMSTAR_get_wcet_miss(PID p);
121
int RMSTAR_get_nact(PID p);
122
 
123
/* resets respectively the number of dline, wcet miss; -1 if error */
124
int RMSTAR_reset_dline_miss(PID p);
125
int RMSTAR_reset_wcet_miss(PID p);
126
int RMSTAR_getbudget(LEVEL l, PID p);
127
int RMSTAR_setbudget(LEVEL l, PID p, int budget);
128
int RMSTAR_budget_has_thread(LEVEL l, int budget);
129
 
814 trimarchi 130
void RMSTAR_set_nopreemtive_current(LEVEL l);
131
void RMSTAR_unset_nopreemtive_current(LEVEL l);
132
 
235 giacomo 133
#endif
134