Rev 1086 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1085 | pj | 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 | ------------ |
||
1123 | pj | 23 | CVS : $Id: static.h,v 1.2 2003-01-07 17:10:18 pj Exp $ |
1085 | pj | 24 | |
25 | File: $File$ |
||
1123 | pj | 26 | Revision: $Revision: 1.2 $ |
27 | Last update: $Date: 2003-01-07 17:10:18 $ |
||
1085 | pj | 28 | ------------ |
29 | |||
30 | Static scheduler demo (FIRST Project Hand-off) |
||
31 | |||
32 | **/ |
||
33 | |||
34 | /* |
||
35 | * Copyright (C) 2001 Paolo Gai |
||
36 | * |
||
37 | * This program is free software; you can redistribute it and/or modify |
||
38 | * it under the terms of the GNU General Public License as published by |
||
39 | * the Free Software Foundation; either version 2 of the License, or |
||
40 | * (at your option) any later version. |
||
41 | * |
||
42 | * This program is distributed in the hope that it will be useful, |
||
43 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
44 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
45 | * GNU General Public License for more details. |
||
46 | * |
||
47 | * You should have received a copy of the GNU General Public License |
||
48 | * along with this program; if not, write to the Free Software |
||
49 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
||
50 | * |
||
51 | */ |
||
52 | |||
53 | |||
54 | #ifndef __STATIC_H__ |
||
55 | #define __STATIC_H__ |
||
56 | |||
57 | #include <ll/ll.h> |
||
58 | #include <kernel/config.h> |
||
59 | #include <sys/types.h> |
||
60 | #include <kernel/types.h> |
||
61 | |||
62 | |||
63 | |||
64 | |||
65 | |||
66 | |||
67 | |||
68 | |||
69 | /*+ flags... +*/ |
||
70 | |||
71 | /* no flags for the static scheduler */ |
||
72 | |||
73 | |||
74 | |||
75 | |||
76 | #define STATIC_PCLASS 0x1000 |
||
77 | |||
78 | #define STATIC_LEVELNAME "STATIC 1st Project" |
||
79 | #define STATIC_LEVEL_CODE 167 |
||
80 | #define STATIC_LEVEL_VERSION 1 |
||
81 | |||
82 | |||
83 | |||
84 | typedef struct { |
||
85 | TASK_MODEL t; |
||
86 | struct timespec offset; |
||
87 | } STATIC_TASK_MODEL; |
||
88 | |||
89 | #define static_task_default_model(m,o) \ |
||
90 | task_default_model((m).t,STATIC_PCLASS), \ |
||
91 | ((m).offset).tv_sec = (o).tv_sec, \ |
||
92 | ((m).offset).tv_nsec = (o).tv_nsec |
||
93 | #define static_task_def_level(m,l) task_def_level((m).t,l) |
||
94 | #define static_task_def_arg(m,a) task_def_arg((m).t,a) |
||
95 | #define static_task_def_stack(m,s) task_def_stack((m).t,s) |
||
96 | #define static_task_def_stackaddr(m,s) task_def_stackaddr((m).t,s) |
||
97 | #define static_task_def_group(m,g) task_def_group((m).t,g) |
||
98 | #define static_task_def_usemath(m) task_def_usemath((m).t) |
||
99 | #define static_task_def_system(m) task_def_system((m).t) |
||
100 | #define static_task_def_nokill(m) task_def_nokill((m).t) |
||
101 | #define static_task_def_ctrl_jet(m) task_def_ctrl_jet((m).t) |
||
102 | #define static_task_def_joinable(m) task_def_joinable((m).t) |
||
103 | #define static_task_def_unjoinable(m) task_def_unjoinable((m).t) |
||
104 | |||
105 | |||
106 | |||
107 | |||
108 | |||
109 | /*+ Registration function: |
||
110 | int flags Options to be used in this level instance... |
||
111 | +*/ |
||
1123 | pj | 112 | LEVEL STATIC_register_level(void); |
1085 | pj | 113 | |
114 | void STATIC_start(LEVEL l, struct timespec *h, struct timespec *o); |
||
115 | |||
116 | #endif |
||
117 |