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
|
/*
* SCCS: @(#)apilib.h 1.2 (98/08/28)
*
* UniSoft Ltd., London, England
*
* (C) Copyright 1997 X/Open Company Limited
*
* 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.
* A copy of the end-user licence agreement is contained in the file
* Licence which accompanies this distribution.
*
* X/Open and the 'X' symbol are trademarks of X/Open Company Limited in
* the UK and other countries.
*/
/************************************************************************
SCCS: @(#)apilib.h 1.2 98/08/28 TETware release 3.3
NAME: apilib.h
PRODUCT: TETware
AUTHOR: Andrew Dingwall, UniSoft Ltd.
DATE CREATED: June 1997
DESCRIPTION:
declarations of extern functions and data items,
not declared in other header files,
which are used in the TCM and API
since one of the function prototypes includes a pid_t,
this file must be included after tet_api.h if tet_api.h is included
MODIFICATIONS:
Andrew Dingwall, UniSoft Ltd., August 1998
Added support for shared libraries.
************************************************************************/
/*
** the interface between tet_exec()/tet_spawn()/tet_remexec()
** and the child process controllers
**
** when a child (or remote) process is called using tet_foo(... file, argv ...)
** the arguments passed to exec()/spawn() are:
**
** newargv[0] file
** newargv[1] tet_thistest
** newargv[2] tet_activity
** newargv[3] tet_context
** newargv[4] tet_block or tet_next_block
** newargv[5] argv[0]
** ... ...
*/
#define TET_TCMC_THISTEST 1
#define TET_TCMC_ACTIVITY 2
#define TET_TCMC_CONTEXT 3
#define TET_TCMC_BLOCK 4
#define TET_TCMC_USER_ARGS 5 /* must have the highest value */
/*
** extern data items
*/
TET_IMPORT_DATA(long, tet_activity); /* TCC activity number */
TET_IMPORT_DATA(int, tet_combined_ok); /* true if xres file is usable */
TET_IMPORT_DATA(long, tet_context); /* journal context number */
TET_IMPORT_ARRAY(char *, tet_apilib_version, []);
/* the API library version strings */
#ifdef TET_THREADS
TET_IMPORT_FUNC(long *, tet_thr_block, PROTOLIST((void)));
# define tet_block (*tet_thr_block())
TET_IMPORT_FUNC(long *, tet_thr_sequence, PROTOLIST((void)));
# define tet_sequence (*tet_thr_sequence())
TET_IMPORT_DATA(long, tet_next_block);
#else
TET_IMPORT_DATA(long, tet_block); /* journal block number */
TET_IMPORT_DATA(long, tet_sequence); /* journal sequence number */
#endif
#ifdef TET_LITE /* -LITE-CUT-LINE- */
TET_IMPORT_DATA(char *, tet_tmpresfile);
/* temporary results file name */
extern FILE *tet_tmpresfp; /* fp for temporary results file */
extern FILE *tet_resfp; /* fp for tet_xres file */
#else /* -START-LITE-CUT- */
TET_IMPORT_DATA(int, tet_iclast); /* highest defined IC number */
TET_IMPORT_DATA(int, tet_sync_del); /* true if TP deleted in another TCM */
TET_EXPORT_DATA(int *, tet_snames); /* system name list */
TET_EXPORT_DATA(int, tet_Nsname); /* number of system names */
TET_EXPORT_DATA(long, tet_snid); /* sync ID for this test case */
TET_EXPORT_DATA(long, tet_xrid); /* xres ID for this test case */
#endif /* -END-LITE-CUT- */
/*
** extern function declarations
*/
TET_IMPORT_FUNC(void, tet_config, PROTOLIST((void)));
extern void tet_docleanup PROTOLIST((int));
TET_IMPORT_FUNC(void, tet_error, PROTOLIST((int, char *)));
extern void tet_exec_cleanup PROTOLIST((char **, char **, char **));
extern int tet_exec_prep PROTOLIST((char *, char *[], char *[], char ***,
char ***));
TET_IMPORT_FUNC(void, tet_icend, PROTOLIST((int, int)));
TET_IMPORT_FUNC(int, tet_icstart, PROTOLIST((int, int)));
#ifdef TET_PID_T_DEFINED
TET_IMPORT_FUNC(int, tet_killw, PROTOLIST((pid_t, unsigned int)));
#endif
extern void tet_merror PROTOLIST((int, char **, int));
extern void tet_msgform PROTOLIST((char *, char *, char *));
extern void tet_routput PROTOLIST((char **, int));
TET_IMPORT_FUNC(char *, tet_signame, PROTOLIST((int)));
TET_IMPORT_FUNC(void, tet_tcmstart, PROTOLIST((char *, int)));
TET_IMPORT_FUNC(int, tet_tpend, PROTOLIST((int, int, int)));
TET_IMPORT_FUNC(void, tet_tpstart, PROTOLIST((int, int, int)));
#ifdef TET_LITE /* -LITE-CUT-LINE- */
extern char *tet_get_code PROTOLIST((int, int *));
TET_IMPORT_FUNC(void, tet_openres, PROTOLIST((void)));
#else /* -START-LITE-CUT- */
extern void tet_disconnect PROTOLIST((void));
TET_IMPORT_FUNC(void, tet_init_synreq, PROTOLIST((void)));
#endif /* -END-LITE-CUT- */
#ifdef TET_THREADS
TET_IMPORT_FUNC(void, tet_cln_threads, PROTOLIST((int)));
TET_IMPORT_FUNC(void, tet_mtx_destroy, PROTOLIST((void)));
TET_IMPORT_FUNC(void, tet_mtx_init, PROTOLIST((void)));
#endif
|