YuuichiNakamura commented on a change in pull request #1271:
URL: https://github.com/apache/incubator-nuttx/pull/1271#discussion_r442631977



##########
File path: tools/mksyscall.c
##########
@@ -450,6 +452,27 @@ static void generate_stub(int nfixed, int nparms)
 
   fprintf(stream, ")\n{\n");
 
+  /* Generate the result variable definition for non-void function */
+
+  if (strcmp(g_parm[RETTYPE_INDEX], "void") != 0)
+    {
+      fprintf(stream, "  uintptr_t result;\n\n");

Review comment:
       I got it.

##########
File path: syscall/Makefile
##########
@@ -76,27 +88,43 @@ $(BIN1): $(PROXY_OBJS)
 $(BIN2): $(STUB_OBJS)
        $(call ARCHIVE, $@, $(STUB_OBJS))
 
+$(BIN3): $(WRAP_OBJS)
+       $(call ARCHIVE, $@, $(WRAP_OBJS))
+
+$(SYSCALLIST): .context
+
 .depend: Makefile $(SRCS)
-       $(Q) $(MKDEP) $(PROXYDEPPATH) $(STUBDEPPATH) \
+       $(Q) $(MKDEP) $(PROXYDEPPATH) $(STUBDEPPATH) $(WRAPDEPPATH) \
          "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
        $(Q) touch $@
 
 depend: .depend
 
 .context: syscall.csv
        $(Q) $(MAKE) -C $(TOPDIR)$(DELIM)tools -f Makefile.host mksyscall
+ifeq ($(CONFIG_LIB_SYSCALL),y)

Review comment:
       Is it mean that the system call is processed as:
   application -> syscall proxy -> (syscall handler) -> syscall stub -> 
**syscall wrapper** -> kernel function
   in PROTECTED/KERNEL build?
   
   If so, I'll try to make changes for it.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to