nuttx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-nuttx] patacongo opened a new pull request #980: Improve proxy/stub parameter passing for variadic OS interfaces.
Date Tue, 05 May 2020 22:58:40 GMT

patacongo opened a new pull request #980:
URL: https://github.com/apache/incubator-nuttx/pull/980


   ## Summary
   
   In the past a very low effort interface was used:
   
   - All parmeters were treated as though they were type uinptr_t, and
   - The maximum number of parmeters (6) was passed in all cases.
   
   The first is potentially wrong and the second is very inefficient.  This commit improves
this by:
   
   - Making tools/mksyscall.c more intelligent, and
   - Extending the syntax for variadic functions.
   
   For example, in syscall.cvs, the open() API was represened like this:
   
       "open","fcntl.h","","int","const char*","int","..."
   
   In reality, open may take only a single optional argument of type mode_t which is not the
same size as uintptr_t.  And there is not reason to pass 6 parameters in that case.
   
   And this has been extended to:
   
       "open","fcntl.h","","int","const char*","int","...","mode_t"
   
   The existence of the "mode_t" tells tools/mksyscall that there is at most one optional
parameter and, if present, it is of type mode_t.
   
   ## Impact
   
   This change has no effect in the FLAT build but could effect PROTECTED and KERNEL mode
builds.  Those are the only build modes that require stubs and proxies.
   
   ## Testing
   
   Verififed witih stm32f4disovery:kostest
   
   


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



Mime
View raw message