You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/04/06 04:43:50 UTC

[GitHub] [incubator-nuttx] YuuichiNakamura commented on issue #740: problem with nxsig_timeout (sig_timedwait.c)

YuuichiNakamura commented on issue #740: problem with nxsig_timeout (sig_timedwait.c)
URL: https://github.com/apache/incubator-nuttx/issues/740#issuecomment-609562257
 
 
   I have found a same problem which Sebastian pointed out in another processor.
   Not only Renesus RX, for example, AVR has similar ABI spec and it cannot work
   with the current code.
   
   So, I have investigated the all callers of wd_start() in the latest NuttX kernel.
   There are 206 wd_start() callers and 47 callers of them uses the type casting
   from fixed argument function pointer to the variadic function pointer (wdentry_t).
   
   Many of them have no need to fix because they are for the specific architecture
   or specific device, but 8 callers in sched/ directory must be
   fixed because they are common to all architectures.
   
   7 callers pass the function pointer with only one argument.
   They should be fixed just adding periods like:
   
   > static void nxsig_timeout(int argc, wdparm_t itcb, ...)
   
   The only one exception is pthread_condtimedwait() which handles two arguments.
   (This is only one use case in all NuttX kernel source which handle
    multiple arguments for wd_start() callback.)
   
   To make it portable, va_arg() must be used in pthread_condtimedout().
   
   I will issue the PR for them.
   

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


With regards,
Apache Git Services