git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
feat: better rtc framework which aims to remove single rtc restrictions.
[lunaix-os.git]
/
lunaix-os
/
kernel
/
exe
/
exec.c
diff --git
a/lunaix-os/kernel/exe/exec.c
b/lunaix-os/kernel/exe/exec.c
index 21814d16c042ffb50e96fbe8d7ebb89cee846a80..7afd0e1486c759d23979c246f297d1bed747ff08 100644
(file)
--- a/
lunaix-os/kernel/exe/exec.c
+++ b/
lunaix-os/kernel/exe/exec.c
@@
-1,4
+1,3
@@
-#include <arch/abi.h>
#include <lunaix/exec.h>
#include <lunaix/fs.h>
#include <lunaix/load.h>
#include <lunaix/exec.h>
#include <lunaix/fs.h>
#include <lunaix/load.h>
@@
-11,6
+10,9
@@
#include <lunaix/syscall.h>
#include <lunaix/syscall_utils.h>
#include <lunaix/syscall.h>
#include <lunaix/syscall_utils.h>
+#include <sys/abi.h>
+#include <sys/mm/mempart.h>
+
#include <klibc/string.h>
void
#include <klibc/string.h>
void
@@
-93,7
+95,7
@@
exec_load(struct exec_container* container, struct v_file* executable)
if (container->vms_mnt == VMS_SELF) {
// we are loading executable into current addr space
if (container->vms_mnt == VMS_SELF) {
// we are loading executable into current addr space
- ptr_t ustack = US
TACK_TOP
;
+ ptr_t ustack = US
R_STACK_END
;
size_t argv_len = 0, envp_len = 0;
ptr_t argv_ptr = 0, envp_ptr = 0;
size_t argv_len = 0, envp_len = 0;
ptr_t argv_ptr = 0, envp_ptr = 0;
@@
-220,9
+222,8
@@
__DEFINE_LXSYSCALL3(int,
// we will jump to new entry point (_u_start) upon syscall's
// return so execve 'will not return' from the perspective of it's invoker
// we will jump to new entry point (_u_start) upon syscall's
// return so execve 'will not return' from the perspective of it's invoker
- volatile struct exec_param* execp = __current->intr_ctx->execp;
- execp->esp = container.stack_top;
- execp->eip = container.exe.entry;
+ eret_target(__current) = container.exe.entry;
+ eret_stack(__current) = container.stack_top;
// these become meaningless once execved!
__current->ustack_top = 0;
// these become meaningless once execved!
__current->ustack_top = 0;