pussuw commented on code in PR #12812: URL: https://github.com/apache/nuttx/pull/12812#discussion_r1701738790
########## arch/risc-v/src/common/riscv_swint.c: ########## @@ -48,16 +48,61 @@ * Pre-processor Definitions ****************************************************************************/ -#ifdef CONFIG_LIB_SYSCALL -# define TCB_FLAGS_OFFSET offsetof(struct tcb_s, flags) -#endif - /**************************************************************************** * Private Functions ****************************************************************************/ #ifdef CONFIG_LIB_SYSCALL +/**************************************************************************** + * Name: do_syscall + * + * Description: + * Call the stub function corresponding to the system call. NOTE the non- + * standard parameter passing: + * + * A0 = SYS_ call number + * A1 = parm0 + * A2 = parm1 + * A3 = parm2 + * A4 = parm3 + * A5 = parm4 + * A6 = parm5 + * + ****************************************************************************/ + +uintptr_t do_syscall(unsigned int nbr, uintptr_t parm1, Review Comment: Changing the function to static makes the compiler inline the function into dispatch_syscall (it was kind of expected), which causes a register context corruption. I need to look into the inline assembly code more carefully. Maybe the clobber list is incomplete. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
