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 2022/12/29 07:04:38 UTC
[GitHub] [nuttx] Gary-Hobson opened a new pull request, #8002: drivers/note: add note_syscall_enter parameter list
Gary-Hobson opened a new pull request, #8002:
URL: https://github.com/apache/nuttx/pull/8002
## Summary
add note_syscall_enter parameter list
## Impact
## Testing
--
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.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx] xiaoxiang781216 commented on a diff in pull request #8002: drivers/note: add note_syscall_enter parameter list
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #8002:
URL: https://github.com/apache/nuttx/pull/8002#discussion_r1058951402
##########
drivers/note/note_driver.c:
##########
@@ -1210,23 +1217,21 @@ void sched_note_syscall_enter(int nr, int argc, ...)
/* If needed, retrieve the given syscall arguments */
- va_start(ap, argc);
-
args = note.nsc_args;
for (i = 0; i < argc; i++)
{
- arg = (uintptr_t)va_arg(ap, uintptr_t);
+ arg = (uintptr_t)va_arg(copy, uintptr_t);
sched_note_flatten(args, &arg, sizeof(arg));
args += sizeof(uintptr_t);
}
-
- va_end(ap);
}
Review Comment:
need add va_end here
##########
drivers/note/note_driver.c:
##########
@@ -1184,13 +1186,18 @@ void sched_note_syscall_enter(int nr, int argc, ...)
}
#endif
+ va_start(ap, argc);
for (driver = g_note_drivers; *driver; driver++)
{
- if (note_syscall_enter(*driver, nr))
+ va_list copy;
+ va_copy(copy, ap);
+ if (note_syscall_enter(*driver, nr, argc, ©))
{
+ va_end(copy);
continue;
}
+ va_end(copy);
Review Comment:
need move after line 1202
--
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.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx] acassis merged pull request #8002: drivers/note: add note_syscall_enter parameter list
Posted by GitBox <gi...@apache.org>.
acassis merged PR #8002:
URL: https://github.com/apache/nuttx/pull/8002
--
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.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx] xiaoxiang781216 commented on a diff in pull request #8002: drivers/note: add note_syscall_enter parameter list
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #8002:
URL: https://github.com/apache/nuttx/pull/8002#discussion_r1058952982
##########
include/nuttx/note/note_driver.h:
##########
@@ -78,8 +78,10 @@ struct note_driver_ops_s
FAR volatile void *spinlock, int type);
#endif
#ifdef CONFIG_SCHED_INSTRUMENTATION_SYSCALL
- CODE void (*syscall_enter)(FAR struct note_driver_s *drv, int nr);
- CODE void (*syscall_leave)(FAR struct note_driver_s *drv, int nr);
+ CODE void (*syscall_enter)(FAR struct note_driver_s *drv,
+ int nr, int argc, va_list *ap);
Review Comment:
let's add printf_like modifiler
--
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.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org