summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-01-24 00:07:16 +0000
committermidipix <writeonce@midipix.org>2024-01-24 02:11:14 +0000
commit0a9ee420ee3113be02a71823516d7c2683789855 (patch)
tree08a6d423c9bb5289b6510d79ba8f27493d93222a
parent3f465430af19d730b3be87b97dbb306563dc990a (diff)
downloadntapi-0a9ee420ee3113be02a71823516d7c2683789855.tar.bz2
ntapi-0a9ee420ee3113be02a71823516d7c2683789855.tar.xz
__ntapi_tt_fork_child(): replace hard-coded values with macro definitions.
-rw-r--r--src/process/ntapi_tt_fork.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/process/ntapi_tt_fork.c b/src/process/ntapi_tt_fork.c
index b7a7a20..7483657 100644
--- a/src/process/ntapi_tt_fork.c
+++ b/src/process/ntapi_tt_fork.c
@@ -15,6 +15,9 @@
#include <ntapi/ntapi.h>
#include "ntapi_impl.h"
+#define __FORK_THREAD_STACK_COMMIT (0x10000)
+#define __FORK_THREAD_STACK_RESERVE (0x20000)
+
static intptr_t __fork_retry_stats = 0;
static intptr_t __fork_resume_stats = 0;
@@ -168,8 +171,8 @@ static int32_t __fastcall __ntapi_tt_fork_child(
tparams.start = __fork_thread;
tparams.arg = &state;
- tparams.stack_size_commit = 0x10000;
- tparams.stack_size_reserve = 0x20000;
+ tparams.stack_size_commit = __FORK_THREAD_STACK_COMMIT;
+ tparams.stack_size_reserve = __FORK_THREAD_STACK_RESERVE;
status = __ntapi->tt_create_local_thread(
&tparams);