Subversion Repositories shark

Rev

Blame | Last modification | View Log | RSS feed

/*
 * Project: S.Ha.R.K.
 *
 * Coordinators:
 *   Giorgio Buttazzo    <giorgio@sssup.it>
 *   Paolo Gai           <pj@gandalf.sssup.it>
 *
 * Authors     :
 *   Paolo Gai           <pj@gandalf.sssup.it>
 *   Massimiliano Giorgi <massy@gandalf.sssup.it>
 *   Luca Abeni          <luca@gandalf.sssup.it>
 *   (see the web pages for full authors list)
 *
 * ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy)
 *
 * http://www.sssup.it
 * http://retis.sssup.it
 * http://shark.sssup.it
 */


/**
 ------------
 CVS :        $Id: static.h,v 1.1.1.1 2004-05-24 18:03:47 giacomo Exp $

 File:        $File$
 Revision:    $Revision: 1.1.1.1 $
 Last update: $Date: 2004-05-24 18:03:47 $
 ------------

 Static scheduler demo (FIRST Project Hand-off)

**/


/*
 * Copyright (C) 2001 Paolo Gai
 *
 * This program 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 of the License, or
 * (at your option) any later version.
 *
 * This program 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 this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 */



#ifndef __STATIC_H__
#define __STATIC_H__

#include <ll/ll.h>
#include <kernel/config.h>
#include <sys/types.h>
#include <kernel/types.h>








/*+ flags... +*/

/* no flags for the static scheduler */




#define STATIC_PCLASS 0x1000

#define STATIC_LEVELNAME        "STATIC 1st Project"
#define STATIC_LEVEL_CODE       167
#define STATIC_LEVEL_VERSION    1


                       
typedef struct {
  TASK_MODEL t;
  struct timespec offset;
} STATIC_TASK_MODEL;

#define static_task_default_model(m,o)                           \
                        task_default_model((m).t,STATIC_PCLASS), \
                        ((m).offset).tv_sec = (o).tv_sec,        \
                        ((m).offset).tv_nsec = (o).tv_nsec

#define static_task_def_level(m,l)      task_def_level((m).t,l)
#define static_task_def_arg(m,a)        task_def_arg((m).t,a)
#define static_task_def_stack(m,s)      task_def_stack((m).t,s)
#define static_task_def_stackaddr(m,s)  task_def_stackaddr((m).t,s)
#define static_task_def_group(m,g)      task_def_group((m).t,g)
#define static_task_def_usemath(m)      task_def_usemath((m).t)
#define static_task_def_system(m)       task_def_system((m).t)
#define static_task_def_nokill(m)       task_def_nokill((m).t)
#define static_task_def_ctrl_jet(m)     task_def_ctrl_jet((m).t)
#define static_task_def_joinable(m)     task_def_joinable((m).t)
#define static_task_def_unjoinable(m)   task_def_unjoinable((m).t)





/*+ Registration function:
    int flags     Options to be used in this level instance...
+*/

LEVEL STATIC_register_level(void);

void STATIC_start(LEVEL l, struct timespec *h, struct timespec *o);

#endif