]> rtime.felk.cvut.cz Git - frescor/frsh-include.git/blobdiff - frsh_configuration_parameters.h
Update transaction API
[frescor/frsh-include.git] / frsh_configuration_parameters.h
index 2ab8eaa8357214a175d16c9baaca4456c1153b79..ab5ea8b8d3c55ab9a10bacaf23db1ad0e29136f7 100644 (file)
@@ -1,5 +1,5 @@
 // -----------------------------------------------------------------------
-//  Copyright (C) 2006 - 2007 FRESCOR consortium partners:
+//  Copyright (C) 2006 - 2009 FRESCOR consortium partners:
 //
 //    Universidad de Cantabria,              SPAIN
 //    University of York,                    UK
 //   FSF API web pages: http://marte.unican.es/fsf/docs
 //                      http://shark.sssup.it/contrib/first/docs/
 //
-//  This file is part of FRSH API
+//   This file is part of FRSH (FRescor ScHeduler)
 //
-//  FRSH API is free software; you can  redistribute it and/or  modify
-//  it under the terms of  the GNU General Public License as published by
-//  the Free Software Foundation;  either  version 2, or (at  your option)
-//  any later version.
+//  FRSH is free software; you can redistribute it and/or modify it
+//  under terms of the GNU General Public License as published by the
+//  Free Software Foundation; either version 2, or (at your option) any
+//  later version.  FRSH is distributed in the hope that it will be
+//  useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+//  of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+//  General Public License for more details. You should have received a
+//  copy of the GNU General Public License along with FRSH; see file
+//  COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
+//  Cambridge, MA 02139, USA.
 //
-//  FRSH API  is distributed  in  the hope  that  it  will  be useful,  but
-//  WITHOUT  ANY  WARRANTY;     without  even the   implied   warranty  of
-//  MERCHANTABILITY  or  FITNESS FOR  A  PARTICULAR PURPOSE. See  the  GNU
-//  General Public License for more details.
-//
-//  You should have  received a  copy of  the  GNU  General Public License
-//  distributed  with  FRSH API;  see file COPYING.   If not,  write to the
-//  Free Software  Foundation,  59 Temple Place  -  Suite 330,  Boston, MA
-//  02111-1307, USA.
-//
-//  As a special exception, if you include this header file into source
-//  files to be compiled, this header file does not by itself cause
-//  the resulting executable to be covered by the GNU General Public
-//  License.  This exception does not however invalidate any other
-//  reasons why the executable file might be covered by the GNU General
-//  Public License.
+//  As a special exception, including FRSH header files in a file,
+//  instantiating FRSH generics or templates, or linking other files
+//  with FRSH objects to produce an executable application, does not
+//  by itself cause the resulting executable application to be covered
+//  by the GNU General Public License. This exception does not
+//  however invalidate any other reasons why the executable file might be
+//  covered by the GNU Public License.
 // -----------------------------------------------------------------------
 //frsh_configuration_parameters.h
 //==============================================
 #define _FRSH_CONFIGURATION_PARAMETERS_H_
 
 #include <unistd.h>
+#include <limits.h>
+#include <frsh_cpp_macros.h>
+
+FRSH_CPP_BEGIN_DECLS
 
 /**
  * @file frsh_configuration_parameters.h
  **/
 #define FRSH_AUTOMATIC_PRIO_ASSIGN_ENABLE true
 
+#ifdef ENABLE_FRSH_DISTRIBUTED_MODULE
+#define FRSH_DISTRIBUTED_MODULE_SUPPORTED true
+#else
+#define FRSH_DISTRIBUTED_MODULE_SUPPORTED false
+#endif
+
+/** This defines 1 resource_id value for systems that have only one
+    resource of a kind. **/
+#define FRSH_RESOURCE_ID_DEFAULT 0
+#define FRSH_CPU_ID_DEFAULT 0
+#define FRSH_NETWORK_ID_DEFAULT 0
+
 /**
  * @defgroup internal Array size for memory optimization
  * @ingroup config
  **/
 
 /** Maximum number of accepted contracts (vres) **/
-#define FRSH_MAX_N_VRES                    125
-
+#define FRSH_MAX_N_VRES                    25
 
 /** Maximum number of threads that may be scheduled by the framework **/
 #define FRSH_MAX_N_THREADS                    25
 
-
 /**
  * Maximum number of critical sections that can be stored in a
  * contract parameters object
  **/
-#define FRSH_MAX_N_CRITICAL_SECTIONS          25
+#define FRSH_MAX_N_CRITICAL_SECTIONS          10
 
 /**
  * Maximum number of memory areas that can be specified for a
  **/
 #define FRSH_MAX_N_UTILIZATION_VALUES         5
 
+/** Number of importance levels for spare capacity allocation **/
+#define FRSH_N_IMPORTANCE_LEVELS     5
 
 /**
  * Maximum number of synchronization objects
  **/
 #define FRSH_MAX_N_SYNCH_OBJECTS              5
 
-
 /** Maximum number of shared objects **/
 #define FRSH_MAX_N_SHARED_OBJECTS             100
 
+/** Maximum number of send and receive endpoints in a single node **/
+#define FRSH_MAX_N_ENDPOINTS 10
+
+/** Maximum number of chars for a contract label **/
+#define FRSH_CONTRACT_LABEL_MAXLENGTH 15
+
 /*@}*/
 
 /**
  * thread, and it should be at least 1 level below the maximum of the
  *  system
  **/
-#define FRSH_SCHEDULER_PRIORITY               29   //104
+#define FRSH_SCHEDULER_PRIORITY       (fosa_get_priority_max() -  FOSA_ADS_SCHEDULER_PRIO_DIFF)
 
 /**
  * Real-time signal number reserved for the application scheduler to
 #define FRSH_SCHEDULER_SIGNAL                 FRSH_SIGNAL_MIN
 
 
+
 /**
  * The highest priority that can be assigned to an application thread,
  * it should be defined as one level less than the
  * The lowest priority that can be assigned to an application thread,
  * it should be at least 1 level above the minimum of the system
  **/
-#define FRSH_LOWEST_THREAD_PRIORITY           3
+#define FRSH_LOWEST_THREAD_PRIORITY    ( fosa_get_priority_min() + 4)
 
 /**
  * Each call to the functions that negotiate or renegotiate a contract
  * following symbol represents the maximum number of requests that can
  * be simultaneously queued.
  **/
-#define FRSH_MAX_N_SERVICE_JOBS  FRSH_MAX_N_VRES * 2
+#define FRSH_MAX_N_SERVICE_JOBS  (FRSH_MAX_N_VRES * 2)
 
 
 /**
  **/
 
 /** Initial period of the service thread (timespec) **/
-#define FRSH_SERVICE_THREAD_PERIOD  {0,10000000}  //    0.01 seg
-                                // {0,100000000}  //0.1 seg
-                                // {0,10000000}   //3.1 0.01
+#define FRSH_SERVICE_THREAD_PERIOD_USECS 500000 /* 500 msecs */
 
 /** Initial budget of the service thread (timespec) **/
-#define FRSH_SERVICE_THREAD_BUDGET  {0,1000000}   //     0.001 seg
-                                // {0,10000000}   //0.01 seg
-                                // {0,1000000}    //3.1 0.001
-
+#define FRSH_SERVICE_THREAD_BUDGET_USECS 1000 /* 1 msec */
 
 /**
  * Initial priority of the service thread, it has to be lower than the
  * FRSH_SCHEDULER_PRIORITY, and is set according to its period and the
  * expected response times for reconfiguration or tunning of the
  * system.
+ *
+ * If set to zero and FRSH_ADMISSSION_TEST_ENABLE is set to true then
+ * the priority will be assigned according to DMA rules.
  **/
-#define FRSH_SERVICE_THREAD_PRIORITY          (FRSH_LOWEST_THREAD_PRIORITY+1) //3 3    //3 1
+//#define FRSH_SERVICE_THREAD_PRIORITY          (FRSH_LOWEST_THREAD_PRIORITY+1)
+#define FRSH_SERVICE_THREAD_PRIORITY          0
 
 
 /*@}*/
  * The cpu time given by the round robin scheduler
  * to the threads in the background (timespec)
  **/
-#define FRSH_RR_SLICE_CPU_TIME               {0,100000000}  //3  0.1 sec
+#define FRSH_RR_SLICE_CPU_TIME_USECS 100000 // 0.1 sec
 
 /**
  * This function must be supplied by the user to map the preemption
@@ -307,16 +325,14 @@ int frsh_priority_map (unsigned long plevel);
 #define FRSH_MAX_N_NETWORK_IDS                1
 
 /**
- * Maximum number of vres that can be given in a vres list
- * to the group negotiation/cancellation primitive
+ * Maximum number of groups allocated at the same time
  **/
-#define FRSH_MAX_N_VRES_VALUES              10
+#define FRSH_MAX_N_GROUPS  3
 
 /**
- * Maximum number of contracts that can be given in a contracts list
- * to the group negotiation/cancellation primitive
+ * Maximum number of groups operations (neg, reneg, cancel) per group
  **/
-#define FRSH_MAX_N_CONTRACT_VALUES              10
+#define FRSH_MAX_GROUP_OPS  25
 
 /**
  * Default overheads of shared object protection mechanisms
@@ -339,9 +355,21 @@ int frsh_priority_map (unsigned long plevel);
 #define FRSH_SO_NANOS_PER_KB            0
 
 
+/* Default memory pool's size in Kbytes */
+#define FRSH_DYNAMIC_MEMORY_POOL_SIZE 6670
+
+/**
+ * Maximum synchronized workload period number.  After this value any
+ * increments will be set to zero.
+ **/
+#define FRSH_MAX_SYNCHRONIZED_PERIOD_NUMBER LONG_MAX
+
+
 /*@}*/
 
 /*@}*/
 
+FRSH_CPP_END_DECLS
+
 #endif /* _FRSH_CONFIGURATION_PARAMETERS_H_ */