Commit Graph

3 Commits

Author SHA1 Message Date
Gregory Nutt
6906853f8e Improve proxy/stub parameter passing for variadic OS interfaces.
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.
2020-05-06 01:00:43 +01:00
Xiang Xiao
acb83cfc61 tools/csvparser.h: Extend MAX_PARMSIZE to 256. Fixes this issue: 70: Parameter too long: ... 2018-11-08 07:36:02 -06:00
patacongo
8b768dc6fa Separate CVS parsing logic from tools/mksyscall.c; Create tools/mksymtab.c to create symbol tables from CSV files
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5075 42af7a65-404d-4744-a932-0658087f49c3
2012-09-01 15:33:33 +00:00