[kernel] Remove getpid and fork system calls

The getpid and fork system calls were stubbed out previously, this
commit removes them and adds process_koid as a getpid replacement.
This commit is contained in:
2020-07-19 17:15:36 -07:00
parent c3abe035c8
commit 4cf222a5bb
4 changed files with 19 additions and 61 deletions

View File

@@ -5,8 +5,7 @@
#include "j6/errors.h"
extern "C" {
j6_status_t getpid(uint64_t *);
j6_status_t fork(uint64_t *);
j6_status_t get_process_koid(j6_koid_t *koid);
j6_status_t sleep(uint64_t til);
j6_status_t debug();
j6_status_t message(const char *msg);
@@ -20,17 +19,14 @@ main(int argc, const char **argv)
{
uint64_t pid = 0;
uint64_t child = 0;
j6_koid_t process = 0;
j6_status_t result = fork(&child);
j6_status_t result = get_process_koid(&process);
if (result != j6_status_ok)
return result;
message("hello from nulldrv!");
result = getpid(&pid);
if (result != j6_status_ok)
return result;
for (int i = 1; i < 5; ++i)
sleep(i*10);