xiaoxiang781216 commented on code in PR #21140:
URL: https://github.com/apache/nuttx/pull/21140#discussion_r4429778652


##########
include/sys/syscall_lookup.h:
##########
@@ -26,7 +26,13 @@
  * configuration
  */
 
+#if defined(CONFIG_ARCH_ARM) && !defined(CONFIG_BUILD_FLAT) && \
+    defined(CONFIG_ENABLE_ALL_SIGNALS)
+SYSCALL_LOOKUP1(signal_handler_return,     0)
+SYSCALL_LOOKUP(_exit,                      1)

Review Comment:
   why dup with line 34



##########
arch/arm/include/syscall.h:
##########
@@ -122,7 +122,11 @@
  * void signal_handler_return(void);
  */
 
-#define SYS_signal_handler_return (7)
+#ifdef __ASSEMBLY__
+#  define SYS_signal_handler_return CONFIG_SYS_RESERVED
+#else
+void signal_handler_return(void);

Review Comment:
   why add signal_handler_return



##########
include/sys/syscall_lookup.h:
##########
@@ -26,7 +26,13 @@
  * configuration
  */
 
+#if defined(CONFIG_ARCH_ARM) && !defined(CONFIG_BUILD_FLAT) && \
+    defined(CONFIG_ENABLE_ALL_SIGNALS)
+SYSCALL_LOOKUP1(signal_handler_return,     0)

Review Comment:
   why need add signal_handler_return to syscall.csv? the user issue syscall 
directly



##########
arch/arm/src/armv8-r/arm_syscall.c:
##########
@@ -183,6 +183,16 @@ uint32_t *arm_syscall(uint32_t *regs)
 
   cmd = regs[REG_R0];
 
+#if defined(CONFIG_BUILD_PROTECTED) || defined(CONFIG_BUILD_KERNEL)
+  if ((regs[REG_CPSR] & PSR_MODE_MASK) == PSR_MODE_USR &&

Review Comment:
   why add this check?



-- 
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]

Reply via email to