Update contrib.
2 * Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
15 * A small support DLL for STDLIB test programs
27 /* STDLIB equivalent of RTest
36 extern struct __testdata __td;
38 IMPORT_C void td_Title(struct __testdata* td, char *title);
39 IMPORT_C void td_Next(struct __testdata* td, char *testname);
40 IMPORT_C void td_Test(struct __testdata* td, int line, int mustBeTrue);
41 IMPORT_C void td_TestErrno(struct __testdata* td, int line, int mustBeTrue, int expectedErrno);
42 IMPORT_C void td_Close(void);
44 #define test_Data struct __testdata __td /* declares global variable __td */
46 #define test_Title(title) td_Title(&__td, title)
47 #define test_Next(testname) td_Next(&__td, testname)
48 #define test_Close() td_Close()
49 #define test_Test(line,cond) td_Test(&__td, line, cond)
50 #define test_TestErrno(line,cond,expected) td_TestErrno(&__td, line, cond, expected)
52 #define test_Start(x) test_Next(x)
53 #define test(f) test_Test(__LINE__, (f)?1:0)
54 #define test_ok(f) test_TestErrno(__LINE__, (f)?1:0, errno)
55 #define test_errno(f,expected) test_TestErrno(__LINE__, (f)?1:0, expected)
58 /* Routine to ensure that the Comms server is running
60 IMPORT_C int CommInit(int enhanced);
63 /* C routine for starting the redirection server
66 IMPORT_C int start_redirection_server(void);
69 /* C routines for creating EPOC32 threads
72 IMPORT_C int start_posix_server(void);
74 IMPORT_C void* create_thread(void (*aFn)(), char* aName);
75 IMPORT_C void start_thread(void* aThread);
76 IMPORT_C int wait_for_thread(void* aThread);
78 IMPORT_C void* create_process(void (*aFn)(), char* aName, char* mode, int fids[3]);
79 IMPORT_C void start_process(void* aThread);
80 IMPORT_C int wait_for_process(void* aThread);
81 IMPORT_C int wait_for_process_id(void* aProcess, int procid, int opt, int* status);
82 IMPORT_C int get_proc_id(void* aProcess);
83 /* C-callable routines to access the EPOC32 asynchonous ioctl facilities
85 * NB. The int* status parameter stands in for the usual TRequestStatus&
87 IMPORT_C int async_ioctl(int aFid, int aCmd, void* aParam, int* status);
88 IMPORT_C int async_ioctl_completion(int aFid, int aCmd, void* aParam, int* status);