Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | |
2 | #ifdef WIN32 | |
3 | # define Dll_Export __declspec(dllexport) | |
4 | #else | |
5 | # define Dll_Export | |
6 | #endif | |
7 | ||
8 | ||
9 | #include "veriuser.h" | |
10 | #include "acc_user.h" | |
11 | ||
12 | #ifndef accVersionLatest | |
13 | #include "vxl_acc_user.h" | |
14 | #include "vxl_veriuser.h" | |
15 | #endif | |
16 | ||
17 | #include "global_chkr_funext.h" | |
18 | ||
19 | ||
20 | Dll_Export char *veriuser_version_str = | |
21 | "=== OpenSparc T2 global_chkr loadpli ===\n"; | |
22 | ||
23 | ||
24 | Dll_Export bool err_intercept(level,facility,code) | |
25 | int level; | |
26 | char *facility; | |
27 | char *code; | |
28 | { | |
29 | return(true); | |
30 | } | |
31 | ||
32 | Dll_Export static s_tfcell global_chkr_veriusertfs[] = | |
33 | { | |
34 | /*** Template for an entry: | |
35 | * { usertask|userfunction, data, | |
36 | * checktf(), sizetf(), calltf(), misctff(), | |
37 | * "$tfname", forwref?, Vtool?, ErrMsg? | |
38 | * }, | |
39 | * Example: | |
40 | * { usertask, 0, my_check, 0, my_func, my_misctf, "$my_task" | |
41 | * }, | |
42 | * ***/ | |
43 | ||
44 | # include "global_chkr_fundef.c" | |
45 | ||
46 | /*** add user entries here ***/ | |
47 | ||
48 | {0} /*** final entry must be 0 ***/ | |
49 | ||
50 | }; | |
51 | Dll_Export p_tfcell global_chkr_pli_boot() | |
52 | { | |
53 | io_printf("*** Registering OpenSparc T2 global_chkr system tasks...\n"); | |
54 | return global_chkr_veriusertfs; | |
55 | } | |
56 | ||
57 | #ifdef MTI | |
58 | # ifdef linux | |
59 | # include <malloc.h> | |
60 | # endif | |
61 | ||
62 | Dll_Export void init_usertfs() | |
63 | { | |
64 | p_tfcell usertf; | |
65 | ||
66 | # ifdef linux | |
67 | mallopt(M_MMAP_MAX, (sizeof(void*) > 4) ? 4096*1024 : 65536); | |
68 | # endif | |
69 | ||
70 | for (usertf = veriusertfs; usertf; usertf++){ | |
71 | if (usertf->type == 0) | |
72 | return; | |
73 | mti_RegisterUserTF(usertf); | |
74 | } | |
75 | } | |
76 | #endif | |
77 | ||
78 | Dll_Export int (*endofcompile_routines[])() = | |
79 | { | |
80 | /*** my_eoc_routine, ***/ | |
81 | 0 /*** final entry must be 0 ***/ | |
82 | }; |