Subversion Repositories shark

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1670 pj 1
#ifndef __HLPGRAPH_H_INCLUDED__
2
#define __HLPGRAPH_H_INCLUDED__
3
 
4
#include <kernel/kern.h>
5
#include <stdio.h>
6
#include <stdlib.h>
7
#include <string.h>
8
#include <math.h>
9
#include <modules/sem.h>
10
#include <drivers/shark_fb26.h>
11
#include "hlp.h"
12
//#include <modules/srp.h>
13
//#include <modules/pi.h>
14
//#include <modules/npp.h>
15
 
16
/* shared resource list */
17
typedef struct mutex_struct_list {
18
  mutex_t m;
19
  int color; /* color associated to mutex (for graphics) */
20
  char *name;
21
  struct mutex_struct_list *next;
22
} mutex_list_t;
23
 
24
typedef enum { LOAD, LOCK, UNLOCK } action_type_t ;
25
 
26
/* task action's description list */
27
typedef struct action_struct {
28
  action_type_t type;
29
 
30
  int time; /* lunghezza dell'azione (ignorato per lock/unlock) */
31
 
32
  mutex_list_t *mutex; /* null se type e' 0,
33
                          punta al mutex lockato/unlockato se type e' 1 */
34
 
35
  struct action_struct *next;
36
} action_list_t;
37
 
38
/* elenco dei task del sistema */
39
typedef struct taskconf_list_struct {
40
  PID pid;
41
  char *name;
42
  int i;
43
  DWORD period; /* periodo */
44
  DWORD wcet; /* richiesta di carico totale */
45
  mutex_list_t *mutexlist; /* the mutexes used by task */
46
  action_list_t *actionlist; /* l'elenco di azioni che compie il task */
47
  struct taskconf_list_struct *next;
48
} taskconf_list_t;
49
 
50
#endif