aboutsummaryrefslogtreecommitdiffstats
path: root/src/user
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2018-10-29 18:11:53 -0400
committerClyne Sullivan <tullivan99@gmail.com>2018-10-29 18:11:53 -0400
commit3a798edb836a30f612b6dd40334b69a2dbeeca22 (patch)
tree0b65f27939645a2f91824e9ae7457240309f4127 /src/user
parent3919219d9bfbf0d50407878c92869485eaaacd44 (diff)
good tasks, svc cleaning
Diffstat (limited to 'src/user')
-rw-r--r--src/user/user.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/user/user.c b/src/user/user.c
index 87f4b49..620ffd0 100644
--- a/src/user/user.c
+++ b/src/user/user.c
@@ -15,11 +15,12 @@ void user_delay(uint32_t ms)
int fork(void)
{
- int result;
+ int result = 0;
asm("\
- svc 3; \
- mov %0, r0; \
- " : "=r" (result));
+ mov r0, 1; \
+ mov r1, %0; \
+ svc 0; \
+ " :: "r" (&result));
return result;
}