summaryrefslogtreecommitdiffhomepage
path: root/src/process
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2017-07-30 21:21:21 +0000
committermidipix <writeonce@midipix.org>2017-07-31 08:43:35 -0400
commit30d28dce7f884ffc2312a8b26f30759ae5f09aff (patch)
tree76fe681605a6744e6492ba293ada751833ae927e /src/process
parenta1e25ad89de33c3ad253ab239d1d92a6ebb096e7 (diff)
downloadntapi-30d28dce7f884ffc2312a8b26f30759ae5f09aff.tar.bz2
ntapi-30d28dce7f884ffc2312a8b26f30759ae5f09aff.tar.xz
subsystem interfaces: integrated ipc connection handlers.
Diffstat (limited to 'src/process')
-rw-r--r--src/process/ntapi_tt_fork.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/process/ntapi_tt_fork.c b/src/process/ntapi_tt_fork.c
index 58cf2c3..9c0d2de 100644
--- a/src/process/ntapi_tt_fork.c
+++ b/src/process/ntapi_tt_fork.c
@@ -24,6 +24,7 @@ static intptr_t __fastcall __ntapi_tt_fork_finalize(
int32_t status;
nt_oa oa;
nt_cid cid;
+ int page;
ntapi_internals * __internals;
__internals = __ntapi_internals();
@@ -53,6 +54,25 @@ static intptr_t __fastcall __ntapi_tt_fork_finalize(
&oa,&cid)))
return status;
+ if ((status = dalist_init_ex(
+ &__internals->ipc_conns,
+ sizeof(nt_ipc_conn),
+ NT_ALLOCATION_GRANULARITY,
+ __ntapi_ipc_page_alloc,
+ DALIST_MEMFN_CUSTOM)))
+ return status;
+
+ dalist_deposit_memory_block(
+ &__internals->ipc_conns,
+ __internals->ntapi_img_sec_bss->ipc_buffer,
+ __NT_BSS_IPC_BUFFER_SIZE);
+
+ for (page=0; __internals->ipc_page; page++)
+ dalist_deposit_memory_block(
+ &__internals->ipc_conns,
+ __internals->ipc_pages[page],
+ NT_ALLOCATION_GRANULARITY);
+
return 0;
}