From commits-return-8942-archive-asf-public=cust-asf.ponee.io@nuttx.apache.org Tue May 5 15:10:13 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id B4CC0180665 for ; Tue, 5 May 2020 17:10:12 +0200 (CEST) Received: (qmail 36817 invoked by uid 500); 5 May 2020 15:10:12 -0000 Mailing-List: contact commits-help@nuttx.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@nuttx.apache.org Delivered-To: mailing list commits@nuttx.apache.org Received: (qmail 36780 invoked by uid 99); 5 May 2020 15:10:12 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 May 2020 15:10:12 +0000 From: =?utf-8?q?GitBox?= To: commits@nuttx.apache.org Subject: =?utf-8?q?=5BGitHub=5D_=5Bincubator-nuttx=5D_patacongo_commented_on_a_change?= =?utf-8?q?_in_pull_request_=23965=3A_fs=3A_Remove_all_LIBC=5FIOCTL=5FVARIAD?= =?utf-8?q?IC_related_stuff?= Message-ID: <158869141207.26397.5562955458470465707.asfpy@gitbox.apache.org> Date: Tue, 05 May 2020 15:10:12 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit References: In-Reply-To: patacongo commented on a change in pull request #965: URL: https://github.com/apache/incubator-nuttx/pull/965#discussion_r420185363 ########## File path: syscall/syscall.csv ########## @@ -42,7 +41,7 @@ "if_indextoname","net/if.h","defined(CONFIG_NETDEV_IFINDEX)","FAR char *","unsigned int","FAR char *" "if_nametoindex","net/if.h","defined(CONFIG_NETDEV_IFINDEX)","unsigned int","FAR const char *" "insmod","nuttx/module.h","defined(CONFIG_MODULE)","FAR void *","FAR const char *","FAR const char *" -"ioctl","sys/ioctl.h","!defined(CONFIG_LIBC_IOCTL_VARIADIC)","int","int","int","unsigned long" +"ioctl","sys/ioctl.h","","int","int","int","..." Review comment: > Since all these functions just accept one more argument from standard, we can modify mksyscall not to hard code the max number to 7 instead geting it from syscall.cvs like this: > > ``` > "open","fcntl.h","","int","const char*","int","...1" I think that is a good idea. That would greatly improve performance. It doesn't resolve the issue of the type of the argument; it would still assume that it is a uintptr_t even though in reality it is a mode_t or unsigned int. That would not work for something like syslog() which has an arbitrarily long list of arguments of various types, perhaps as many as 20 or more. "..." must always be the last argument. So perhaps "...N" could be followed by a list of N types like: "...1","mode_t" could mean that there is at most one argument of type mode_t. That would also solve the typing issue. ---------------------------------------------------------------- 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: users@infra.apache.org