implement user mode catchable exceptions, refactor system status codes to use NTLSTATUS_ prefix, update build scripts to use shared literal macros for linker arguments, update named queue lifetime cleanup to include KeNamedQueueUnpublishHandle.
This commit is contained in:
1 parent
1f5477cf66
commit
b7fcfce6f7
140 files changed
+7649
-3943
No files matched your search
@@ -1,13 +1,22 @@
|
||||
// POSIX process startup. This file owns process-local POSIX personality initialization before main runs.
|
||||
|
||||
#include <stdint.h>
|
||||
#include <ntlite/exception.h>
|
||||
#include <ntlite/syscall.h>
|
||||
|
||||
extern int main(void);
|
||||
extern void exit(int status);
|
||||
extern void PosixFdInit(void);
|
||||
|
||||
// Initializes POSIX process state and exits with main's return value.
|
||||
void PosixStart(void) {
|
||||
uint32_t status = NtlInitializeExceptionRuntime();
|
||||
if (status != NTLSTATUS_SUCCESS) {
|
||||
for (;;) SysExitProcess((int32_t)status);
|
||||
}
|
||||
|
||||
PosixFdInit();
|
||||
int status = main();
|
||||
exit(status);
|
||||
int exitCode = main();
|
||||
exit(exitCode);
|
||||
for (;;) {}
|
||||
}
|
||||
Reference in new issue
Block a user