diff --git a/examples/shell/shell.q b/examples/shell/shell.q index f8e4213..3d468a8 100644 --- a/examples/shell/shell.q +++ b/examples/shell/shell.q @@ -1,6 +1,6 @@ -import exec import io import mem +import process import strings main() { @@ -26,7 +26,7 @@ execute(path string) { return } - err := exec.run(path) + err := process.run(path) if err != 0 { io.write("error executing: ") diff --git a/lib/exec/const_linux_arm.q b/lib/process/const_linux_arm.q similarity index 100% rename from lib/exec/const_linux_arm.q rename to lib/process/const_linux_arm.q diff --git a/lib/exec/const_linux_x86.q b/lib/process/const_linux_x86.q similarity index 100% rename from lib/exec/const_linux_x86.q rename to lib/process/const_linux_x86.q diff --git a/lib/exec/const_mac_arm.q b/lib/process/const_mac_arm.q similarity index 100% rename from lib/exec/const_mac_arm.q rename to lib/process/const_mac_arm.q diff --git a/lib/exec/const_mac_x86.q b/lib/process/const_mac_x86.q similarity index 100% rename from lib/exec/const_mac_x86.q rename to lib/process/const_mac_x86.q diff --git a/lib/exec/fork_linux.q b/lib/process/fork_linux.q similarity index 100% rename from lib/exec/fork_linux.q rename to lib/process/fork_linux.q diff --git a/lib/exec/fork_mac.q b/lib/process/fork_mac.q similarity index 100% rename from lib/exec/fork_mac.q rename to lib/process/fork_mac.q diff --git a/lib/exec/run_unix.q b/lib/process/run_unix.q similarity index 100% rename from lib/exec/run_unix.q rename to lib/process/run_unix.q diff --git a/lib/exec/run_windows.q b/lib/process/run_windows.q similarity index 100% rename from lib/exec/run_windows.q rename to lib/process/run_windows.q diff --git a/lib/exec/struct_unix.q b/lib/process/struct_unix.q similarity index 100% rename from lib/exec/struct_unix.q rename to lib/process/struct_unix.q diff --git a/lib/exec/struct_windows.q b/lib/process/struct_windows.q similarity index 100% rename from lib/exec/struct_windows.q rename to lib/process/struct_windows.q diff --git a/lib/thread/thread_linux.q b/lib/thread/thread_linux.q index 90a614a..77a34e2 100644 --- a/lib/thread/thread_linux.q +++ b/lib/thread/thread_linux.q @@ -1,11 +1,11 @@ -import exec import mem +import process create(func any) -> int { stack := mem.mmap(0, 4096, mem.read|mem.write, mem.private|mem.anonymous, -1, 0) as *uint64 stack[512 - 1] = end as uint64 stack[512 - 2] = func as uint64 - return exec.clone(vm|fs|files|signalHandlers|parent|thread|ioContext, stack + 4096 - 16, 0, 0, 0) + return process.clone(vm|fs|files|signalHandlers|parent|thread|ioContext, stack + 4096 - 16, 0, 0, 0) } end() {