You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "xiaoxiang781216 (via GitHub)" <gi...@apache.org> on 2023/01/23 22:55:00 UTC
[GitHub] [nuttx] xiaoxiang781216 opened a new pull request, #8224: sched: Implement tkill/tgkill
xiaoxiang781216 opened a new pull request, #8224:
URL: https://github.com/apache/nuttx/pull/8224
## Summary
https://linux.die.net/man/2/tgkill
## Impact
New API
## Testing
Pass sim:ostest
--
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 pull request #8224: sched: Implement tkill/tgkill
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #8224:
URL: https://github.com/apache/nuttx/pull/8224#issuecomment-1403565517
let's merge this patch? @acassis
--
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 #8224: sched: Implement tkill/tgkill
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #8224:
URL: https://github.com/apache/nuttx/pull/8224#discussion_r1087388498
##########
sched/signal/sig_tgkill.c:
##########
@@ -67,14 +65,13 @@
*
****************************************************************************/
-int pthread_kill(pthread_t thread, int signo)
+int tgkill(pid_t pid, pid_t tid, int signo)
Review Comment:
> Do we need to add `UNUSED(pid);` or put
>
If there is no warning, why add it?
> ```
> #ifdef CONFIG_SCHED_HAVE_PARENT
> if (pid != (pid_t)-1)
> {
> DEBUGASSERT(pid == rtcb->pid);
> }
> #endif
> ```
>
> ?
Can not, since pid mean the main task pid, not the calling thread tid if it isn't -1.
--
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 commented on pull request #8224: sched: Implement tkill/tgkill
Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on PR #8224:
URL: https://github.com/apache/nuttx/pull/8224#issuecomment-1402326295
Thank you @xiaoxiang781216! I didn't get the initial intention because the patch didn't show the move to libc, but in fact it was removed only as a syscall.
--
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 commented on pull request #8224: sched: Implement tkill/tgkill
Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on PR #8224:
URL: https://github.com/apache/nuttx/pull/8224#issuecomment-1402070511
@xiaoxiang781216 why to remove pthread_kill() after adding tgkill()? Isn't it make our pthread incompatible with other POSIX OSes? Also take a look at PX5 RTOS: https://www.youtube.com/watch?v=6WO-Z32hKeE his justification to not using existent RTOS is because they are not pthread compatible with Linux. I think he doesn't know NuttX because our pthread is compatible with Linux.
--
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] pkarashchenko commented on a diff in pull request #8224: sched: Implement tkill/tgkill
Posted by "pkarashchenko (via GitHub)" <gi...@apache.org>.
pkarashchenko commented on code in PR #8224:
URL: https://github.com/apache/nuttx/pull/8224#discussion_r1087191454
##########
sched/signal/sig_tgkill.c:
##########
@@ -67,14 +65,13 @@
*
****************************************************************************/
-int pthread_kill(pthread_t thread, int signo)
+int tgkill(pid_t pid, pid_t tid, int signo)
Review Comment:
Do we need to add `UNUSED(pid);` or put
```
#ifdef CONFIG_SCHED_HAVE_PARENT
if (pid != (pid_t)-1)
{
DEBUGASSERT(pid == rtcb->pid);
}
#endif
```
?
##########
sched/signal/sig_tgkill.c:
##########
@@ -67,14 +65,13 @@
*
****************************************************************************/
-int pthread_kill(pthread_t thread, int signo)
+int tgkill(pid_t pid, pid_t tid, int signo)
Review Comment:
Do we need to add `UNUSED(pid);` or put
```
#ifdef CONFIG_SCHED_HAVE_PARENT
if (pid != (pid_t)-1)
{
DEBUGASSERT(pid == rtcb->pid);
}
#endif
```
?
--
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 commented on pull request #8224: sched: Implement tkill/tgkill
Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on PR #8224:
URL: https://github.com/apache/nuttx/pull/8224#issuecomment-1402076841
@xiaoxiang781216 is it possible to keep pthread_kill() as a function that just call tgkill()? This way applications that needs pthread_kill() will still work on NuttX.
--
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 pull request #8224: sched: Implement tkill/tgkill
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #8224:
URL: https://github.com/apache/nuttx/pull/8224#issuecomment-1402198167
@acassis pthread_kill still exist, but move to libc:
https://github.com/apache/nuttx/pull/8224/files#diff-ed1c7fd078c8be1802e132c2ad837711277ddbae7c7cfe9e82236e0eebdb9839R60-R69
because since it's a simple wrapper around tkill.
--
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] pkarashchenko merged pull request #8224: sched: Implement tkill/tgkill
Posted by "pkarashchenko (via GitHub)" <gi...@apache.org>.
pkarashchenko merged PR #8224:
URL: https://github.com/apache/nuttx/pull/8224
--
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 #8224: sched: Implement tkill/tgkill
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #8224:
URL: https://github.com/apache/nuttx/pull/8224#discussion_r1087388498
##########
sched/signal/sig_tgkill.c:
##########
@@ -67,14 +65,13 @@
*
****************************************************************************/
-int pthread_kill(pthread_t thread, int signo)
+int tgkill(pid_t pid, pid_t tid, int signo)
Review Comment:
Can not, since pid mean the main task pid, not the calling thread tid if it isn't -1.
--
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