nuttx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-nuttx] YuuichiNakamura commented on issue #740: problem with nxsig_timeout (sig_timedwait.c)
Date Mon, 06 Apr 2020 05:20:13 GMT
YuuichiNakamura commented on issue #740: problem with nxsig_timeout (sig_timedwait.c)
URL: https://github.com/apache/incubator-nuttx/issues/740#issuecomment-609570919
 
 
   
   The minimum essential changes for the portability are included in the PR, but
   if possible, I think that the API spec of wd_start() should be changed.
   Because the current spec is likely to misuse which breaks the portability.
   
   
   My proposal is, to change the API to:
   ` int wd_start(WDOG_ID wdog, int32_t delay, wdentry_t wdentry, size_t size, wdparm_t arg);`
   
   And change the typedef of wdentry_t to:
   `typedef CODE void (*wdentry_t)(wdparm_t arg);`
   
   Instead of passing the variable arguments, pass the pointer to struct and its size
   to wd_start() for multiple arguments.
   For the almost all callers which passes only one argument, if size == 0,
   arg is not treated as the pointer, but just a single value and it is given to
   the callback as it is.
   
   How about the proposal?
   
   I think that it is difficult to change such API spec, but if acceptable,
   I'll try to make the new PR for the API change.

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

Mime
View raw message