]> git.corax.cc Git - corax/commitdiff
Implement process_memcpy_ptop() function for copying data directly between processes
authorMatthias Kruk <m@m10k.eu>
Sat, 26 Oct 2019 05:12:54 +0000 (14:12 +0900)
committerMatthias Kruk <m@m10k.eu>
Sat, 26 Oct 2019 05:12:54 +0000 (14:12 +0900)
kernel/core/process.c
kernel/include/process.h

index 2e994fad19e20806bb2d13d1949ef7d873fc57b6..17d05822463b5d40d01d8aa4fd9752c19b62d9cd 100644 (file)
@@ -185,3 +185,12 @@ int process_memcpy_ktop(process_t *proc, void *dst, void *src, u32_t bytes)
 
        return(ret_val);
 }
+
+int process_memcpy_ptop(process_t *dproc, void *dst, process_t *sproc, void *src, u32_t bytes)
+{
+       int ret_val;
+
+       ret_val = pg_dir_memcpy(dproc->p_pgdir, dst, sproc->p_pgdir, src, bytes);
+
+       return(ret_val);
+}
index f5ad6ba51b0efaa25391ad9283182b05e6a60fdc..f8c80bfc06821f233818c34c915e37df0aff54ce 100644 (file)
@@ -34,5 +34,6 @@ process_t* process_get_current(void);
 
 int process_memcpy_ptok(process_t*, void*, void*, u32_t);
 int process_memcpy_ktop(process_t*, void*, void*, u32_t);
+int process_memcpy_ptop(process_t*, void*, process_t*, void*, u32_t);
 
 #endif /* __PROCESS_H */