2 * Copyright (C) 2024 Mikulas Patocka
4 * This file is part of Ajla.
6 * Ajla is free software: you can redistribute it and/or modify it under the
7 * terms of the GNU General Public License as published by the Free Software
8 * Foundation, either version 3 of the License, or (at your option) any later
11 * Ajla is distributed in the hope that it will be useful, but WITHOUT ANY
12 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
13 * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License along with
16 * Ajla. If not, see <https://www.gnu.org/licenses/>.
46 extern_const
bool dll
= false;
49 int main(int argc
, const char * const argv
[])
52 EXCEPTIONREGISTRATIONRECORD ex
;
56 args_init(argc
, argv
);
64 error_init_multithreaded();
65 mem_init_multithreaded();
66 obj_registry_init_multithreaded();
69 os_init_multithreaded();
71 ex
.ExceptionHandler
= os2_exception_handler
;
72 r
= DosSetExceptionHandler(&ex
);
74 fatal("DosSetExceptionHandler failed: %ld", r
);
76 amalloc_init_multithreaded();
116 amalloc_done_multithreaded();
118 r
= DosUnsetExceptionHandler(&ex
);
120 fatal("DosUnsetExceptionHandler failed: %ld", r
);
122 os_done_multithreaded();
125 obj_registry_done_multithreaded();
126 mem_done_multithreaded();
127 error_done_multithreaded();