// -----------------------------------------------------------------------
-// Copyright (C) 2006 - 2007 FRESCOR consortium partners:
+// Copyright (C) 2006 - 2009 FRESCOR consortium partners:
//
// Universidad de Cantabria, SPAIN
// University of York, UK
// Visual Tools S.A. SPAIN
// Rapita Systems Ltd UK
// Evidence ITALY
-//
+//
// See http://www.frescor.org for a link to partners' websites
//
// FRESCOR project (FP6/2005/IST/5-034026) is funded
//
//
// based on previous work (FSF) done in the FIRST project
-//
+//
// Copyright (C) 2005 Mälardalen University, SWEDEN
// Scuola Superiore S.Anna, ITALY
// Universidad de Cantabria, SPAIN
// FSF API web pages: http://marte.unican.es/fsf/docs
// http://shark.sssup.it/contrib/first/docs/
//
-// This file is part of FRSH API
-//
-// 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.
+// This file is part of FRSH (FRescor ScHeduler)
//
-// 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.
+// 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.
//
-// 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_shared_objects.h
#ifndef _FRSH_SHARED_OBJECTS_H_
#define _FRSH_SHARED_OBJECTS_H_
-#include "frsh_fosa.h"
#include "frsh_shared_objects_types.h"
#include "frsh_core_types.h"
+FRSH_CPP_BEGIN_DECLS
#define FRSH_SHAREDOBJS_MODULE_SUPPORTED 1
**/
int frsh_csect_init
(frsh_sharedobj_handle_t obj_handle,
- struct timespec wcet,
+ frsh_rel_time_t wcet,
frsh_csect_t *csect);
**/
int frsh_csect_get_wcet
(const frsh_csect_t *csect,
- struct timespec *wcet);
+ frsh_rel_time_t *wcet);
/**
**/
int frsh_csect_get_blocking_time
(const frsh_csect_t *csect,
- struct timespec *blocking);
+ frsh_rel_time_t *blocking);
+
+
+/**
+ * frsh_csect_destroy()
+ *
+ * Destroy a critical section, deallocating all the resources that may
+ * have been allocated to it.
+ **/
+int frsh_csect_destroy
+ (frsh_csect_t *csect);
+
+/**
+ * frsh_csect_register_thread()
+ *
+ * Register the calling thread for invoking time-protected critical
+ * sections via frsh_csect_invoke.
+ **/
+int frsh_csect_register_thread();
+
+/**
+ * frsh_csect_deregister_thread()
+ *
+ * Deregister the calling thread from being able to invoke
+ * time-protected critical sections. This operation releases system
+ * resources that may have been allocated for the thread.
+ **/
+int frsh_csect_deregister_thread();
+
/*@}*/ /* For so_critical group */
/*@}*/ /* For shared_objects group */
+FRSH_CPP_END_DECLS
+
#endif // _FRSH_SHARED_OBJECTS_H_