pussuw commented on a change in pull request #5782: URL: https://github.com/apache/incubator-nuttx/pull/5782#discussion_r837102121
########## File path: arch/risc-v/src/common/riscv_pthread_start.c ########## @@ -66,11 +66,17 @@ void up_pthread_start(pthread_trampoline_t startup, pthread_startroutine_t entrypt, pthread_addr_t arg) { +#ifdef CONFIG_ARCH_USE_S_MODE + /* Let ksys_call3() do all of the work */ + + ksys_call3(SYS_pthread_start, (uintptr_t)startup, (uintptr_t)entrypt, + (uintptr_t)arg); +#else /* Let sys_call3() do all of the work */ sys_call3(SYS_pthread_start, (uintptr_t)startup, (uintptr_t)entrypt, Review comment: @xiaoxiang781216 would it be more logical if I renamed e.g. the call to sys_call3 to ksys_call3 here, and then did the implementation of that differently by flagging with CONFIG_ARCH_USE_S_MODE. Because to me it still makes sense to keep two separate functions, one is called by kernel code, other is called by user code via e.g. libc. So in the future, sys_callx would be used by user side only, and ksys_callx would be for kernel ? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org