aboutsummaryrefslogtreecommitdiffstats
path: root/src/user/user.c
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2018-10-21 13:10:34 -0400
committerClyne Sullivan <tullivan99@gmail.com>2018-10-21 13:10:34 -0400
commit2a01cc57c1c98574e4e6067e64ea2dc8d02fde9f (patch)
treece33240a08f303bb16bbb3a8a2ad5be30094297a /src/user/user.c
parentf4149952ea4895356a3d4c0a9517893bb1e18cd2 (diff)
fork, getpid
Diffstat (limited to 'src/user/user.c')
-rw-r--r--src/user/user.c7
1 files changed, 3 insertions, 4 deletions
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);
}
-
}
}