Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | pj | 1 | /* |
2 | * Project: S.Ha.R.K. |
||
3 | * |
||
4 | * Coordinators: |
||
5 | * Giorgio Buttazzo <giorgio@sssup.it> |
||
6 | * Paolo Gai <pj@gandalf.sssup.it> |
||
7 | * |
||
8 | * Authors : |
||
9 | * Paolo Gai <pj@gandalf.sssup.it> |
||
10 | * Massimiliano Giorgi <massy@gandalf.sssup.it> |
||
11 | * Luca Abeni <luca@gandalf.sssup.it> |
||
12 | * (see the web pages for full authors list) |
||
13 | * |
||
14 | * ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy) |
||
15 | * |
||
16 | * http://www.sssup.it |
||
17 | * http://retis.sssup.it |
||
18 | * http://shark.sssup.it |
||
19 | */ |
||
20 | |||
21 | /* |
||
22 | * Copyright (C) 1999 Massimiliano Giorgi |
||
23 | * |
||
24 | * This program is free software; you can redistribute it and/or modify |
||
25 | * it under the terms of the GNU General Public License as published by |
||
26 | * the Free Software Foundation; either version 2 of the License, or |
||
27 | * (at your option) any later version. |
||
28 | * |
||
29 | * This program is distributed in the hope that it will be useful, |
||
30 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
31 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
32 | * GNU General Public License for more details. |
||
33 | * |
||
34 | * You should have received a copy of the GNU General Public License |
||
35 | * along with this program; if not, write to the Free Software |
||
36 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
||
37 | * |
||
38 | */ |
||
39 | |||
40 | /* |
||
41 | * CVS : $Id: types.h,v 1.1.1.1 2002-03-29 14:12:51 pj Exp $ |
||
42 | * |
||
43 | * File: $File$ |
||
44 | * Revision: $Revision: 1.1.1.1 $ |
||
45 | * Last update: $Date: 2002-03-29 14:12:51 $ |
||
46 | */ |
||
47 | |||
48 | #ifndef __TRACE_TYPES_H |
||
49 | #define __TRACE_TYPES_H |
||
50 | |||
51 | /* |
||
52 | * EVENTS |
||
53 | */ |
||
54 | |||
55 | /* tracer class */ |
||
56 | #define TRC_RESERVED 0x00 |
||
57 | #define TRC_HOOPS 0x01 |
||
58 | |||
59 | /* system class */ |
||
60 | #define TRC_CREATE 0x02 |
||
61 | #define TRC_ACTIVATE 0x03 |
||
62 | #define TRC_SCHEDULE 0x04 |
||
63 | #define TRC_DELAY 0x05 |
||
64 | #define TRC_SLEEP 0x06 |
||
65 | #define TRC_ENDCYCLE 0x07 |
||
66 | #define TRC_DESTROY 0x08 |
||
67 | #define TRC_INTACTIVATION 0x09 |
||
68 | |||
69 | /* user class */ |
||
70 | #define TRC_USER0 0x0a |
||
71 | #define TRC_USER1 0x0b |
||
72 | #define TRC_USER2 0x0c |
||
73 | #define TRC_USER3 0x0d |
||
74 | #define TRC_USER4 0x0e |
||
75 | #define TRC_USER5 0x0f |
||
76 | #define TRC_USER6 0x10 |
||
77 | #define TRC_USER7 0x11 |
||
78 | |||
79 | /* low level class */ |
||
80 | #define TRC_INTR 0x12 |
||
81 | |||
82 | /* semaphore class */ |
||
83 | #define TRC_SEM_WAIT 0x13 |
||
84 | #define TRC_SEM_WAITNB 0x14 |
||
85 | #define TRC_SEM_SIGNAL 0x15 |
||
86 | |||
87 | /* used internal by the tracer (the first event of a class) */ |
||
88 | #define TRC_F_TRACER TRC_RESERVED |
||
89 | #define TRC_F_SYSTEM TRC_CREATE |
||
90 | #define TRC_F_USER TRC_USER0 |
||
91 | #define TRC_F_LL TRC_INTR |
||
92 | #define TRC_F_SEM TRC_SEM_WAIT |
||
93 | #define TRC_F_LAST (TRC_SEM_SIGNAL+1) |
||
94 | |||
95 | /* classes */ |
||
96 | #define TRC_CLASS_TRACER 0 |
||
97 | #define TRC_CLASS_SYSTEM 1 |
||
98 | #define TRC_CLASS_USER 2 |
||
99 | #define TRC_CLASS_LL 3 |
||
100 | #define TRC_CLASS_SEM 4 |
||
101 | |||
102 | /* max values */ |
||
103 | #define TRC_NUMCLASSES 5 |
||
104 | #define TRC_NUMEVENTS TRC_F_LAST |
||
105 | |||
106 | /* |
||
107 | * STRUCTURES |
||
108 | */ |
||
109 | |||
110 | /* tracer class */ |
||
111 | typedef struct TAGtrc_tracer_event_t { |
||
112 | u_int32_t n; |
||
113 | } trc_tracer_event_t __attribute__ ((packed)); |
||
114 | |||
115 | /* system class */ |
||
116 | typedef struct TAGtrc_system_event_t { |
||
117 | u_int16_t task; |
||
118 | } trc_system_event_t __attribute__ ((packed)); |
||
119 | |||
120 | /* user class */ |
||
121 | typedef struct TAGtrc_user_event_t { |
||
122 | #define TRC_MAXUSERINFO sizeof(long) |
||
123 | long n; |
||
124 | } trc_user_event_t __attribute__ ((packed)); |
||
125 | |||
126 | /* low level class */ |
||
127 | typedef struct TAGtrc_ll_event_t { |
||
128 | int n; |
||
129 | } trc_ll_event_t __attribute__ ((packed)); |
||
130 | |||
131 | /* semaphore class */ |
||
132 | typedef struct TAGtrc_sem_event_t { |
||
133 | u_int16_t task; |
||
134 | u_int16_t id; |
||
135 | } trc_sem_event_t __attribute__ ((packed)); |
||
136 | |||
137 | /* generics event */ |
||
138 | typedef union TAGtrc_allevents { |
||
139 | trc_tracer_event_t trc; |
||
140 | trc_system_event_t sys; |
||
141 | trc_user_event_t usr; |
||
142 | trc_ll_event_t ll; |
||
143 | trc_sem_event_t sem; |
||
144 | } trc_allevents_t __attribute__ ((packed));; |
||
145 | |||
146 | /* event struct */ |
||
147 | typedef struct TAGtrc_event_t { |
||
148 | u_int32_t time; |
||
149 | u_int16_t event; |
||
150 | trc_allevents_t x; |
||
151 | } trc_event_t __attribute__ ((packed)); |
||
152 | |||
153 | |||
154 | #endif |