Decoupling Architectural-specific Code (#35)
[lunaix-os.git] / lunaix-os / kernel / exe / exec.c
index 813d5c32b99ff5dd4b5ba8c5c3c56fb221fb5741..0f6e4ecbfad7390ef7816540601d98939bbf4130 100644 (file)
@@ -263,13 +263,13 @@ __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
-    eret_target(current_thread) = container.exe.entry;
-    eret_stack(current_thread) = container.stack_top;
+    hart_flow_redirect(current_thread->hstate, 
+                          container.exe.entry, container.stack_top);
 
     // these become meaningless once execved!
     current_thread->ustack_top = 0;
     signal_reset_context(&current_thread->sigctx);
 
     // these become meaningless once execved!
     current_thread->ustack_top = 0;
     signal_reset_context(&current_thread->sigctx);
-    signal_reset_register(__current->sigreg);
+    signal_reset_registry(__current->sigreg);
 
 done:
     // set return value
 
 done:
     // set return value