summaryrefslogtreecommitdiffhomepage
path: root/src/internal/ntux_memfn_impl.c
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2019-05-26 21:47:57 +0000
committermidipix <writeonce@midipix.org>2019-05-27 00:03:29 +0000
commit471bb043390d0995c847d01f1af89763bbee668f (patch)
treebb068f17349ba5bd987e8d91e2ebe38a827963b8 /src/internal/ntux_memfn_impl.c
parent32e604c63f1f7e211c63cc900e77f5ef637c9eef (diff)
downloadntux-471bb043390d0995c847d01f1af89763bbee668f.tar.bz2
ntux-471bb043390d0995c847d01f1af89763bbee668f.tar.xz
framework: code against the newly added __xfi_xxx interfaces.
Diffstat (limited to 'src/internal/ntux_memfn_impl.c')
-rw-r--r--src/internal/ntux_memfn_impl.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/internal/ntux_memfn_impl.c b/src/internal/ntux_memfn_impl.c
index cf930bb..7780fc6 100644
--- a/src/internal/ntux_memfn_impl.c
+++ b/src/internal/ntux_memfn_impl.c
@@ -4,8 +4,15 @@
/* Released under GPLv2 and GPLv3; see COPYING.NTUX. */
/***********************************************************/
+#include <psxxfi/xfi_base.h>
+#include <psxxfi/xfi_acl.h>
+
+#include <ntapi/nt_memory.h>
+#include <ntapi/nt_file.h>
+#include <ntapi/nt_process.h>
+
#include <stddef.h>
-#include <ntapi/ntapi.h>
+
#include "ntux_memfn_impl.h"
#include "ntux_driver_impl.h"
@@ -23,7 +30,7 @@ void * ntux_calloc(size_t n, size_t size)
block.addr = 0;
block.size = size + sizeof(block);
- if (ntapi->zw_allocate_virtual_memory(
+ if (__xfi_allocate_virtual_memory(
NT_CURRENT_PROCESS_HANDLE,
&block.addr,
0,
@@ -64,7 +71,7 @@ void * ntux_balloc(
baddr = addr;
baddr -= offsetof(struct ntux_memory_block,buffer);
- ntapi->tt_aligned_block_memcpy(
+ __xfi_memcpy(
(uintptr_t *)block,
(uintptr_t *)baddr,
sizeof(*block));
@@ -86,7 +93,7 @@ void ntux_free(void * addr)
block.addr = addr;
block.size = 0;
- ntapi->zw_free_virtual_memory(
+ __xfi_free_virtual_memory(
NT_CURRENT_PROCESS_HANDLE,
&block.addr,
&block.size,