Subversion Repositories shark

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1659 giacomo 1
/*
2
 * Project: S.Ha.R.K.
3
 *
4
 * Coordinators: Giorgio Buttazzo <giorgio@sssup.it>
5
 *
6
 * Authors     : Paolo Gai <pj@hartik.sssup.it>
7
 * (see authors.txt for full list of hartik's authors)
8
 *
9
 * ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy)
10
 *
11
 * http://www.sssup.it
12
 * http://retis.sssup.it
13
 * http://shark.sssup.it
14
 */
15
 
16
/* put here a description of the module */
17
 
18
/*
19
 * Copyright (C) 2000 Paolo Gai
20
 *
21
 * This program is free software; you can redistribute it and/or modify
22
 * it under the terms of the GNU General Public License as published by
23
 * the Free Software Foundation; either version 2 of the License, or
24
 * (at your option) any later version.
25
 *
26
 * This program is distributed in the hope that it will be useful,
27
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
28
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
29
 * GNU General Public License for more details.
30
 *
31
 * You should have received a copy of the GNU General Public License
32
 * along with this program; if not, write to the Free Software
33
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
34
 *
35
 */
36
 
37
 
38
 
39
#ifndef __MYMOD_H__
40
#define __MYMOD_H__
41
 
42
#include <kernel/model.h>
43
// maybe you need here some include file
44
 
45
// then... we define a new Task Model without modifying
46
// the standard kernel distribution
47
 
48
// pick a pclass number not used into include/kernel/model.h
49
#define MY_PCLASS 0x0700
50
 
51
/*
52
  maybe a description of the new fields of the Model is useful here
53
*/
54
 
55
typedef struct {
56
  TASK_MODEL t;
57
  int myparameter;
58
} MY_TASK_MODEL;
59
 
60
#define my_task_default_model(m)                             \
61
			task_default_model((m).t,MY_PCLASS), \
62
			(m).myparameter = 0
63
#define my_task_def_level(m,l)       task_def_level((m).t,l)
64
#define my_task_def_arg(m,a)         task_def_arg((m).t,a)
65
#define my_task_def_stack(m,s)       task_def_stack((m).t,s)
66
#define my_task_def_stackaddr(m,s)   task_def_stackaddr((m).t,s)
67
#define my_task_def_group(m,g)       task_def_group((m).t,g)
68
#define my_task_def_usemath(m)       task_def_usemath((m).t)
69
#define my_task_def_system(m)        task_def_system((m).t)
70
#define my_task_def_nokill(m)        task_def_nokill((m).t)
71
#define my_task_def_ctrl_jet(m)      task_def_ctrl_jet((m).t)
72
#define my_task_def_myparameter(m,p) (m).myparameter = (p)
73
#define my_task_def_joinable(m)      task_def_joinable((m).t)
74
#define my_task_def_unjoinable(m)    task_def_unjoinable((m).t)
75
#define my_task_def_trace(m)         task_def_trace((m).t)
76
#define my_task_def_notrace(m)       task_def_notrace((m).t)
77
 
78
// pick a code and a version not used into the file include/modules/codes.h
79
#define MYMOD_LEVELNAME         "My new scheduling module"
80
#define MYMOD_LEVEL_CODE        999
81
#define MYMOD_LEVEL_VERSION     1
82
 
83
// if the module raises some new exception list them here
84
// pincking up unused numbers from include/bits/errno.h
85
 
86
/*+ Registration function:
87
    int parameter     Options to be used in this level instance... +*/
88
void MYMOD_register_level(int parameter);
89
 
90
/* here you can also put some other functions similar for example
91
   to the EDF_usedbandwidth() in the file include/modules/edf.h */
92
 
93
#endif
94
 
95
 
96
 
97
 
98
 
99
 
100
 
101
 
102
 
103
 
104
 
105
 
106
 
107
 
108
 
109
 
110
 
111
 
112
 
113