summaryrefslogtreecommitdiff
path: root/include/cristina/tosv.h
blob: 8992d18b5696aa1cd9d8844241113a5abd13db36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
/*
 ****************************************************************************
 *			      HEADER
 *
 *     $Workfile:   tosv.h  $
 *     Document no: @(#) 510/OSE18-1 $Revision: 1.2 $
 *     $Revision: 1.2 $
 *     $Author: save $
 *     $Date: 2005/10/18 09:10:35 $
 *
 *	 Copyright (C) 1997 by ENEA OSE SYSTEMS AB. All rights reserved.
 *
 ****************************************************************************

	CONTENTS
	--------

	1  Description
	2  History of development
	3  Include files
	4  Types
	5  Function prototypes

 ****************************************************************************
 */

#ifndef _TOSV_H
#define _TOSV_H

/*
 ****************************************************************************
 * 1  DESCRIPTION.
 ****************************************************************************
 *
 * Specification of the time-out server's (TOSV) application programs
 * interface (API).
 */

/*
 ****************************************************************************
 * 2  HISTORY OF DEVELOPMENT.
 *
 *    $Log: tosv.h,v $
 *    Revision 1.2  2005/10/18 09:10:35  save
 *    deamon
 *
 *    Revision 1.1  2005/03/31 14:57:00  antunes
 *    Adding OSE file for RTAI features
 *
 *    Revision 1.1.1.1  2004/04/09 07:40:32  fleury
 *    import from FLIP rel-2-3-9
 *
 *    Revision 1.2  2003/08/28 15:52:13  antunes
 *    OSE 4.5.1
 *
 * 
 *    Rev 1.3   03/10/99 13:28:06   olli
 * 
 *    Rev 1.2   02/27/99 01:11:50   olli
 * 
 *    Rev 1.1   07/08/97 14:17:08   olli
 * New implementation with trap interface and signal proxy.
 *
 *    Rev 1.0   12/16/96 20:50:28   lob
 * Initial revision.
 *
 *    Rev 1.4   12/16/96 19:36:36   lob
 *
 *    Rev 1.3   05/03/95 15:24:14   lob
 *
 *    Rev 1.0   04/18/95 10:29:52   lob
 * Initial revision.
 *
 *
 */

/*
 ****************************************************************************
 * 3  INCLUDE FILES.
 ****************************************************************************
 */

#include "ose.h"
#include "osetypes.h"

#ifdef __cplusplus
extern "C" {
#endif

/*
 ****************************************************************************
 * 4  TYPES.
 ****************************************************************************
 */

struct TosvInternal;    /* Internal TOSV structure. */

/*
 *===========================================================================
 *			CANCEL_INFO
 *===========================================================================
 * Description: Contains vital information for identification of correct time-
 *              out request at cancellation.
 *
 * Parameters:  sigNo          Timeout signal number (bits 0-31).
 *              sigNo2         Timeout signal number (bits 32-63).
 *              instance       Unique instance number for time-out request.
 *              pointer        Direct access pointer to time-out request.
 */

typedef struct
{
    SIGSELECT             sigNo;
    SIGSELECT             sigNo2;
    U32                   instance;
    struct TosvInternal * pointer;
} CANCEL_INFO;

/*
 ****************************************************************************
 * 5 FUNCTION PROTOTYPES.
 ****************************************************************************
 */

#ifdef OSEAPI
void initTosvPublic(void);
void initTosvPrivate(void);
#endif

/*
 *===========================================================================
 *                           requestTmo()
 *===========================================================================
 *
 * Description: Request a time-out with application specified signal.
 *
 * Parameters:  cancelInfo     Identification of time-out for cancellation.
 *              timeOut        Time-out in milliseconds.
 *              tmoSig         User supplied signal to return at time-out.
 *
 * Returns:     Nothing.
 */

void requestTmo(CANCEL_INFO *cancelInfo, OSTIME timeOut, union SIGNAL **tmoSig, PROCESS process);

/*
 *===========================================================================
 *                           fRequestTmo()
 *===========================================================================
 *
 * Description: Request a time-out with TOSV default signal.
 *
 * Parameters:  cancelInfo     Identification of time-out for cancellation.
 *              timeOut        Time-out time in milliseconds.
 *              client         Client process identifier. Must be equal to
 *                             current_process() of caller.
 *              tmoSigNo       Signal number for default signal.
 *
 * Returns:     Nothing.
 */

void fRequestTmo(CANCEL_INFO *cancelInfo, OSTIME timeOut, PROCESS pid, SIGSELECT tmoSigNo);

/*
 *===========================================================================
 *                           cancelTmo()
 *===========================================================================
 *
 * Description: Cancel (normal or fast) time-out request and return time-out
 *              signal.
 *
 * Parameters:  cancelInfo     Identification of time-out to cancel.
 *
 * Returns:     Signal specified in requestTmo call or default signal (with
 *              user specified signo) if fRequestTmo was used.
 */

union SIGNAL *cancelTmo(CANCEL_INFO *cancelInfo);

/*
 *===========================================================================
 *                           fCancelTmo()
 *===========================================================================
 *
 * Description: Cancel (normal or fast) time-out request and dispose of
 *              (free) time-out signal.
 *
 * Parameters:  cancelInfo     Identification of time-out to cancel.
 *
 * Returns:     Nothing.
 */

void fCancelTmo(CANCEL_INFO *cancelInfo);

/*
 *===========================================================================
 *                           resetTmo()
 *===========================================================================
 *
 * Description: Restart the specified (normal or fast) time-out.
 *              NOTE: an expired fast time-out will be transformed into a
 *                    normal time-out.
 *
 * Parameters:  cancelInfo     Identification of time-out to reset.
 *              timeOut        New time-out in milliseconds.
 *
 * Returns:     Nothing.
 */

void resetTmo(CANCEL_INFO *cancelInfo, OSTIME timeOut);

#ifdef __cplusplus
}
#endif

#endif
/* #ifndef _TOSV_H */

/*
 *===========================================================================
 *                         END OF FILE
 *===========================================================================
 */