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_core_types.h"
77 #include "frsh_configuration_parameters.h"
82 * @file frsh_shared_objects_types.h
86 * @addtogroup sharedobj
91 /** Mutex object. Attributes are handled by FOSA **/
92 typedef fosa_mutex_t frsh_mutex_t;
96 * Shared object handle: It is an opaque type (i.e. the internal
97 * structure of this data type is implementation dependent).
99 typedef FRSH_SHAREDOBJ_HANDLE_T_OPAQUE frsh_sharedobj_handle_t;
102 * Shared object textual label
104 typedef char frsh_sharedobj_label_t[FRSH_MAX_SIZE_SHARED_OBJ_LABEL + 1];
107 * Kind of shared object: protected or unprotected
110 {FRSH_SOK_UNPROTECTED, FRSH_SOK_PROTECTED}
111 frsh_sharedobj_kind_t;
114 * Kind of protected operation: read, write or unchecked
117 {FRSH_CSOK_UNCHECKED, FRSH_CSOK_READ, FRSH_CSOK_WRITE}
118 frsh_csect_op_kind_t;
121 * Pointer to protected operation, which takes a pointer to
122 * the input parameters, and a pointer to the output
123 * parameters; the user is responsible for not exceeding the
124 * sizes of the respective input and output parameters data structures
126 typedef void (*frsh_csect_op_t)
127 (const void * input_arg, void * output_arg);
135 } frsh_memory_area_data_t;
138 * Memory areas container
142 frsh_memory_area_data_t memory_areas[FRSH_MAX_N_MEMORY_AREAS];
143 } frsh_memory_areas_t;
147 * Critical section data (opaque type)
149 typedef FRSH_CSECT_T_OPAQUE frsh_csect_t;
153 * Container of a group of critical sections, up to a maximum size
156 int size; // size of the group; initially=0
157 frsh_csect_t csects[FRSH_MAX_N_CRITICAL_SECTIONS]; // array of csect
158 } frsh_csects_group_t;
165 #endif /* !FRSH_SHARED_OBJECTS_TYPES_H_ */