From 2a01cc57c1c98574e4e6067e64ea2dc8d02fde9f Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Sun, 21 Oct 2018 13:10:34 -0400 Subject: fork, getpid --- src/user/user.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/user/user.c') diff --git a/src/user/user.c b/src/user/user.c index 7a55678..87f4b49 100644 --- a/src/user/user.c +++ b/src/user/user.c @@ -17,7 +17,6 @@ int fork(void) { int result; asm("\ - mov r0, sp; \ svc 3; \ mov %0, r0; \ " : "=r" (result)); @@ -31,14 +30,14 @@ void user_main(void) if (fork() == 0) { while (1) { gpio(GPIO_OUT, 5, 1); - user_delay(1000); + user_delay(2000); } } else { while (1) { + user_delay(1000); gpio(GPIO_OUT, 5, 0); - user_delay(500); + user_delay(1000); } - } } -- cgit v1.2.3