Skip to content
Permalink
Browse files

userspace: minor typo fixes in various places

System call arguments are indexed from 1 to 6, so arg0
is corrected to arg1 in two occasions. In addition, the
ARM function for system calls is now called z_arm_do_syscall,
so we update the inline comment in __svc handler.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
  • Loading branch information...
ioannisg authored and nashif committed Jun 28, 2019
1 parent d202d62 commit 5d423b80789a19bb716d71d51902a4aa447d1d3e
Showing with 3 additions and 3 deletions.
  1. +2 −2 arch/arm/core/swap_helper.S
  2. +1 −1 kernel/include/syscall_handler.h
@@ -426,7 +426,7 @@ _oops:

#if defined(CONFIG_USERSPACE)
/*
* System call will setup a jump to the _do_arm_syscall function
* System call will setup a jump to the z_arm_do_syscall() function
* when the SVC returns via the bx lr.
*
* There is some trickery involved here because we have to preserve
@@ -456,7 +456,7 @@ _do_syscall:
cmp r6, ip
blt valid_syscall_id

/* bad syscall id. Set arg0 to bad id and set call_id to SYSCALL_BAD */
/* bad syscall id. Set arg1 to bad id and set call_id to SYSCALL_BAD */
str r6, [r0, #0]
ldr r6, =K_SYSCALL_BAD

@@ -519,7 +519,7 @@ static inline int z_obj_validation_check(struct _k_object *ko,
* the bolierplate. The macros ensure that the seventh argument is named
* "ssf" as this is now referenced by various other Z_SYSCALL macros.
*
* Use the Z_SYSCALL_HANDLER(name_, arg0, ..., arg6) variant, as it will
* Use the Z_SYSCALL_HANDLER(name_, arg1, ..., arg6) variant, as it will
* automatically deduce the correct version of Z__SYSCALL_HANDLERn() to
* use depending on the number of arguments.
*/

0 comments on commit 5d423b8

Please sign in to comment.
You can’t perform that action at this time.