1 // -----------------------------------------------------------------------
\r
2 // Copyright (C) 2006 - 2007 by the FRESCOR consortium:
\r
4 // Universidad de Cantabria, SPAIN
\r
5 // University of York, UK
\r
6 // Scuola Superiore Sant'Anna, ITALY
\r
7 // Kaiserslautern University, GERMANY
\r
8 // Univ. Politecnica Valencia, SPAIN
\r
9 // Czech Technical University in Prague, CZECH REPUBLIC
\r
11 // Thales Communication S.A. FRANCE
\r
12 // Visual Tools S.A. SPAIN
\r
13 // Rapita Systems Ltd UK
\r
16 // See http://www.frescor.org
\r
18 // The FRESCOR project (FP6/2005/IST/5-034026) is funded
\r
19 // in part by the European Union Sixth Framework Programme
\r
20 // The European Union is not liable of any use that may be
\r
21 // made of this code.
\r
23 // All rights reserved.
\r
25 // Redistribution and use in source and binary forms, with or
\r
26 // without modification, are permitted provided that the
\r
27 // following conditions are met:
\r
29 // * Redistributions of source code must retain the above
\r
30 // copyright notice, this list of conditions and the
\r
31 // following disclaimer.
\r
32 // * Redistributions in binary form must reproduce the above
\r
33 // copyright notice, this list of conditions and the
\r
34 // following disclaimer in the documentation and/or other
\r
35 // materials provided with the distribution.
\r
36 // * Neither the name of FRESCOR nor the names of its
\r
37 // contributors may be used to endorse or promote products
\r
38 // derived from this software without specific prior
\r
39 // written permission.
\r
41 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
\r
42 // CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
\r
43 // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
\r
44 // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
\r
45 // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
\r
46 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
\r
47 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
\r
48 // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
\r
49 // GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
\r
50 // BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
\r
51 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
\r
52 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
\r
53 // OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
\r
54 // POSSIBILITY OF SUCH DAMAGE.
\r
55 // -----------------------------------------------------------------------
\r
60 * This file are used by two parts of the fosa impelementation. Booth the
\r
61 * fosa functions and the ose-handlers such as create and swap handlers.
\r
64 #ifndef FOSA_OSE_TYPES_H_
\r
65 #define FOSA_OSE_TYPES_H_
\r
72 * Structure to make a linked list with the FRSH processes. This contains
\r
73 * all information needed by FRSH that should be saved per process. But
\r
74 * this list actually does not belong to any process. Node added when
\r
75 * process crated and removed when it terminates.
\r
77 typedef struct fosa_ose_process_info_def {
\r
79 OSBOOLEAN app_scheduled;
\r
80 void* appsched_param;
\r
81 size_t appsched_param_size;
\r
82 struct fosa_ose_process_info_def* NextProcess;
\r
86 signed long nr_of_micros;
\r
88 //Budgeted time should also be here.....
\r
90 } fosa_ose_process_info_t;
\r
92 /*Extend the memory storage area for each process for fast acess of
\r
93 * data in kernel handlers (avoiding list iteration). This is done by
\r
94 * configuring the "user area" statically. Add USER_AREA (<size>) to
\r
95 * krn.con file (sfk-win32 folder) where size is the extra number of
\r
96 * bytes that is to be allocated in the user area for each process.
\r
97 * The user area can be reached only by the kernel handlers (create,
\r
98 * swap in/out and kill). Should contain:
\r
99 * -pointer to the list storage node for the current process
\r
100 * -slice start time (temporary value not needed globally)
\r
102 typedef struct user_area{
\r
103 OSTICK tick_slice_start_time; /*unsigned long = 4 byte*/
\r
104 OSTICK micro_slice_start_time; /*unsigned long = 4 byte*/
\r
105 fosa_ose_process_info_t *list_position_ptr; /*pointer (4 byte ?)*/
\r
106 OSBOOLEAN fosa_process; /*size of unsigned char (1byte?)*/
\r
107 PROCESS pid; /*4byte*/
\r
108 }user_area_t; /* sizeof(struct user_area) must match krn.con USER_AREA configuration! */
\r
110 #endif /*FOSA_OSE_TYPES_H_*/
\r