forked from Bananymous/banan-os
LibC: Reorder some syscalls
This commit is contained in:
@@ -114,12 +114,6 @@ namespace Kernel
|
||||
return ret.value()->pid();
|
||||
}
|
||||
|
||||
long sys_sleep(unsigned int seconds)
|
||||
{
|
||||
PIT::sleep(seconds * 1000);
|
||||
return 0;
|
||||
}
|
||||
|
||||
long sys_exec(const char* pathname, const char* const* argv, const char* const* envp)
|
||||
{
|
||||
auto ret = Process::current().exec(pathname, argv, envp);
|
||||
@@ -128,6 +122,12 @@ namespace Kernel
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
||||
long sys_sleep(unsigned int seconds)
|
||||
{
|
||||
PIT::sleep(seconds * 1000);
|
||||
return 0;
|
||||
}
|
||||
|
||||
long sys_wait(pid_t pid, int* stat_loc, int options)
|
||||
{
|
||||
auto ret = Process::current().wait(pid, stat_loc, options);
|
||||
@@ -219,12 +219,12 @@ namespace Kernel
|
||||
case SYS_FORK:
|
||||
ret = sys_fork_trampoline();
|
||||
break;
|
||||
case SYS_SLEEP:
|
||||
ret = sys_sleep((unsigned int)arg1);
|
||||
break;
|
||||
case SYS_EXEC:
|
||||
ret = sys_exec((const char*)arg1, (const char* const*)arg2, (const char* const*)arg3);
|
||||
break;
|
||||
case SYS_SLEEP:
|
||||
ret = sys_sleep((unsigned int)arg1);
|
||||
break;
|
||||
case SYS_WAIT:
|
||||
ret = sys_wait((pid_t)arg1, (int*)arg2, (int)arg3);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user