-//----------------------------------------------------------------------
-// Copyright (C) 2006 - 2007 by the FRESCOR consortium:
+// -----------------------------------------------------------------------
+// Copyright (C) 2006 - 2008 FRESCOR consortium partners:
//
// Universidad de Cantabria, SPAIN
// University of York, UK
// Scuola Superiore Sant'Anna, ITALY
// Kaiserslautern University, GERMANY
-// Univ. Politecnica Valencia, SPAIN
+// Univ. Politécnica Valencia, SPAIN
// Czech Technical University in Prague, CZECH REPUBLIC
// ENEA SWEDEN
// Thales Communication S.A. FRANCE
// Rapita Systems Ltd UK
// Evidence ITALY
//
-// See http://www.frescor.org
+// See http://www.frescor.org for a link to partners' websites
//
-// The FRESCOR project (FP6/2005/IST/5-034026) is funded
+// FRESCOR project (FP6/2005/IST/5-034026) is funded
// in part by the European Union Sixth Framework Programme
// The European Union is not liable of any use that may be
// made of this code.
// Universidad de Cantabria, SPAIN
// University of York, UK
//
-// This file is part of FOSA (Frsh Operating System Abstraction)
+// FSF API web pages: http://marte.unican.es/fsf/docs
+// http://shark.sssup.it/contrib/first/docs/
+//
+// This file is part of FOSA (Frsh Operating System Adaption)
//
-// FOSA 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. FOSA 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 FOSA; see file
-// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
-// Cambridge, MA 02139, USA.
+// FOSA 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. FOSA 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 FOSA; see file
+// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
+// Cambridge, MA 02139, USA.
//
-// As a special exception, including FOSA header files in a file,
-// instantiating FOSA generics or templates, or linking other files
-// with FOSA 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.
+// As a special exception, including FOSA header files in a file,
+// instantiating FOSA generics or templates, or linking other files
+// with FOSA 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.
// -----------------------------------------------------------------------
//fosa.h
//==============================================
-//----------------------------------------------------------------------
-// Copyright (C) 2006 - 2007 by the FRESCOR consortium:
+// -----------------------------------------------------------------------
+// Copyright (C) 2006 - 2008 FRESCOR consortium partners:
//
// Universidad de Cantabria, SPAIN
// University of York, UK
// Scuola Superiore Sant'Anna, ITALY
// Kaiserslautern University, GERMANY
-// Univ. Politecnica Valencia, SPAIN
+// Univ. Politécnica Valencia, SPAIN
// Czech Technical University in Prague, CZECH REPUBLIC
// ENEA SWEDEN
// Thales Communication S.A. FRANCE
// Rapita Systems Ltd UK
// Evidence ITALY
//
-// See http://www.frescor.org
+// See http://www.frescor.org for a link to partners' websites
//
-// The FRESCOR project (FP6/2005/IST/5-034026) is funded
+// FRESCOR project (FP6/2005/IST/5-034026) is funded
// in part by the European Union Sixth Framework Programme
// The European Union is not liable of any use that may be
// made of this code.
// Universidad de Cantabria, SPAIN
// University of York, UK
//
-// This file is part of FOSA (Frsh Operating System Abstraction)
+// FSF API web pages: http://marte.unican.es/fsf/docs
+// http://shark.sssup.it/contrib/first/docs/
+//
+// This file is part of FOSA (Frsh Operating System Adaption)
//
-// FOSA 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. FOSA 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 FOSA; see file
-// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
-// Cambridge, MA 02139, USA.
+// FOSA 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. FOSA 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 FOSA; see file
+// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
+// Cambridge, MA 02139, USA.
//
-// As a special exception, including FOSA header files in a file,
-// instantiating FOSA generics or templates, or linking other files
-// with FOSA 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.
+// As a special exception, including FOSA header files in a file,
+// instantiating FOSA generics or templates, or linking other files
+// with FOSA 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.
// -----------------------------------------------------------------------
//fosa_app_def_sched.h
//==============================================
-//----------------------------------------------------------------------
-// Copyright (C) 2006 - 2007 by the FRESCOR consortium:
+// -----------------------------------------------------------------------
+// Copyright (C) 2006 - 2008 FRESCOR consortium partners:
//
// Universidad de Cantabria, SPAIN
// University of York, UK
// Scuola Superiore Sant'Anna, ITALY
// Kaiserslautern University, GERMANY
-// Univ. Politecnica Valencia, SPAIN
+// Univ. Politécnica Valencia, SPAIN
// Czech Technical University in Prague, CZECH REPUBLIC
// ENEA SWEDEN
// Thales Communication S.A. FRANCE
// Rapita Systems Ltd UK
// Evidence ITALY
//
-// See http://www.frescor.org
+// See http://www.frescor.org for a link to partners' websites
//
-// The FRESCOR project (FP6/2005/IST/5-034026) is funded
+// FRESCOR project (FP6/2005/IST/5-034026) is funded
// in part by the European Union Sixth Framework Programme
// The European Union is not liable of any use that may be
// made of this code.
// Universidad de Cantabria, SPAIN
// University of York, UK
//
-// This file is part of FOSA (Frsh Operating System Abstraction)
+// FSF API web pages: http://marte.unican.es/fsf/docs
+// http://shark.sssup.it/contrib/first/docs/
+//
+// This file is part of FOSA (Frsh Operating System Adaption)
//
-// FOSA 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. FOSA 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 FOSA; see file
-// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
-// Cambridge, MA 02139, USA.
+// FOSA 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. FOSA 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 FOSA; see file
+// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
+// Cambridge, MA 02139, USA.
//
-// As a special exception, including FOSA header files in a file,
-// instantiating FOSA generics or templates, or linking other files
-// with FOSA 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.
+// As a special exception, including FOSA header files in a file,
+// instantiating FOSA generics or templates, or linking other files
+// with FOSA 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.
// -----------------------------------------------------------------------
//fosa_clocks_and_timers.h
//==============================================
-//----------------------------------------------------------------------
-// Copyright (C) 2006 - 2007 by the FRESCOR consortium:
+// -----------------------------------------------------------------------
+// Copyright (C) 2006 - 2008 FRESCOR consortium partners:
//
// Universidad de Cantabria, SPAIN
// University of York, UK
// Scuola Superiore Sant'Anna, ITALY
// Kaiserslautern University, GERMANY
-// Univ. Politecnica Valencia, SPAIN
+// Univ. Politécnica Valencia, SPAIN
// Czech Technical University in Prague, CZECH REPUBLIC
// ENEA SWEDEN
// Thales Communication S.A. FRANCE
// Rapita Systems Ltd UK
// Evidence ITALY
//
-// See http://www.frescor.org
+// See http://www.frescor.org for a link to partners' websites
//
-// The FRESCOR project (FP6/2005/IST/5-034026) is funded
+// FRESCOR project (FP6/2005/IST/5-034026) is funded
// in part by the European Union Sixth Framework Programme
// The European Union is not liable of any use that may be
// made of this code.
// Universidad de Cantabria, SPAIN
// University of York, UK
//
-// This file is part of FOSA (Frsh Operating System Abstraction)
+// FSF API web pages: http://marte.unican.es/fsf/docs
+// http://shark.sssup.it/contrib/first/docs/
+//
+// This file is part of FOSA (Frsh Operating System Adaption)
//
-// FOSA 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. FOSA 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 FOSA; see file
-// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
-// Cambridge, MA 02139, USA.
+// FOSA 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. FOSA 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 FOSA; see file
+// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
+// Cambridge, MA 02139, USA.
//
-// As a special exception, including FOSA header files in a file,
-// instantiating FOSA generics or templates, or linking other files
-// with FOSA 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.
+// As a special exception, including FOSA header files in a file,
+// instantiating FOSA generics or templates, or linking other files
+// with FOSA 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.
// -----------------------------------------------------------------------
//fosa_configuration_parameters.h
//==============================================
+// -----------------------------------------------------------------------
+// Copyright (C) 2006 - 2008 FRESCOR consortium partners:
+//
+// Universidad de Cantabria, SPAIN
+// University of York, UK
+// Scuola Superiore Sant'Anna, ITALY
+// Kaiserslautern University, GERMANY
+// Univ. Politécnica Valencia, SPAIN
+// Czech Technical University in Prague, CZECH REPUBLIC
+// ENEA SWEDEN
+// Thales Communication S.A. FRANCE
+// 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
+// in part by the European Union Sixth Framework Programme
+// The European Union is not liable of any use that may be
+// made of this code.
+//
+//
+// 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
+// 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 FOSA (Frsh Operating System Adaption)
+//
+// FOSA 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. FOSA 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 FOSA; see file
+// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
+// Cambridge, MA 02139, USA.
+//
+// As a special exception, including FOSA header files in a file,
+// instantiating FOSA generics or templates, or linking other files
+// with FOSA 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.
+// -----------------------------------------------------------------------
+
+//==============================================
+// ******** ****** ******** **********
+// **///// /** ** **////// /** /**
+// ** /** ** /** /** /**
+// ******* /** ** /********* /**********
+// **//// /** ** ////////** /**//////**
+// ** /** ** /** /** /**
+// ** /** ** ******** /** /**
+// // /******/ //////// // //
+//
+// FOSA(Frescor Operating System Adaptation layer)
+//================================================
+
+
#ifndef _FOSA_CPP_MACROS_H_
#define _FOSA_CPP_MACROS_H_
#endif
#endif // _FOSA_CPP_MACROS_H_
-
-
+
+
-//----------------------------------------------------------------------
-// Copyright (C) 2006 - 2007 by the FRESCOR consortium:
+// -----------------------------------------------------------------------
+// Copyright (C) 2006 - 2008 FRESCOR consortium partners:
//
// Universidad de Cantabria, SPAIN
// University of York, UK
// Scuola Superiore Sant'Anna, ITALY
// Kaiserslautern University, GERMANY
-// Univ. Politecnica Valencia, SPAIN
+// Univ. Politécnica Valencia, SPAIN
// Czech Technical University in Prague, CZECH REPUBLIC
// ENEA SWEDEN
// Thales Communication S.A. FRANCE
// Rapita Systems Ltd UK
// Evidence ITALY
//
-// See http://www.frescor.org
+// See http://www.frescor.org for a link to partners' websites
//
-// The FRESCOR project (FP6/2005/IST/5-034026) is funded
+// FRESCOR project (FP6/2005/IST/5-034026) is funded
// in part by the European Union Sixth Framework Programme
// The European Union is not liable of any use that may be
// made of this code.
// Universidad de Cantabria, SPAIN
// University of York, UK
//
-// This file is part of FOSA (Frsh Operating System Abstraction)
+// FSF API web pages: http://marte.unican.es/fsf/docs
+// http://shark.sssup.it/contrib/first/docs/
+//
+// This file is part of FOSA (Frsh Operating System Adaption)
//
-// FOSA 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. FOSA 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 FOSA; see file
-// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
-// Cambridge, MA 02139, USA.
+// FOSA 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. FOSA 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 FOSA; see file
+// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
+// Cambridge, MA 02139, USA.
//
-// As a special exception, including FOSA header files in a file,
-// instantiating FOSA generics or templates, or linking other files
-// with FOSA 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.
+// As a special exception, including FOSA header files in a file,
+// instantiating FOSA generics or templates, or linking other files
+// with FOSA 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.
// -----------------------------------------------------------------------
//fosa_long_jump.h
//==============================================
-//----------------------------------------------------------------------
-// Copyright (C) 2006 - 2007 by the FRESCOR consortium:
+// -----------------------------------------------------------------------
+// Copyright (C) 2006 - 2008 FRESCOR consortium partners:
//
// Universidad de Cantabria, SPAIN
// University of York, UK
// Scuola Superiore Sant'Anna, ITALY
// Kaiserslautern University, GERMANY
-// Univ. Politecnica Valencia, SPAIN
+// Univ. Politécnica Valencia, SPAIN
// Czech Technical University in Prague, CZECH REPUBLIC
// ENEA SWEDEN
// Thales Communication S.A. FRANCE
// Rapita Systems Ltd UK
// Evidence ITALY
//
-// See http://www.frescor.org
+// See http://www.frescor.org for a link to partners' websites
//
-// The FRESCOR project (FP6/2005/IST/5-034026) is funded
+// FRESCOR project (FP6/2005/IST/5-034026) is funded
// in part by the European Union Sixth Framework Programme
// The European Union is not liable of any use that may be
// made of this code.
// Universidad de Cantabria, SPAIN
// University of York, UK
//
-// This file is part of FOSA (Frsh Operating System Abstraction)
+// FSF API web pages: http://marte.unican.es/fsf/docs
+// http://shark.sssup.it/contrib/first/docs/
+//
+// This file is part of FOSA (Frsh Operating System Adaption)
//
-// FOSA 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. FOSA 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 FOSA; see file
-// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
-// Cambridge, MA 02139, USA.
+// FOSA 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. FOSA 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 FOSA; see file
+// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
+// Cambridge, MA 02139, USA.
//
-// As a special exception, including FOSA header files in a file,
-// instantiating FOSA generics or templates, or linking other files
-// with FOSA 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.
+// As a special exception, including FOSA header files in a file,
+// instantiating FOSA generics or templates, or linking other files
+// with FOSA 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.
// -----------------------------------------------------------------------
//fosa_mutexes_and_condvars.h
//==============================================
-//----------------------------------------------------------------------
-// Copyright (C) 2006 - 2007 by the FRESCOR consortium:
+// -----------------------------------------------------------------------
+// Copyright (C) 2006 - 2008 FRESCOR consortium partners:
//
// Universidad de Cantabria, SPAIN
// University of York, UK
// Scuola Superiore Sant'Anna, ITALY
// Kaiserslautern University, GERMANY
-// Univ. Politecnica Valencia, SPAIN
+// Univ. Politécnica Valencia, SPAIN
// Czech Technical University in Prague, CZECH REPUBLIC
// ENEA SWEDEN
// Thales Communication S.A. FRANCE
// Rapita Systems Ltd UK
// Evidence ITALY
//
-// See http://www.frescor.org
+// See http://www.frescor.org for a link to partners' websites
//
-// The FRESCOR project (FP6/2005/IST/5-034026) is funded
+// FRESCOR project (FP6/2005/IST/5-034026) is funded
// in part by the European Union Sixth Framework Programme
// The European Union is not liable of any use that may be
// made of this code.
// Universidad de Cantabria, SPAIN
// University of York, UK
//
-// This file is part of FOSA (Frsh Operating System Abstraction)
+// FSF API web pages: http://marte.unican.es/fsf/docs
+// http://shark.sssup.it/contrib/first/docs/
+//
+// This file is part of FOSA (Frsh Operating System Adaption)
//
-// FOSA 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. FOSA 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 FOSA; see file
-// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
-// Cambridge, MA 02139, USA.
+// FOSA 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. FOSA 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 FOSA; see file
+// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
+// Cambridge, MA 02139, USA.
//
-// As a special exception, including FOSA header files in a file,
-// instantiating FOSA generics or templates, or linking other files
-// with FOSA 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.
+// As a special exception, including FOSA header files in a file,
+// instantiating FOSA generics or templates, or linking other files
+// with FOSA 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.
// -----------------------------------------------------------------------
//fosa_opaque_types.h
//==============================================
-//----------------------------------------------------------------------
-// Copyright (C) 2006 - 2007 by the FRESCOR consortium:
+// -----------------------------------------------------------------------
+// Copyright (C) 2006 - 2008 FRESCOR consortium partners:
//
// Universidad de Cantabria, SPAIN
// University of York, UK
// Scuola Superiore Sant'Anna, ITALY
// Kaiserslautern University, GERMANY
-// Univ. Politecnica Valencia, SPAIN
+// Univ. Politécnica Valencia, SPAIN
// Czech Technical University in Prague, CZECH REPUBLIC
// ENEA SWEDEN
// Thales Communication S.A. FRANCE
// Rapita Systems Ltd UK
// Evidence ITALY
//
-// See http://www.frescor.org
+// See http://www.frescor.org for a link to partners' websites
//
-// The FRESCOR project (FP6/2005/IST/5-034026) is funded
+// FRESCOR project (FP6/2005/IST/5-034026) is funded
// in part by the European Union Sixth Framework Programme
// The European Union is not liable of any use that may be
// made of this code.
// Universidad de Cantabria, SPAIN
// University of York, UK
//
-// This file is part of FOSA (Frsh Operating System Abstraction)
+// FSF API web pages: http://marte.unican.es/fsf/docs
+// http://shark.sssup.it/contrib/first/docs/
+//
+// This file is part of FOSA (Frsh Operating System Adaption)
//
-// FOSA 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. FOSA 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 FOSA; see file
-// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
-// Cambridge, MA 02139, USA.
+// FOSA 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. FOSA 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 FOSA; see file
+// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
+// Cambridge, MA 02139, USA.
//
-// As a special exception, including FOSA header files in a file,
-// instantiating FOSA generics or templates, or linking other files
-// with FOSA 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.
+// As a special exception, including FOSA header files in a file,
+// instantiating FOSA generics or templates, or linking other files
+// with FOSA 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.
// -----------------------------------------------------------------------
//fosa_opaque_types_time.h
//==============================================
-//----------------------------------------------------------------------
-// Copyright (C) 2006 - 2007 by the FRESCOR consortium:
+// -----------------------------------------------------------------------
+// Copyright (C) 2006 - 2008 FRESCOR consortium partners:
//
// Universidad de Cantabria, SPAIN
// University of York, UK
// Scuola Superiore Sant'Anna, ITALY
// Kaiserslautern University, GERMANY
-// Univ. Politecnica Valencia, SPAIN
+// Univ. Politécnica Valencia, SPAIN
// Czech Technical University in Prague, CZECH REPUBLIC
// ENEA SWEDEN
// Thales Communication S.A. FRANCE
// Rapita Systems Ltd UK
// Evidence ITALY
//
-// See http://www.frescor.org
+// See http://www.frescor.org for a link to partners' websites
//
-// The FRESCOR project (FP6/2005/IST/5-034026) is funded
+// FRESCOR project (FP6/2005/IST/5-034026) is funded
// in part by the European Union Sixth Framework Programme
// The European Union is not liable of any use that may be
// made of this code.
// Universidad de Cantabria, SPAIN
// University of York, UK
//
-// This file is part of FOSA (Frsh Operating System Abstraction)
+// FSF API web pages: http://marte.unican.es/fsf/docs
+// http://shark.sssup.it/contrib/first/docs/
+//
+// This file is part of FOSA (Frsh Operating System Adaption)
//
-// FOSA 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. FOSA 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 FOSA; see file
-// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
-// Cambridge, MA 02139, USA.
+// FOSA 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. FOSA 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 FOSA; see file
+// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
+// Cambridge, MA 02139, USA.
//
-// As a special exception, including FOSA header files in a file,
-// instantiating FOSA generics or templates, or linking other files
-// with FOSA 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.
+// As a special exception, including FOSA header files in a file,
+// instantiating FOSA generics or templates, or linking other files
+// with FOSA 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.
// -----------------------------------------------------------------------
//fosa_thread_and_signals.h
//==============================================
-//----------------------------------------------------------------------
-// Copyright (C) 2006 - 2007 by the FRESCOR consortium:
+// -----------------------------------------------------------------------
+// Copyright (C) 2006 - 2008 FRESCOR consortium partners:
//
// Universidad de Cantabria, SPAIN
// University of York, UK
// Scuola Superiore Sant'Anna, ITALY
// Kaiserslautern University, GERMANY
-// Univ. Politecnica Valencia, SPAIN
+// Univ. Politécnica Valencia, SPAIN
// Czech Technical University in Prague, CZECH REPUBLIC
// ENEA SWEDEN
// Thales Communication S.A. FRANCE
// Rapita Systems Ltd UK
// Evidence ITALY
//
-// See http://www.frescor.org
+// See http://www.frescor.org for a link to partners' websites
//
-// The FRESCOR project (FP6/2005/IST/5-034026) is funded
+// FRESCOR project (FP6/2005/IST/5-034026) is funded
// in part by the European Union Sixth Framework Programme
// The European Union is not liable of any use that may be
// made of this code.
// Universidad de Cantabria, SPAIN
// University of York, UK
//
-// This file is part of FOSA (Frsh Operating System Abstraction)
+// FSF API web pages: http://marte.unican.es/fsf/docs
+// http://shark.sssup.it/contrib/first/docs/
+//
+// This file is part of FOSA (Frsh Operating System Adaption)
//
-// FOSA 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. FOSA 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 FOSA; see file
-// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
-// Cambridge, MA 02139, USA.
+// FOSA 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. FOSA 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 FOSA; see file
+// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
+// Cambridge, MA 02139, USA.
//
-// As a special exception, including FOSA header files in a file,
-// instantiating FOSA generics or templates, or linking other files
-// with FOSA 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.
+// As a special exception, including FOSA header files in a file,
+// instantiating FOSA generics or templates, or linking other files
+// with FOSA 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.
// -----------------------------------------------------------------------
//fosa_time.h
//==============================================
-//----------------------------------------------------------------------
-// Copyright (C) 2006 - 2007 by the FRESCOR consortium:
+// -----------------------------------------------------------------------
+// Copyright (C) 2006 - 2008 FRESCOR consortium partners:
//
// Universidad de Cantabria, SPAIN
// University of York, UK
// Scuola Superiore Sant'Anna, ITALY
// Kaiserslautern University, GERMANY
-// Univ. Politecnica Valencia, SPAIN
+// Univ. Politécnica Valencia, SPAIN
// Czech Technical University in Prague, CZECH REPUBLIC
// ENEA SWEDEN
// Thales Communication S.A. FRANCE
// Rapita Systems Ltd UK
// Evidence ITALY
//
-// See http://www.frescor.org
+// See http://www.frescor.org for a link to partners' websites
//
-// The FRESCOR project (FP6/2005/IST/5-034026) is funded
+// FRESCOR project (FP6/2005/IST/5-034026) is funded
// in part by the European Union Sixth Framework Programme
// The European Union is not liable of any use that may be
// made of this code.
// Universidad de Cantabria, SPAIN
// University of York, UK
//
-// This file is part of FOSA (Frsh Operating System Abstraction)
+// FSF API web pages: http://marte.unican.es/fsf/docs
+// http://shark.sssup.it/contrib/first/docs/
+//
+// This file is part of FOSA (Frsh Operating System Adaption)
//
-// FOSA 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. FOSA 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 FOSA; see file
-// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
-// Cambridge, MA 02139, USA.
+// FOSA 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. FOSA 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 FOSA; see file
+// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
+// Cambridge, MA 02139, USA.
//
-// As a special exception, including FOSA header files in a file,
-// instantiating FOSA generics or templates, or linking other files
-// with FOSA 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.
+// As a special exception, including FOSA header files in a file,
+// instantiating FOSA generics or templates, or linking other files
+// with FOSA 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.
// -----------------------------------------------------------------------
//fosa_time_numeric.h
//==============================================
-//----------------------------------------------------------------------
-// Copyright (C) 2006 - 2007 by the FRESCOR consortium:
+// -----------------------------------------------------------------------
+// Copyright (C) 2006 - 2008 FRESCOR consortium partners:
//
// Universidad de Cantabria, SPAIN
// University of York, UK
// Scuola Superiore Sant'Anna, ITALY
// Kaiserslautern University, GERMANY
-// Univ. Politecnica Valencia, SPAIN
+// Univ. Politécnica Valencia, SPAIN
// Czech Technical University in Prague, CZECH REPUBLIC
// ENEA SWEDEN
// Thales Communication S.A. FRANCE
// Rapita Systems Ltd UK
// Evidence ITALY
//
-// See http://www.frescor.org
+// See http://www.frescor.org for a link to partners' websites
//
-// The FRESCOR project (FP6/2005/IST/5-034026) is funded
+// FRESCOR project (FP6/2005/IST/5-034026) is funded
// in part by the European Union Sixth Framework Programme
// The European Union is not liable of any use that may be
// made of this code.
// Universidad de Cantabria, SPAIN
// University of York, UK
//
-// This file is part of FOSA (Frsh Operating System Abstraction)
+// FSF API web pages: http://marte.unican.es/fsf/docs
+// http://shark.sssup.it/contrib/first/docs/
+//
+// This file is part of FOSA (Frsh Operating System Adaption)
//
-// FOSA 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. FOSA 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 FOSA; see file
-// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
-// Cambridge, MA 02139, USA.
+// FOSA 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. FOSA 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 FOSA; see file
+// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
+// Cambridge, MA 02139, USA.
//
-// As a special exception, including FOSA header files in a file,
-// instantiating FOSA generics or templates, or linking other files
-// with FOSA 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.
+// As a special exception, including FOSA header files in a file,
+// instantiating FOSA generics or templates, or linking other files
+// with FOSA 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.
// -----------------------------------------------------------------------
//fosa_time_timespec.h
//==============================================
-//----------------------------------------------------------------------
-// Copyright (C) 2006 - 2007 by the FRESCOR consortium:
+// -----------------------------------------------------------------------
+// Copyright (C) 2006 - 2008 FRESCOR consortium partners:
//
// Universidad de Cantabria, SPAIN
// University of York, UK
// Scuola Superiore Sant'Anna, ITALY
// Kaiserslautern University, GERMANY
-// Univ. Politecnica Valencia, SPAIN
+// Univ. Politécnica Valencia, SPAIN
// Czech Technical University in Prague, CZECH REPUBLIC
// ENEA SWEDEN
// Thales Communication S.A. FRANCE
// Rapita Systems Ltd UK
// Evidence ITALY
//
-// See http://www.frescor.org
+// See http://www.frescor.org for a link to partners' websites
//
-// The FRESCOR project (FP6/2005/IST/5-034026) is funded
+// FRESCOR project (FP6/2005/IST/5-034026) is funded
// in part by the European Union Sixth Framework Programme
// The European Union is not liable of any use that may be
// made of this code.
// Universidad de Cantabria, SPAIN
// University of York, UK
//
-// This file is part of FOSA (Frsh Operating System Abstraction)
+// FSF API web pages: http://marte.unican.es/fsf/docs
+// http://shark.sssup.it/contrib/first/docs/
+//
+// This file is part of FOSA (Frsh Operating System Adaption)
//
-// FOSA 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. FOSA 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 FOSA; see file
-// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
-// Cambridge, MA 02139, USA.
+// FOSA 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. FOSA 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 FOSA; see file
+// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
+// Cambridge, MA 02139, USA.
//
-// As a special exception, including FOSA header files in a file,
-// instantiating FOSA generics or templates, or linking other files
-// with FOSA 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.
+// As a special exception, including FOSA header files in a file,
+// instantiating FOSA generics or templates, or linking other files
+// with FOSA 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.
// -----------------------------------------------------------------------
//fosa_types.h
//==============================================
+------------------------------------------------------------------------------\r
+-- ------------------ M a R T E O S ------------------- --\r
+------------------------------------------------------------------------------\r
+-- {MARTE_VERSION}\r
+--\r
+-- 'C o n t e x t'\r
+--\r
+-- Body\r
+--\r
+-- File 'context.adb' By MAR\r
+--\r
+-- Processor context for non-local jumps\r
+--\r
+-- IMPORTANT: it must be compiled without any optimization!!\r
+--\r
+-- {MARTE_COPYRIGHT}\r
+--\r
+------------------------------------------------------------------------------\r
+-- {<MAR}\r
+--\r
+-- 02-08-07:version operativa.\r
+--\r
+-- {MAR>} -------------------------------------------------------------------\r
with Text_IO; use Text_IO;\r
with Basic_Integer_Types;\r
with Non_Local_Jump;\r
+------------------------------------------------------------------------------\r
+-- ------------------ M a R T E O S ------------------- --\r
+------------------------------------------------------------------------------\r
+-- {MARTE_VERSION}\r
+--\r
+-- 'C o n t e x t'\r
+--\r
+-- Spec\r
+--\r
+-- File 'context.ads' By MAR\r
+--\r
+-- Processor context for non-local jumps\r
+--\r
+-- IMPORTANT: it must be compiled without any optimization!!\r
+--\r
+-- {MARTE_COPYRIGHT}\r
+--\r
+------------------------------------------------------------------------------\r
+-- {<MAR}\r
+--\r
+-- 02-08-07:version operativa.\r
+--\r
+-- {MAR>} -------------------------------------------------------------------\r
package Context is\r
\r
type Work_Acc is access procedure;\r
+------------------------------------------------------------------------------\r
+-- ------------------ M a R T E O S ------------------- --\r
+------------------------------------------------------------------------------\r
+-- {MARTE_VERSION}\r
+--\r
+-- 'N o n _ L o c a l _ J u m p'\r
+--\r
+-- Spec\r
+--\r
+-- File 'non_local_jump.ads' By MAR\r
+--\r
+-- Non-local jumps for preempted tasks.\r
+--\r
+-- IMPORTANT: it must be compiled without any optimization!!\r
+--\r
+-- {MARTE_COPYRIGHT}\r
+--\r
+------------------------------------------------------------------------------\r
+-- {<MAR}\r
+--\r
+-- 02-08-07:version operativa.\r
+--\r
+-- {MAR>} -------------------------------------------------------------------\r
pragma Task_Dispatching_Policy (FIFO_Within_Priorities);\r
with MaRTE_OS;\r
with Text_IO; use Text_IO;\r
-//----------------------------------------------------------------------
-// Copyright (C) 2006 - 2007 by the FRESCOR consortium:
+// -----------------------------------------------------------------------
+// Copyright (C) 2006 - 2008 FRESCOR consortium partners:
//
// Universidad de Cantabria, SPAIN
// University of York, UK
// Scuola Superiore Sant'Anna, ITALY
// Kaiserslautern University, GERMANY
-// Univ. Politecnica Valencia, SPAIN
+// Univ. Politécnica Valencia, SPAIN
// Czech Technical University in Prague, CZECH REPUBLIC
// ENEA SWEDEN
// Thales Communication S.A. FRANCE
// Rapita Systems Ltd UK
// Evidence ITALY
//
-// See http://www.frescor.org
+// See http://www.frescor.org for a link to partners' websites
//
-// The FRESCOR project (FP6/2005/IST/5-034026) is funded
+// FRESCOR project (FP6/2005/IST/5-034026) is funded
// in part by the European Union Sixth Framework Programme
// The European Union is not liable of any use that may be
// made of this code.
// Universidad de Cantabria, SPAIN
// University of York, UK
//
-// This file is part of FOSA (Frsh Operating System Abstraction)
+// FSF API web pages: http://marte.unican.es/fsf/docs
+// http://shark.sssup.it/contrib/first/docs/
+//
+// This file is part of FOSA (Frsh Operating System Adaption)
//
-// FOSA 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. FOSA 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 FOSA; see file
-// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
-// Cambridge, MA 02139, USA.
+// FOSA 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. FOSA 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 FOSA; see file
+// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
+// Cambridge, MA 02139, USA.
//
-// As a special exception, including FOSA header files in a file,
-// instantiating FOSA generics or templates, or linking other files
-// with FOSA 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.
+// As a special exception, including FOSA header files in a file,
+// instantiating FOSA generics or templates, or linking other files
+// with FOSA 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.
// -----------------------------------------------------------------------
//fosa_app_def_sched.h
//==============================================
-//----------------------------------------------------------------------
-// Copyright (C) 2006 - 2007 by the FRESCOR consortium:
+// -----------------------------------------------------------------------
+// Copyright (C) 2006 - 2008 FRESCOR consortium partners:
//
// Universidad de Cantabria, SPAIN
// University of York, UK
// Scuola Superiore Sant'Anna, ITALY
// Kaiserslautern University, GERMANY
-// Univ. Politecnica Valencia, SPAIN
+// Univ. Politécnica Valencia, SPAIN
// Czech Technical University in Prague, CZECH REPUBLIC
// ENEA SWEDEN
// Thales Communication S.A. FRANCE
// Rapita Systems Ltd UK
// Evidence ITALY
//
-// See http://www.frescor.org
+// See http://www.frescor.org for a link to partners' websites
//
-// The FRESCOR project (FP6/2005/IST/5-034026) is funded
+// FRESCOR project (FP6/2005/IST/5-034026) is funded
// in part by the European Union Sixth Framework Programme
// The European Union is not liable of any use that may be
// made of this code.
// Universidad de Cantabria, SPAIN
// University of York, UK
//
-// This file is part of FOSA (Frsh Operating System Abstraction)
+// FSF API web pages: http://marte.unican.es/fsf/docs
+// http://shark.sssup.it/contrib/first/docs/
+//
+// This file is part of FOSA (Frsh Operating System Adaption)
//
-// FOSA 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. FOSA 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 FOSA; see file
-// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
-// Cambridge, MA 02139, USA.
+// FOSA 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. FOSA 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 FOSA; see file
+// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
+// Cambridge, MA 02139, USA.
//
-// As a special exception, including FOSA header files in a file,
-// instantiating FOSA generics or templates, or linking other files
-// with FOSA 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.
+// As a special exception, including FOSA header files in a file,
+// instantiating FOSA generics or templates, or linking other files
+// with FOSA 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.
// -----------------------------------------------------------------------
//fosa_clocks_and_timers.c
//==============================================
-//----------------------------------------------------------------------
-// Copyright (C) 2006 - 2007 by the FRESCOR consortium:
+// -----------------------------------------------------------------------
+// Copyright (C) 2006 - 2008 FRESCOR consortium partners:
//
// Universidad de Cantabria, SPAIN
// University of York, UK
// Scuola Superiore Sant'Anna, ITALY
// Kaiserslautern University, GERMANY
-// Univ. Politecnica Valencia, SPAIN
+// Univ. Politécnica Valencia, SPAIN
// Czech Technical University in Prague, CZECH REPUBLIC
// ENEA SWEDEN
// Thales Communication S.A. FRANCE
// Rapita Systems Ltd UK
// Evidence ITALY
//
-// See http://www.frescor.org
+// See http://www.frescor.org for a link to partners' websites
//
-// The FRESCOR project (FP6/2005/IST/5-034026) is funded
+// FRESCOR project (FP6/2005/IST/5-034026) is funded
// in part by the European Union Sixth Framework Programme
// The European Union is not liable of any use that may be
// made of this code.
// Universidad de Cantabria, SPAIN
// University of York, UK
//
-// This file is part of FOSA (Frsh Operating System Abstraction)
+// FSF API web pages: http://marte.unican.es/fsf/docs
+// http://shark.sssup.it/contrib/first/docs/
+//
+// This file is part of FOSA (Frsh Operating System Adaption)
//
-// FOSA 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. FOSA 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 FOSA; see file
-// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
-// Cambridge, MA 02139, USA.
+// FOSA 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. FOSA 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 FOSA; see file
+// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
+// Cambridge, MA 02139, USA.
//
-// As a special exception, including FOSA header files in a file,
-// instantiating FOSA generics or templates, or linking other files
-// with FOSA 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.
+// As a special exception, including FOSA header files in a file,
+// instantiating FOSA generics or templates, or linking other files
+// with FOSA 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.
// -----------------------------------------------------------------------
//fosa_long_jump.c
//==============================================
-//----------------------------------------------------------------------
-// Copyright (C) 2006 - 2007 by the FRESCOR consortium:
+// -----------------------------------------------------------------------
+// Copyright (C) 2006 - 2008 FRESCOR consortium partners:
//
// Universidad de Cantabria, SPAIN
// University of York, UK
// Scuola Superiore Sant'Anna, ITALY
// Kaiserslautern University, GERMANY
-// Univ. Politecnica Valencia, SPAIN
+// Univ. Politécnica Valencia, SPAIN
// Czech Technical University in Prague, CZECH REPUBLIC
// ENEA SWEDEN
// Thales Communication S.A. FRANCE
// Rapita Systems Ltd UK
// Evidence ITALY
//
-// See http://www.frescor.org
+// See http://www.frescor.org for a link to partners' websites
//
-// The FRESCOR project (FP6/2005/IST/5-034026) is funded
+// FRESCOR project (FP6/2005/IST/5-034026) is funded
// in part by the European Union Sixth Framework Programme
// The European Union is not liable of any use that may be
// made of this code.
// Universidad de Cantabria, SPAIN
// University of York, UK
//
-// This file is part of FOSA (Frsh Operating System Abstraction)
+// FSF API web pages: http://marte.unican.es/fsf/docs
+// http://shark.sssup.it/contrib/first/docs/
+//
+// This file is part of FOSA (Frsh Operating System Adaption)
//
-// FOSA 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. FOSA 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 FOSA; see file
-// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
-// Cambridge, MA 02139, USA.
+// FOSA 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. FOSA 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 FOSA; see file
+// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
+// Cambridge, MA 02139, USA.
//
-// As a special exception, including FOSA header files in a file,
-// instantiating FOSA generics or templates, or linking other files
-// with FOSA 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.
+// As a special exception, including FOSA header files in a file,
+// instantiating FOSA generics or templates, or linking other files
+// with FOSA 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.
// -----------------------------------------------------------------------
//fosa_mutexes_and_condvars.c
//==============================================
-//----------------------------------------------------------------------
-// Copyright (C) 2006 - 2007 by the FRESCOR consortium:
+// -----------------------------------------------------------------------
+// Copyright (C) 2006 - 2008 FRESCOR consortium partners:
//
// Universidad de Cantabria, SPAIN
// University of York, UK
// Scuola Superiore Sant'Anna, ITALY
// Kaiserslautern University, GERMANY
-// Univ. Politecnica Valencia, SPAIN
+// Univ. Politécnica Valencia, SPAIN
// Czech Technical University in Prague, CZECH REPUBLIC
// ENEA SWEDEN
// Thales Communication S.A. FRANCE
// Rapita Systems Ltd UK
// Evidence ITALY
//
-// See http://www.frescor.org
+// See http://www.frescor.org for a link to partners' websites
//
-// The FRESCOR project (FP6/2005/IST/5-034026) is funded
+// FRESCOR project (FP6/2005/IST/5-034026) is funded
// in part by the European Union Sixth Framework Programme
// The European Union is not liable of any use that may be
// made of this code.
// Universidad de Cantabria, SPAIN
// University of York, UK
//
-// This file is part of FOSA (Frsh Operating System Abstraction)
+// FSF API web pages: http://marte.unican.es/fsf/docs
+// http://shark.sssup.it/contrib/first/docs/
+//
+// This file is part of FOSA (Frsh Operating System Adaption)
//
-// FOSA 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. FOSA 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 FOSA; see file
-// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
-// Cambridge, MA 02139, USA.
+// FOSA 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. FOSA 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 FOSA; see file
+// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
+// Cambridge, MA 02139, USA.
//
-// As a special exception, including FOSA header files in a file,
-// instantiating FOSA generics or templates, or linking other files
-// with FOSA 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.
+// As a special exception, including FOSA header files in a file,
+// instantiating FOSA generics or templates, or linking other files
+// with FOSA 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.
// -----------------------------------------------------------------------
//fosa_threads_and_signals.c
//==============================================
-//----------------------------------------------------------------------
-// Copyright (C) 2006 - 2007 by the FRESCOR consortium:
+// -----------------------------------------------------------------------
+// Copyright (C) 2006 - 2008 FRESCOR consortium partners:
//
// Universidad de Cantabria, SPAIN
// University of York, UK
// Scuola Superiore Sant'Anna, ITALY
// Kaiserslautern University, GERMANY
-// Univ. Politecnica Valencia, SPAIN
+// Univ. Politécnica Valencia, SPAIN
// Czech Technical University in Prague, CZECH REPUBLIC
// ENEA SWEDEN
// Thales Communication S.A. FRANCE
// Rapita Systems Ltd UK
// Evidence ITALY
//
-// See http://www.frescor.org
+// See http://www.frescor.org for a link to partners' websites
//
-// The FRESCOR project (FP6/2005/IST/5-034026) is funded
+// FRESCOR project (FP6/2005/IST/5-034026) is funded
// in part by the European Union Sixth Framework Programme
// The European Union is not liable of any use that may be
// made of this code.
// Universidad de Cantabria, SPAIN
// University of York, UK
//
-// This file is part of FOSA (Frsh Operating System Abstraction)
+// FSF API web pages: http://marte.unican.es/fsf/docs
+// http://shark.sssup.it/contrib/first/docs/
+//
+// This file is part of FOSA (Frsh Operating System Adaption)
//
-// FOSA 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. FOSA 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 FOSA; see file
-// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
-// Cambridge, MA 02139, USA.
+// FOSA 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. FOSA 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 FOSA; see file
+// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
+// Cambridge, MA 02139, USA.
//
-// As a special exception, including FOSA header files in a file,
-// instantiating FOSA generics or templates, or linking other files
-// with FOSA 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.
+// As a special exception, including FOSA header files in a file,
+// instantiating FOSA generics or templates, or linking other files
+// with FOSA 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.
// -----------------------------------------------------------------------
// fosa_time.c
//==============================================
+// -----------------------------------------------------------------------
+// Copyright (C) 2006 - 2008 FRESCOR consortium partners:
+//
+// Universidad de Cantabria, SPAIN
+// University of York, UK
+// Scuola Superiore Sant'Anna, ITALY
+// Kaiserslautern University, GERMANY
+// Univ. Politécnica Valencia, SPAIN
+// Czech Technical University in Prague, CZECH REPUBLIC
+// ENEA SWEDEN
+// Thales Communication S.A. FRANCE
+// 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
+// in part by the European Union Sixth Framework Programme
+// The European Union is not liable of any use that may be
+// made of this code.
+//
+//
+// 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
+// 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 FOSA (Frsh Operating System Adaption)
+//
+// FOSA 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. FOSA 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 FOSA; see file
+// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
+// Cambridge, MA 02139, USA.
+//
+// As a special exception, including FOSA header files in a file,
+// instantiating FOSA generics or templates, or linking other files
+// with FOSA 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.
+// -----------------------------------------------------------------------
+
#include <unistd.h>
#include <stdio.h>
#include <time.h> // for nanosleep
+// -----------------------------------------------------------------------
+// Copyright (C) 2006 - 2008 FRESCOR consortium partners:
+//
+// Universidad de Cantabria, SPAIN
+// University of York, UK
+// Scuola Superiore Sant'Anna, ITALY
+// Kaiserslautern University, GERMANY
+// Univ. Politécnica Valencia, SPAIN
+// Czech Technical University in Prague, CZECH REPUBLIC
+// ENEA SWEDEN
+// Thales Communication S.A. FRANCE
+// 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
+// in part by the European Union Sixth Framework Programme
+// The European Union is not liable of any use that may be
+// made of this code.
+//
+//
+// 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
+// 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 FOSA (Frsh Operating System Adaption)
+//
+// FOSA 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. FOSA 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 FOSA; see file
+// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
+// Cambridge, MA 02139, USA.
+//
+// As a special exception, including FOSA header files in a file,
+// instantiating FOSA generics or templates, or linking other files
+// with FOSA 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.
+// -----------------------------------------------------------------------
+
+
#include <unistd.h>
#include <stdio.h>
static fosa_abs_time_t start_execution;
static fosa_abs_time_t signal_reception;
-int main ()
+int main ()
{
int err = -1;
/* Set the signal mask */
/***********************/
signal_set[0] = SIGNAL_TIMER;
- if (fosa_set_accepted_signals(signal_set, 1) !=0)
+ if (fosa_set_accepted_signals(signal_set, 1) !=0)
{
- printf ("Error while setting the signal mask\n");
+ printf ("Error while setting the signal mask\n");
exit (1);
}
/* Get the thread's cputime clock */
/**********************************/
- if (fosa_thread_get_cputime_clock(tid, &clockid) !=0)
+ if (fosa_thread_get_cputime_clock(tid, &clockid) !=0)
{
exit(RT_ERROR_TIMER);
}
fosa_clock_get_time(FOSA_CLOCK_REALTIME, &start_execution);
- while(1)
+ while(1)
{
err = fosa_clock_get_time(FOSA_CLOCK_REALTIME, &before_work_time);
assert(err == 0);
+// -----------------------------------------------------------------------
+// Copyright (C) 2006 - 2008 FRESCOR consortium partners:
+//
+// Universidad de Cantabria, SPAIN
+// University of York, UK
+// Scuola Superiore Sant'Anna, ITALY
+// Kaiserslautern University, GERMANY
+// Univ. Politécnica Valencia, SPAIN
+// Czech Technical University in Prague, CZECH REPUBLIC
+// ENEA SWEDEN
+// Thales Communication S.A. FRANCE
+// 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
+// in part by the European Union Sixth Framework Programme
+// The European Union is not liable of any use that may be
+// made of this code.
+//
+//
+// 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
+// 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 FOSA (Frsh Operating System Adaption)
+//
+// FOSA 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. FOSA 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 FOSA; see file
+// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
+// Cambridge, MA 02139, USA.
+//
+// As a special exception, including FOSA header files in a file,
+// instantiating FOSA generics or templates, or linking other files
+// with FOSA 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.
+// -----------------------------------------------------------------------
+
#include <unistd.h>
#include <stdio.h>
#include <time.h> // for nanosleep
static fosa_abs_time_t start_execution;
static fosa_abs_time_t signal_reception;
-int main ()
+int main ()
{
int err = -1;
/* Set the signal mask */
/***********************/
signal_set[0] = SIGNAL_TIMER;
- if (fosa_set_accepted_signals(signal_set, 1) !=0)
+ if (fosa_set_accepted_signals(signal_set, 1) !=0)
{
- printf ("Error while setting the signal mask\n");
+ printf ("Error while setting the signal mask\n");
exit (1);
}
printf("signal received=%d value=%d (42?), err=%d\n",
signal_received, info_received.sival_int, err);
- printf("Elapsed time between sigwait and timer expiration: %ld msecs\n",
+ printf("Elapsed time between sigwait and timer expiration: %ld msecs\n",
fosa_rel_time_to_msec(elapsed_time) );
return 0;
/* Get the thread's cputime clock */
/**********************************/
- if (fosa_thread_get_cputime_clock(fosa_thread_self(), &clockid) !=0)
+ if (fosa_thread_get_cputime_clock(fosa_thread_self(), &clockid) !=0)
{
exit(RT_ERROR_TIMER);
}
fosa_clock_get_time(FOSA_CLOCK_REALTIME, &start_execution);
- while(1)
+ while(1)
{
err = fosa_clock_get_time(FOSA_CLOCK_REALTIME, &before_work_time);
assert(err == 0);
-//----------------------------------------------------------------------
-// Copyright (C) 2006 - 2007 by the FRESCOR consortium:
+// -----------------------------------------------------------------------
+// Copyright (C) 2006 - 2008 FRESCOR consortium partners:
//
// Universidad de Cantabria, SPAIN
// University of York, UK
// Scuola Superiore Sant'Anna, ITALY
// Kaiserslautern University, GERMANY
-// Univ. Politecnica Valencia, SPAIN
+// Univ. Politécnica Valencia, SPAIN
// Czech Technical University in Prague, CZECH REPUBLIC
// ENEA SWEDEN
// Thales Communication S.A. FRANCE
// Rapita Systems Ltd UK
// Evidence ITALY
//
-// See http://www.frescor.org
+// See http://www.frescor.org for a link to partners' websites
//
-// The FRESCOR project (FP6/2005/IST/5-034026) is funded
+// FRESCOR project (FP6/2005/IST/5-034026) is funded
// in part by the European Union Sixth Framework Programme
// The European Union is not liable of any use that may be
// made of this code.
// Universidad de Cantabria, SPAIN
// University of York, UK
//
-// This file is part of FOSA (Frsh Operating System Abstraction)
+// FSF API web pages: http://marte.unican.es/fsf/docs
+// http://shark.sssup.it/contrib/first/docs/
+//
+// This file is part of FOSA (Frsh Operating System Adaption)
//
-// FOSA 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. FOSA 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 FOSA; see file
-// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
-// Cambridge, MA 02139, USA.
+// FOSA 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. FOSA 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 FOSA; see file
+// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
+// Cambridge, MA 02139, USA.
//
-// As a special exception, including FOSA header files in a file,
-// instantiating FOSA generics or templates, or linking other files
-// with FOSA 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.
+// As a special exception, including FOSA header files in a file,
+// instantiating FOSA generics or templates, or linking other files
+// with FOSA 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.
// -----------------------------------------------------------------------
#include <stdio.h> // for printf
-//----------------------------------------------------------------------
-// Copyright (C) 2006 - 2007 by the FRESCOR consortium:
+// -----------------------------------------------------------------------
+// Copyright (C) 2006 - 2008 FRESCOR consortium partners:
//
// Universidad de Cantabria, SPAIN
// University of York, UK
// Scuola Superiore Sant'Anna, ITALY
// Kaiserslautern University, GERMANY
-// Univ. Politecnica Valencia, SPAIN
+// Univ. Politécnica Valencia, SPAIN
// Czech Technical University in Prague, CZECH REPUBLIC
// ENEA SWEDEN
// Thales Communication S.A. FRANCE
// Rapita Systems Ltd UK
// Evidence ITALY
//
-// See http://www.frescor.org
+// See http://www.frescor.org for a link to partners' websites
//
-// The FRESCOR project (FP6/2005/IST/5-034026) is funded
+// FRESCOR project (FP6/2005/IST/5-034026) is funded
// in part by the European Union Sixth Framework Programme
// The European Union is not liable of any use that may be
// made of this code.
// Universidad de Cantabria, SPAIN
// University of York, UK
//
-// This file is part of FOSA (Frsh Operating System Abstraction)
+// FSF API web pages: http://marte.unican.es/fsf/docs
+// http://shark.sssup.it/contrib/first/docs/
+//
+// This file is part of FOSA (Frsh Operating System Adaption)
//
-// FOSA 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. FOSA 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 FOSA; see file
-// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
-// Cambridge, MA 02139, USA.
+// FOSA 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. FOSA 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 FOSA; see file
+// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
+// Cambridge, MA 02139, USA.
//
-// As a special exception, including FOSA header files in a file,
-// instantiating FOSA generics or templates, or linking other files
-// with FOSA 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.
+// As a special exception, including FOSA header files in a file,
+// instantiating FOSA generics or templates, or linking other files
+// with FOSA 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.
// -----------------------------------------------------------------------
#include <unistd.h>
-//----------------------------------------------------------------------
-// Copyright (C) 2006 - 2007 by the FRESCOR consortium:
+// -----------------------------------------------------------------------
+// Copyright (C) 2006 - 2008 FRESCOR consortium partners:
//
// Universidad de Cantabria, SPAIN
// University of York, UK
// Scuola Superiore Sant'Anna, ITALY
// Kaiserslautern University, GERMANY
-// Univ. Politecnica Valencia, SPAIN
+// Univ. Politécnica Valencia, SPAIN
// Czech Technical University in Prague, CZECH REPUBLIC
// ENEA SWEDEN
// Thales Communication S.A. FRANCE
// Rapita Systems Ltd UK
// Evidence ITALY
//
-// See http://www.frescor.org
+// See http://www.frescor.org for a link to partners' websites
//
-// The FRESCOR project (FP6/2005/IST/5-034026) is funded
+// FRESCOR project (FP6/2005/IST/5-034026) is funded
// in part by the European Union Sixth Framework Programme
// The European Union is not liable of any use that may be
// made of this code.
// Universidad de Cantabria, SPAIN
// University of York, UK
//
-// This file is part of FRSH (FRescor ScHeduler)
+// FSF API web pages: http://marte.unican.es/fsf/docs
+// http://shark.sssup.it/contrib/first/docs/
+//
+// This file is part of FOSA (Frsh Operating System Adaption)
//
-// 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.
+// FOSA 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. FOSA 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 FOSA; see file
+// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
+// Cambridge, MA 02139, USA.
//
-// 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.
+// As a special exception, including FOSA header files in a file,
+// instantiating FOSA generics or templates, or linking other files
+// with FOSA 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.
// -----------------------------------------------------------------------
// 11-Jul-2007 SANGORRIN change calibrate and eat because it didn't work for
// MaRTE OS linux_arch
-/*
-** testbench_long_jump.c
-**
-** Made by (Miguel marciano)
-** Login <miguel@namir.ctr.unican.es>
-**
-** Started on Fri Nov 23 11:42:09 2007 Miguel marciano
-** Last update Sun May 12 01:17:25 2002 Speed Blue
-*/
+// -----------------------------------------------------------------------
+// Copyright (C) 2006 - 2008 FRESCOR consortium partners:
+//
+// Universidad de Cantabria, SPAIN
+// University of York, UK
+// Scuola Superiore Sant'Anna, ITALY
+// Kaiserslautern University, GERMANY
+// Univ. Politécnica Valencia, SPAIN
+// Czech Technical University in Prague, CZECH REPUBLIC
+// ENEA SWEDEN
+// Thales Communication S.A. FRANCE
+// 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
+// in part by the European Union Sixth Framework Programme
+// The European Union is not liable of any use that may be
+// made of this code.
+//
+//
+// 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
+// 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 FOSA (Frsh Operating System Adaption)
+//
+// FOSA 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. FOSA 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 FOSA; see file
+// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
+// Cambridge, MA 02139, USA.
+//
+// As a special exception, including FOSA header files in a file,
+// instantiating FOSA generics or templates, or linking other files
+// with FOSA 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.
+// -----------------------------------------------------------------------
+
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
memset(&clock_id, 0, sizeof(clock_id) );
memset(&jump_timer, 0, sizeof(jump_timer) );
-
+
/* We install a long jump handler */
/* - This creates the thread that will wait for */
/* FOSA_JUMP_SIGNAL */
/************************************************/
CHK( fosa_long_jump_install_handler(&jump_signal, &jump_handler_thread) );
-
+
/* We create a budget timer using the thread's CPU clock */
/* */
/* When the timer expires: */
/*********************************************************/
CHK( fosa_thread_get_cputime_clock( fosa_thread_self(), &clock_id) );
jump_signal_info.sival_ptr = &context;
- CHK( fosa_timer_create_with_receiver(clock_id, jump_signal, jump_signal_info,
+ CHK( fosa_timer_create_with_receiver(clock_id, jump_signal, jump_signal_info,
&jump_timer, jump_handler_thread) );
-
+
/* Periodic loop */
/*****************/
while (1)
printf("JUMPPPPPEEED\n");
}
-
+
/* End of interruptible work */
/*****************************/
printf("After interruptible block\n");
-
+
/* Now we measure the time duration of the block */
/*************************************************/
CHK( fosa_clock_get_time(FOSA_CLOCK_REALTIME, &after_activation_time) );
elapsed_time = fosa_abs_time_extract_interval(activation_time, after_activation_time);
printf("Execution time: %ld msec\n", fosa_rel_time_to_msec(after_activation_time) );
-
+
/* And we program the next loop */
activation_time = fosa_abs_time_incr(activation_time, period);
activation_time_tspec = fosa_abs_time_to_timespec(activation_time);
clock_nanosleep(FOSA_CLOCK_REALTIME, TIMER_ABSTIME, &activation_time_tspec,
NULL);
}
-
+
return NULL;
}
}
printf("End regular work\n");
-
+
}
-/*
-** testbench_long_jump.c
-**
-** Made by (Miguel marciano)
-** Login <miguel@namir.ctr.unican.es>
-**
-** Started on Fri Nov 23 11:42:09 2007 Miguel marciano
-** Last update Sun May 12 01:17:25 2002 Speed Blue
-*/
+// -----------------------------------------------------------------------
+// Copyright (C) 2006 - 2008 FRESCOR consortium partners:
+//
+// Universidad de Cantabria, SPAIN
+// University of York, UK
+// Scuola Superiore Sant'Anna, ITALY
+// Kaiserslautern University, GERMANY
+// Univ. Politécnica Valencia, SPAIN
+// Czech Technical University in Prague, CZECH REPUBLIC
+// ENEA SWEDEN
+// Thales Communication S.A. FRANCE
+// 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
+// in part by the European Union Sixth Framework Programme
+// The European Union is not liable of any use that may be
+// made of this code.
+//
+//
+// 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
+// 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 FOSA (Frsh Operating System Adaption)
+//
+// FOSA 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. FOSA 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 FOSA; see file
+// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
+// Cambridge, MA 02139, USA.
+//
+// As a special exception, including FOSA header files in a file,
+// instantiating FOSA generics or templates, or linking other files
+// with FOSA 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.
+// -----------------------------------------------------------------------
/*
TO DO:
printf("Main waits for the periodic code to finish...\n");
pthread_join(periodic_tid, NULL);
-
+
results.average_jump_interval_ms = results.total_jump_interval_ms/results.number_of_jumps;
printf("------------ RESULTS -------------\n");
results = (results_t *) thread_arg;
-
+
/* We install a long jump handler */
/* - This creates the thread that will wait for */
/* FOSA_JUMP_SIGNAL */
/************************************************/
CHK( fosa_long_jump_install_handler(&jump_signal, &jump_handler_thread) );
-
+
/* We create a budget timer using the thread's CPU clock */
/* */
/* When the timer expires: */
/*********************************************************/
CHK( fosa_thread_get_cputime_clock( fosa_thread_self(), &clock_id) );
jump_signal_info.sival_ptr = &context;
- CHK( fosa_timer_create_with_receiver(clock_id, jump_signal, jump_signal_info,
+ CHK( fosa_timer_create_with_receiver(clock_id, jump_signal, jump_signal_info,
&jump_timer, jump_handler_thread) );
results->number_of_jumps = 0;
fosa_rel_time_t jump_interval;
double jump_interval_ms = 0.0;
-
+
/* We initialise variables */
jumped = 0;
/* We arm the jump_timer */
fosa_rel_timer_arm(jump_timer, &budget);
-
+
/* This is the point where the jump returns */
fosa_long_jump_save_context(&context);
results->min_jump_interval_ms = jump_interval_ms;
results->iteration_min_jump_interval = results->number_of_jumps;
}
-
+
printf("Jump Iteration: %d\r", results->number_of_jumps);
}
/*****************************/
}
-
-
+
+
return NULL;
}
-/*
-** test_queue_signal.c
-**
-** Made by (Miguel marciano)
-** Login <miguel@namir.ctr.unican.es>
-**
-** Started on Thu Nov 8 16:22:18 2007 Miguel marciano
-** Last update Sun May 12 01:17:25 2002 Speed Blue
-*/
+// -----------------------------------------------------------------------
+// Copyright (C) 2006 - 2008 FRESCOR consortium partners:
+//
+// Universidad de Cantabria, SPAIN
+// University of York, UK
+// Scuola Superiore Sant'Anna, ITALY
+// Kaiserslautern University, GERMANY
+// Univ. Politécnica Valencia, SPAIN
+// Czech Technical University in Prague, CZECH REPUBLIC
+// ENEA SWEDEN
+// Thales Communication S.A. FRANCE
+// 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
+// in part by the European Union Sixth Framework Programme
+// The European Union is not liable of any use that may be
+// made of this code.
+//
+//
+// 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
+// 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 FOSA (Frsh Operating System Adaption)
+//
+// FOSA 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. FOSA 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 FOSA; see file
+// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
+// Cambridge, MA 02139, USA.
+//
+// As a special exception, including FOSA header files in a file,
+// instantiating FOSA generics or templates, or linking other files
+// with FOSA 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.
+// -----------------------------------------------------------------------
#include <stdio.h>
#include <string.h>
terror = fosa_set_accepted_signals(signal_set, 1);
if (terror != 0) exit(1);
-
+
/* We create a timer based on the FOSA_CLOCK_REALTIME */
/******************************************************/
terror = fosa_clock_get_time(FOSA_CLOCK_REALTIME, ¤t_time);
if (terror != 0) exit(1);
printf("Current time: %ld msec\n", fosa_abs_time_to_msec(current_time) );
-
+
/* I arm the timer to the past */
/* Since we have blocked this signal, the signal should be stored */
/******************************************************************/
-//----------------------------------------------------------------------
-// Copyright (C) 2006 - 2007 by the FRESCOR consortium:
+// -----------------------------------------------------------------------
+// Copyright (C) 2006 - 2008 FRESCOR consortium partners:
//
// Universidad de Cantabria, SPAIN
// University of York, UK
// Scuola Superiore Sant'Anna, ITALY
// Kaiserslautern University, GERMANY
-// Univ. Politecnica Valencia, SPAIN
+// Univ. Politécnica Valencia, SPAIN
// Czech Technical University in Prague, CZECH REPUBLIC
// ENEA SWEDEN
// Thales Communication S.A. FRANCE
// Rapita Systems Ltd UK
// Evidence ITALY
//
-// See http://www.frescor.org
+// See http://www.frescor.org for a link to partners' websites
//
-// The FRESCOR project (FP6/2005/IST/5-034026) is funded
+// FRESCOR project (FP6/2005/IST/5-034026) is funded
// in part by the European Union Sixth Framework Programme
// The European Union is not liable of any use that may be
// made of this code.
// Universidad de Cantabria, SPAIN
// University of York, UK
//
-// This file is part of FRSH (FRescor ScHeduler)
+// FSF API web pages: http://marte.unican.es/fsf/docs
+// http://shark.sssup.it/contrib/first/docs/
+//
+// This file is part of FOSA (Frsh Operating System Adaption)
//
-// 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.
+// FOSA 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. FOSA 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 FOSA; see file
+// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
+// Cambridge, MA 02139, USA.
//
-// 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.
+// As a special exception, including FOSA header files in a file,
+// instantiating FOSA generics or templates, or linking other files
+// with FOSA 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.
// -----------------------------------------------------------------------
#include "fosa.h"
#include <assert.h>
// -----------------------------------------------------------------------
-// Copyright (C) 2006 - 2007 FRESCOR consortium partners:
+// Copyright (C) 2006 - 2008 FRESCOR consortium partners:
//
// Universidad de Cantabria, SPAIN
// University of York, UK
// Scuola Superiore Sant'Anna, ITALY
// Kaiserslautern University, GERMANY
-// Univ. Politecnica Valencia, SPAIN
+// Univ. Politécnica Valencia, SPAIN
// Czech Technical University in Prague, CZECH REPUBLIC
// ENEA SWEDEN
// Thales Communication S.A. FRANCE
// The European Union is not liable of any use that may be
// made of this code.
//
-// This file is part of the FRSH implementation
//
-// FRSH 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.
+// based on previous work (FSF) done in the FIRST project
//
-// 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.
+// Copyright (C) 2005 Mälardalen University, SWEDEN
+// Scuola Superiore S.Anna, ITALY
+// Universidad de Cantabria, SPAIN
+// University of York, UK
//
-// You should have received a copy of the GNU General Public License
-// distributed with FRSH; see file COPYING. If not, write to the
-// Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-// 02111-1307, USA.
+// FSF API web pages: http://marte.unican.es/fsf/docs
+// http://shark.sssup.it/contrib/first/docs/
//
-// 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.
+// This file is part of FOSA (Frsh Operating System Adaption)
+//
+// FOSA 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. FOSA 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 FOSA; see file
+// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
+// Cambridge, MA 02139, USA.
+//
+// As a special exception, including FOSA header files in a file,
+// instantiating FOSA generics or templates, or linking other files
+// with FOSA 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.
// -----------------------------------------------------------------------
//==============================================
// ******** ****** ******** **********
// -----------------------------------------------------------------------
-// Copyright (C) 2006 - 2007 FRESCOR consortium partners:
+// Copyright (C) 2006 - 2008 FRESCOR consortium partners:
//
// Universidad de Cantabria, SPAIN
// University of York, UK
// Scuola Superiore Sant'Anna, ITALY
// Kaiserslautern University, GERMANY
-// Univ. Politecnica Valencia, SPAIN
+// Univ. Politécnica Valencia, SPAIN
// Czech Technical University in Prague, CZECH REPUBLIC
// ENEA SWEDEN
// Thales Communication S.A. FRANCE
// 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
// The European Union is not liable of any use that may be
// made of this code.
//
-// This file is part of the FRSH implementation
//
-// FRSH 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.
+// 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
+// University of York, UK
+//
+// FSF API web pages: http://marte.unican.es/fsf/docs
+// http://shark.sssup.it/contrib/first/docs/
//
-// 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.
+// This file is part of FOSA (Frsh Operating System Adaption)
//
-// You should have received a copy of the GNU General Public License
-// distributed with FRSH; see file COPYING. If not, write to the
-// Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-// 02111-1307, USA.
+// FOSA 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. FOSA 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 FOSA; see file
+// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
+// Cambridge, MA 02139, 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 FOSA header files in a file,
+// instantiating FOSA generics or templates, or linking other files
+// with FOSA 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.
// -----------------------------------------------------------------------
//==============================================
// ******** ****** ******** **********
-//----------------------------------------------------------------------
-// Copyright (C) 2006 - 2007 by the FRESCOR consortium:
+// -----------------------------------------------------------------------
+// Copyright (C) 2006 - 2008 FRESCOR consortium partners:
//
// Universidad de Cantabria, SPAIN
// University of York, UK
// Scuola Superiore Sant'Anna, ITALY
// Kaiserslautern University, GERMANY
-// Univ. Politecnica Valencia, SPAIN
+// Univ. Politécnica Valencia, SPAIN
// Czech Technical University in Prague, CZECH REPUBLIC
// ENEA SWEDEN
// Thales Communication S.A. FRANCE
// Rapita Systems Ltd UK
// Evidence ITALY
//
-// See http://www.frescor.org
+// See http://www.frescor.org for a link to partners' websites
//
-// The FRESCOR project (FP6/2005/IST/5-034026) is funded
+// FRESCOR project (FP6/2005/IST/5-034026) is funded
// in part by the European Union Sixth Framework Programme
// The European Union is not liable of any use that may be
// made of this code.
// Universidad de Cantabria, SPAIN
// University of York, UK
//
-// This file is part of FOSA (Frsh Operating System Abstraction)
+// FSF API web pages: http://marte.unican.es/fsf/docs
+// http://shark.sssup.it/contrib/first/docs/
+//
+// This file is part of FOSA (Frsh Operating System Adaption)
//
-// FOSA 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. FOSA 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 FOSA; see file
-// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
-// Cambridge, MA 02139, USA.
+// FOSA 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. FOSA 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 FOSA; see file
+// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
+// Cambridge, MA 02139, USA.
//
-// As a special exception, including FOSA header files in a file,
-// instantiating FOSA generics or templates, or linking other files
-// with FOSA 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.
+// As a special exception, including FOSA header files in a file,
+// instantiating FOSA generics or templates, or linking other files
+// with FOSA 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.
// -----------------------------------------------------------------------
//fosa_long_jump.c
//==============================================
+// -----------------------------------------------------------------------
+// Copyright (C) 2006 - 2008 FRESCOR consortium partners:
+//
+// Universidad de Cantabria, SPAIN
+// University of York, UK
+// Scuola Superiore Sant'Anna, ITALY
+// Kaiserslautern University, GERMANY
+// Univ. Politécnica Valencia, SPAIN
+// Czech Technical University in Prague, CZECH REPUBLIC
+// ENEA SWEDEN
+// Thales Communication S.A. FRANCE
+// 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
+// in part by the European Union Sixth Framework Programme
+// The European Union is not liable of any use that may be
+// made of this code.
+//
+//
+// 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
+// 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 FOSA (Frsh Operating System Adaption)
+//
+// FOSA 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. FOSA 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 FOSA; see file
+// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
+// Cambridge, MA 02139, USA.
+//
+// As a special exception, including FOSA header files in a file,
+// instantiating FOSA generics or templates, or linking other files
+// with FOSA 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.
+// -----------------------------------------------------------------------
+//==============================================
+// ******** ****** ******** **********
+// **///// /** ** **////// /** /**
+// ** /** ** /** /** /**
+// ******* /** ** /********* /**********
+// **//// /** ** ////////** /**//////**
+// ** /** ** /** /** /**
+// ** /** ** ******** /** /**
+// // /******/ //////// // //
+//
+// FOSA(Frescor Operating System Adaptation layer)
+//================================================
+
#include <time.h>
// -----------------------------------------------------------------------
-// Copyright (C) 2006 - 2007 FRESCOR consortium partners:
+// Copyright (C) 2006 - 2008 FRESCOR consortium partners:
//
// Universidad de Cantabria, SPAIN
// University of York, UK
// Scuola Superiore Sant'Anna, ITALY
// Kaiserslautern University, GERMANY
-// Univ. Politecnica Valencia, SPAIN
+// Univ. Politécnica Valencia, SPAIN
// Czech Technical University in Prague, CZECH REPUBLIC
// ENEA SWEDEN
// Thales Communication S.A. FRANCE
// 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
// The European Union is not liable of any use that may be
// made of this code.
//
-// This file is part of the FRSH implementation
//
-// FRSH 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.
+// 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
+// University of York, UK
+//
+// FSF API web pages: http://marte.unican.es/fsf/docs
+// http://shark.sssup.it/contrib/first/docs/
//
-// 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.
+// This file is part of FOSA (Frsh Operating System Adaption)
//
-// You should have received a copy of the GNU General Public License
-// distributed with FRSH; see file COPYING. If not, write to the
-// Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-// 02111-1307, USA.
+// FOSA 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. FOSA 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 FOSA; see file
+// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
+// Cambridge, MA 02139, 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 FOSA header files in a file,
+// instantiating FOSA generics or templates, or linking other files
+// with FOSA 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.
// -----------------------------------------------------------------------
//==============================================
// ******** ****** ******** **********
// however invalidate any other reasons why the executable file might be
// covered by the GNU Public License.
// -----------------------------------------------------------------------
+
// FOSA(Frescor Operating System Adaptation layer)
//================================================
*/
*
* Setjmp and Longjmp healper functions
*/
-
+
.text
.global fosa_long_jump_save_context, fosa_setjmp, fosa_longjmp
// -----------------------------------------------------------------------
-// Copyright (C) 2006 - 2007 FRESCOR consortium partners:
+// Copyright (C) 2006 - 2008 FRESCOR consortium partners:
//
// Universidad de Cantabria, SPAIN
// University of York, UK
// Scuola Superiore Sant'Anna, ITALY
// Kaiserslautern University, GERMANY
-// Univ. Politecnica Valencia, SPAIN
+// Univ. Politécnica Valencia, SPAIN
// Czech Technical University in Prague, CZECH REPUBLIC
// ENEA SWEDEN
// Thales Communication S.A. FRANCE
// 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
// The European Union is not liable of any use that may be
// made of this code.
//
-// This file is part of the FRSH implementation
//
-// FRSH 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.
+// 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
+// University of York, UK
+//
+// FSF API web pages: http://marte.unican.es/fsf/docs
+// http://shark.sssup.it/contrib/first/docs/
//
-// 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.
+// This file is part of FOSA (Frsh Operating System Adaption)
//
-// You should have received a copy of the GNU General Public License
-// distributed with FRSH; see file COPYING. If not, write to the
-// Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-// 02111-1307, USA.
+// FOSA 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. FOSA 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 FOSA; see file
+// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
+// Cambridge, MA 02139, 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 FOSA header files in a file,
+// instantiating FOSA generics or templates, or linking other files
+// with FOSA 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.
// -----------------------------------------------------------------------
//==============================================
// ******** ****** ******** **********
-//----------------------------------------------------------------------
-// Copyright (C) 2006 - 2007 by the FRESCOR consortium:
+// -----------------------------------------------------------------------
+// Copyright (C) 2006 - 2008 FRESCOR consortium partners:
//
// Universidad de Cantabria, SPAIN
// University of York, UK
// Scuola Superiore Sant'Anna, ITALY
// Kaiserslautern University, GERMANY
-// Univ. Politecnica Valencia, SPAIN
+// Univ. Politécnica Valencia, SPAIN
// Czech Technical University in Prague, CZECH REPUBLIC
// ENEA SWEDEN
// Thales Communication S.A. FRANCE
// Rapita Systems Ltd UK
// Evidence ITALY
//
-// See http://www.frescor.org
+// See http://www.frescor.org for a link to partners' websites
//
-// The FRESCOR project (FP6/2005/IST/5-034026) is funded
+// FRESCOR project (FP6/2005/IST/5-034026) is funded
// in part by the European Union Sixth Framework Programme
// The European Union is not liable of any use that may be
// made of this code.
// Universidad de Cantabria, SPAIN
// University of York, UK
//
-// This file is part of FOSA (Frsh Operating System Abstraction)
+// FSF API web pages: http://marte.unican.es/fsf/docs
+// http://shark.sssup.it/contrib/first/docs/
+//
+// This file is part of FOSA (Frsh Operating System Adaption)
//
-// FOSA 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. FOSA 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 FOSA; see file
-// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
-// Cambridge, MA 02139, USA.
+// FOSA 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. FOSA 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 FOSA; see file
+// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
+// Cambridge, MA 02139, USA.
//
-// As a special exception, including FOSA header files in a file,
-// instantiating FOSA generics or templates, or linking other files
-// with FOSA 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.
+// As a special exception, including FOSA header files in a file,
+// instantiating FOSA generics or templates, or linking other files
+// with FOSA 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.
// -----------------------------------------------------------------------
// fosa_time.c
//==============================================
+// -----------------------------------------------------------------------
+// Copyright (C) 2006 - 2008 FRESCOR consortium partners:
+//
+// Universidad de Cantabria, SPAIN
+// University of York, UK
+// Scuola Superiore Sant'Anna, ITALY
+// Kaiserslautern University, GERMANY
+// Univ. Politécnica Valencia, SPAIN
+// Czech Technical University in Prague, CZECH REPUBLIC
+// ENEA SWEDEN
+// Thales Communication S.A. FRANCE
+// 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
+// in part by the European Union Sixth Framework Programme
+// The European Union is not liable of any use that may be
+// made of this code.
+//
+//
+// 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
+// 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 FOSA (Frsh Operating System Adaption)
+//
+// FOSA 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. FOSA 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 FOSA; see file
+// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
+// Cambridge, MA 02139, USA.
+//
+// As a special exception, including FOSA header files in a file,
+// instantiating FOSA generics or templates, or linking other files
+// with FOSA 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.
+// -----------------------------------------------------------------------
+//==============================================
+// ******** ****** ******** **********
+// **///// /** ** **////// /** /**
+// ** /** ** /** /** /**
+// ******* /** ** /********* /**********
+// **//// /** ** ////////** /**//////**
+// ** /** ** /** /** /**
+// ** /** ** ******** /** /**
+// // /******/ //////// // //
+//
+// FOSA(Frescor Operating System Adaptation layer)
+//================================================
#include <fosa_long_jump.h>
#include <fosa_threads_and_signals.h>
int jmp;
fosa_signal_info_t ctx_info;
sigset_t s;
-
+
pthread_sigmask (SIG_SETMASK, NULL, &s);
printf (">>> Current signal mask = 0x%x\n", (unsigned int) s.sig);
-
+
assert (fosa_long_jump_save_context (NULL));
-
+
printf (">>> save context\n\n");
if (fosa_long_jump_save_context (&ctx)) {
printf ("fosa_long_jump_save_context");
exit (-1);
}
-
+
printf (">>> check jump performed\n\n");
if (fosa_long_jump_was_performed ((const fosa_long_jump_context_t *) &ctx, &jmp)) {
printf ("fosa_long_jump_was_performed");
exit (-2);
}
-
+
if (jmp) {
printf ("\t <<<< JUMPED\n\n");
pthread_sigmask (SIG_SETMASK, NULL, &s);
printf (">>> Current signal mask = 0x%x\n",(unsigned int) s.sig);
exit (10);
}
-
+
printf (">>> install handler\n\n");
if (fosa_long_jump_install_handler (&sig, &th)) {
printf ("fosa_long_jump_install_handler()");
exit (-3);
}
-
+
printf ("\t signal=%d, thread=0x%x (self=0x%x)\n", sig, (unsigned int) th, (unsigned int) fosa_thread_self());
-
+
printf (">>> trigger a long jump using a signal\n\n");
ctx_info.sival_ptr = &ctx;
if (fosa_signal_queue (sig, ctx_info, th)) {