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.
Move the logic to get TLS information from an inline function to a normal function. For the unaligned case, it is probably too large to be inlined.
Also fixes some minor things from review of previous commits.
CONFIG_TLS_ALIGNED will select the (legacy) aligned stack implementation of TLS. If CONFIG_TLS_ALIGNED is not defined, then the new, implementation of TLS using an unaligned stack will be enabled.
The "info" structure was used non initialized and causing bad sounds at
boot. The start() function is anyway called later on when actually playing
sounds.
rdrand was checking the wrong return value for the intrinsics
so it would block forever. The read function was also not returning
the actual number of bytes read.
This was tested by running the rand example application
NuttShell (NSH) NuttX-9.0.0
nsh>rand
Reading 8 random numbers
Random values (0x101584f70):
0000: 019a172df7d539f2df8550362e2d3f74 9b467c51ebe30b9f6510e540e34fabcc ...-..9...P6.-?t .F|Q....e..@.O..
Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
Something change on the GitHub side that has broken credentials
between the the fetch and buld workflow steps. There is no
way to tell the checkout action to only re-auth so we have it
checkout the repo again, but it will use what it already has.
In the future we can change fetch step to just compute the
target refs and store them in a script that we can call to
set the environment variables for the targets much like
this patch.
Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
There is a DEBUGPANIC in some logic. This happens if a a task exists at certain points with priority inheritance enabled. This event was not expected in the original design (although logic was provided to support it). Since, apparently, it does happen, the DEBUGPANIC must be removed.
Noted by Brennan Ashton.