libc: refactoring

This commit is contained in:
2019-11-28 02:35:52 +01:00
parent f104c46858
commit 4067cb45cb
75 changed files with 596 additions and 355 deletions

View File

@@ -27,10 +27,10 @@ main(void)
test = (char **)privalloc();
*test = smprint("Hello from %d (at %p)\n", getpid(), test);
rfork(RFNOTEG);
switch(rfork(RFPROC|RFMEM)){
sys_rfork(RFNOTEG);
switch(sys_rfork(RFPROC|RFMEM)){
case -1:
exits("rfork");
exits("sys_rfork");
case 0:
*test = smprint("Hello from %d (at %p)\n", getpid(), test);
spin = 1;
@@ -43,9 +43,9 @@ main(void)
while(spin == 0)
;
}
switch(rfork(RFPROC|RFMEM)){
switch(sys_rfork(RFPROC|RFMEM)){
case -1:
exits("rfork");
exits("sys_rfork");
case 0:
*test = smprint("Hello from %d (at %p)\n", getpid(), test);
spin = 2;