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
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
|
/*
* SCCS: @(#)llib-lapi.c 1.5 (96/11/04)
*
* (C) Copyright 1994 UniSoft Ltd., London, England
*
* All rights reserved. No part of this source code may be reproduced,
* stored in a retrieval system, or transmitted, in any form or by any
* means, electronic, mechanical, photocopying, recording or otherwise,
* except as stated in the end-user licence agreement, without the prior
* permission of the copyright owners.
*/
/************************************************************************
SCCS: @(#)llib-lapi.c 1.5 96/11/04 TETware release 3.3
NAME: llib-lapi.c
PRODUCT: TETware
AUTHOR: Andrew Dingwall, UniSoft Ltd.
DATE CREATED: December 1993
DESCRIPTION:
TETware API lint library
MODIFICATIONS:
Geoff Clare, UniSoft Ltd., Oct 1996
Changes for TETware.
************************************************************************/
/* LINTLIBRARY */
/* band-aid for non-posix systems */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#if defined(SVR2) || defined(BSD42) || defined(BSD43)
typedef int pid_t;
#endif
#ifndef __STDC__
#include <time.h>
#include <varargs.h>
#endif
#if defined(TET_THREADS) && !defined(TET_POSIX_THREADS)
#include <synch.h>
#endif
#include "tet_api.h"
#undef tet_child
pid_t tet_child;
#undef tet_errno
int tet_errno;
char * tet_errlist[1];
int tet_nerr;
void (*tet_syncerr)();
void tet_delete(test_no, reason)
int test_no;
char *reason;
{
;
}
int tet_exec(file, argv, envp)
char *file, *argv[], *envp[];
{
return(0);
}
void tet_exit(status)
int status;
{
;
}
int tet_fork(childproc, parentproc, waittime, exitvals)
void (*childproc)(), (*parentproc)();
int waittime, exitvals;
{
return(0);
}
#if defined(TET_THREADS) || defined(TET_POSIX_THREADS)
int tet_fork1(childproc, parentproc, waittime, exitvals)
void (*childproc)(), (*parentproc)();
int waittime, exitvals;
{
return(0);
}
#endif /* THREADS */
int tet_getsysbyid(sysid, sysp)
int sysid;
struct tet_sysent *sysp;
{
return 0;
}
char *tet_getvar(name)
char *name;
{
return((char *) 0);
}
void tet_infoline(data)
char *data;
{
;
}
int tet_kill(pid, sig)
pid_t pid;
int sig;
{
return 0;
}
void tet_logoff()
{
;
}
int tet_minfoline(lines, nlines)
char **lines;
int nlines;
{
return 0;
}
int tet_msync(syncptno, syncnames, waittime, msgp)
long syncptno;
int *syncnames, waittime;
struct tet_synmsg *msgp;
{
return 0;
}
#ifdef __STDC__
/* PRINTFLIKE1 */ /* VARARGS1 */
int tet_printf(char *format, ...)
#else
/* PRINTFLIKE1 */ /* VARARGS1 */
int tet_printf(format)
char *format;
#endif
{
return 0;
}
#ifdef TET_POSIX_THREADS
int tet_pthread_create(new_thread, attr, start_routine, arg, waittime)
pthread_t *new_thread;
pthread_attr_t *attr;
void *(*start_routine)();
void *arg;
int waittime;
{
return 0;
}
#endif
char *tet_reason(test_no)
int test_no;
{
return((char *) 0);
}
int tet_remexec(sysname, file, argv)
int sysname;
char *file, **argv;
{
return(0);
}
int tet_remgetlist(sysnames)
int **sysnames;
{
return(0);
}
int tet_remgetsys()
{
return(0);
}
int tet_remkill(remoteid)
int remoteid;
{
return(0);
}
int tet_remsync(syncptno, syncnames, nsyncname, waittime, vote, msgp)
long syncptno;
int *syncnames, nsyncname, waittime, vote;
struct tet_synmsg *msgp;
{
return 0;
}
int tet_remtime(sysid, tp)
int sysid;
time_t *tp;
{
return 0;
}
int tet_remwait(remoteid, waittime, statloc)
int remoteid, waittime, *statloc;
{
return(0);
}
void tet_result(result)
int result;
{
;
}
void tet_setblock()
{
;
}
void tet_setcontext()
{
;
}
pid_t tet_spawn(file, argv, envp)
char *file;
char *argv[];
char *envp[];
{
return 0;
}
int tet_sync(syncptno, syncnames, waittime)
long syncptno;
int *syncnames, waittime;
{
return(0);
}
void tet_syncreport(syncptno, statp, nsys)
long syncptno;
struct tet_syncstat *statp;
int nsys;
{
;
}
#if defined(TET_THREADS) || defined(TET_POSIX_THREADS)
pid_t *tet_thr_child()
{
return (pid_t *)0;
}
#endif
#if defined(TET_THREADS) || defined(TET_POSIX_THREADS)
int *tet_thr_errno()
{
return (int *)0;
}
#endif
#if defined(TET_THREADS) && !defined(TET_POSIX_THREADS)
int tet_thr_create(stack_base, stack_size, start_routine, arg, flags,
new_thread, waittime)
void *stack_base;
size_t stack_size;
void *(*start_routine)();
void *arg;
long flags;
thread_t *new_thread;
int waittime;
{
return 0;
}
#endif
int tet_vprintf(format, ap)
char *format;
va_list ap;
{
return 0;
}
int tet_wait(pid, statp)
pid_t pid;
int *statp;
{
return 0;
}
#ifndef TET_API_ONLY
/* non-API functions and data: these go in llib-lapi.ln (for linting
TETware source), but not in llib-ltcm.ln and llib-ltcmc.ln */
#if defined(TET_THREADS) || defined(TET_POSIX_THREADS)
void tet_api_lock(getlock, file, line)
int getlock;
char *file;
int line;
{
;
}
void tet_cln_threads(signum)
int signum;
{
;
}
#endif /* THREADS */
void tet_config()
{
;
}
void tet_delreas(ntests)
int ntests;
{
;
}
void tet_disconnect()
{
;
}
void tet_error(errno_val, msg)
int errno_val;
char *msg;
{
;
}
int tet_killw(child, timeout)
pid_t child;
unsigned int timeout;
{
return 0;
}
#if defined(TET_THREADS) || defined(TET_POSIX_THREADS)
void tet_mtx_init()
{
;
}
void tet_mtx_destroy()
{
;
}
void tet_mtx_lock()
{
;
}
void tet_mtx_unlock()
{
;
}
#endif /* THREADS */
char * tet_signame(sig)
int sig;
{
return (char *)0;
}
#if defined(TET_THREADS) || defined(TET_POSIX_THREADS)
long * tet_thr_block()
{
return (long *)0;
}
long * tet_thr_sequence()
{
return (long *)0;
}
void tet_thrtab_reset()
{
;
}
#endif /* THREADS */
int tet_combined_ok;
long tet_activity;
long tet_context;
#undef tet_block
long tet_block;
#undef tet_sequence
long tet_sequence;
#if defined(TET_THREADS) || defined(TET_POSIX_THREADS)
long tet_next_block;
thread_key_t tet_block_key;
thread_key_t tet_sequence_key;
thread_key_t tet_child_key;
thread_key_t tet_errno_key;
mutex_t tet_top_mtx;
mutex_t tet_thrtab_mtx;
mutex_t tet_thrwait_mtx;
mutex_t tet_sigalrm_mtx;
mutex_t tet_alarm_mtx;
#endif /* THREADS */
#endif /* TET_API_ONLY */
|