mirror of
https://github.com/justinian/jsix.git
synced 2025-12-11 08:54:31 -08:00
[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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user