1 // -----------------------------------------------------------------------
2 // Copyright (C) 2006 - 2007 FRESCOR consortium partners:
4 // Universidad de Cantabria, SPAIN
5 // University of York, UK
6 // Scuola Superiore Sant'Anna, ITALY
7 // Kaiserslautern University, GERMANY
8 // Univ. Politécnica Valencia, SPAIN
9 // Czech Technical University in Prague, CZECH REPUBLIC
11 // Thales Communication S.A. FRANCE
12 // Visual Tools S.A. SPAIN
13 // Rapita Systems Ltd UK
16 // See http://www.frescor.org for a link to partners' websites
18 // FRESCOR project (FP6/2005/IST/5-034026) is funded
19 // in part by the European Union Sixth Framework Programme
20 // The European Union is not liable of any use that may be
24 // based on previous work (FSF) done in the FIRST project
26 // Copyright (C) 2005 Mälardalen University, SWEDEN
27 // Scuola Superiore S.Anna, ITALY
28 // Universidad de Cantabria, SPAIN
29 // University of York, UK
31 // FSF API web pages: http://marte.unican.es/fsf/docs
32 // http://shark.sssup.it/contrib/first/docs/
34 // This file is part of FRSH API
36 // FRSH API is free software; you can redistribute it and/or modify
37 // it under the terms of the GNU General Public License as published by
38 // the Free Software Foundation; either version 2, or (at your option)
41 // FRSH API is distributed in the hope that it will be useful, but
42 // WITHOUT ANY WARRANTY; without even the implied warranty of
43 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
44 // General Public License for more details.
46 // You should have received a copy of the GNU General Public License
47 // distributed with FRSH API; see file COPYING. If not, write to the
48 // Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
51 // As a special exception, if you include this header file into source
52 // files to be compiled, this header file does not by itself cause
53 // the resulting executable to be covered by the GNU General Public
54 // License. This exception does not however invalidate any other
55 // reasons why the executable file might be covered by the GNU General
57 // -----------------------------------------------------------------------
59 //==============================================
60 // ******** ******* ******** ** **
61 // **///// /**////** **////// /** /**
62 // ** /** /** /** /** /**
63 // ******* /******* /********* /**********
64 // **//// /**///** ////////** /**//////**
65 // ** /** //** /** /** /**
66 // ** /** //** ******** /** /**
67 // // // // //////// // //
69 // FRSH(FRescor ScHeduler), pronounced "fresh"
70 //==============================================
72 #ifndef FRSH_SHARED_OBJECTS_TYPES_H_
73 #define FRSH_SHARED_OBJECTS_TYPES_H_
76 #include "frsh_opaque_types.h"
77 #include "frsh_configuration_parameters.h"
80 * @file frsh_shared_objects_types.h
84 * @addtogroup sharedobj
91 * Shared object handle: It is an opaque type (i.e. the internal
92 * structure of this data type is implementation dependent).
94 typedef FRSH_SHAREDOBJ_HANDLE_T_OPAQUE frsh_sharedobj_handle_t;
97 * Shared object textual label
99 typedef char frsh_sharedobj_label_t[FRSH_MAX_SIZE_SHARED_OBJ_LABEL + 1];
102 * Kind of shared object: protected or unprotected
105 {FRSH_SOK_UNPROTECTED, FRSH_SOK_PROTECTED}
106 frsh_sharedobj_kind_t;
109 * Kind of protected operation: read, write or unchecked
112 {FRSH_CSOK_UNCHECKED, FRSH_CSOK_READ, FRSH_CSOK_WRITE}
113 frsh_csect_op_kind_t;
116 * Pointer to protected operation, which takes a pointer to
117 * the input parameters, and a pointer to the output
118 * parameters; the user is responsible for not exceeding the
119 * sizes of the respective input and output parameters data structures
121 typedef void (*frsh_csect_op_t)
122 (const void * input_arg, void * output_arg);
130 } frsh_memory_area_data_t;
133 * Memory areas container
137 frsh_memory_area_data_t memory_areas[FRSH_MAX_N_MEMORY_AREAS];
138 } frsh_memory_areas_t;
142 * Critical section data (opaque type)
144 typedef FRSH_CSECT_T_OPAQUE frsh_csect_t;
148 * Container of a group of critical sections, up to a maximum size
151 int size; // size of the group; initially=0
152 frsh_csect_t csects[FRSH_MAX_N_CRITICAL_SECTIONS]; // array of csect
153 } frsh_csects_group_t;
157 #endif /* !FRSH_SHARED_OBJECTS_TYPES_H_ */