2015-10-03 15:25:53 +02:00
|
|
|
/****************************************************************************
|
2021-03-08 22:39:04 +01:00
|
|
|
* sched/group/group_signal.c
|
2013-01-25 21:00:37 +01:00
|
|
|
*
|
2021-02-08 16:33:58 +01:00
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed with
|
|
|
|
* this work for additional information regarding copyright ownership. The
|
|
|
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
|
|
|
* "License"); you may not use this file except in compliance with the
|
|
|
|
* License. You may obtain a copy of the License at
|
2013-01-25 21:00:37 +01:00
|
|
|
*
|
2021-02-08 16:33:58 +01:00
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
2013-01-25 21:00:37 +01:00
|
|
|
*
|
2021-02-08 16:33:58 +01:00
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
* License for the specific language governing permissions and limitations
|
|
|
|
* under the License.
|
2013-01-25 21:00:37 +01:00
|
|
|
*
|
2015-10-03 15:25:53 +02:00
|
|
|
****************************************************************************/
|
2013-01-25 21:00:37 +01:00
|
|
|
|
2015-10-03 15:25:53 +02:00
|
|
|
/****************************************************************************
|
2013-01-25 21:00:37 +01:00
|
|
|
* Included Files
|
2015-10-03 15:25:53 +02:00
|
|
|
****************************************************************************/
|
2013-01-25 21:00:37 +01:00
|
|
|
|
|
|
|
#include <nuttx/config.h>
|
|
|
|
|
|
|
|
#include <sched.h>
|
|
|
|
#include <assert.h>
|
|
|
|
#include <signal.h>
|
2013-01-26 18:28:20 +01:00
|
|
|
#include <errno.h>
|
2013-01-25 21:00:37 +01:00
|
|
|
#include <debug.h>
|
|
|
|
|
2020-04-29 18:53:36 +02:00
|
|
|
#include <nuttx/signal.h>
|
|
|
|
|
2014-08-09 01:53:55 +02:00
|
|
|
#include "sched/sched.h"
|
2014-08-08 22:06:42 +02:00
|
|
|
#include "group/group.h"
|
2014-08-08 20:44:44 +02:00
|
|
|
#include "signal/signal.h"
|
2013-01-25 21:00:37 +01:00
|
|
|
|
2015-10-03 15:25:53 +02:00
|
|
|
/****************************************************************************
|
2013-01-25 21:00:37 +01:00
|
|
|
* Private Types
|
2015-10-03 15:25:53 +02:00
|
|
|
****************************************************************************/
|
2013-01-25 21:00:37 +01:00
|
|
|
|
2013-02-06 16:43:28 +01:00
|
|
|
#ifdef HAVE_GROUP_MEMBERS
|
|
|
|
struct group_signal_s
|
|
|
|
{
|
|
|
|
FAR siginfo_t *siginfo; /* Signal to be dispatched */
|
|
|
|
FAR struct tcb_s *dtcb; /* Default, valid TCB */
|
|
|
|
FAR struct tcb_s *utcb; /* TCB with this signal unblocked */
|
|
|
|
FAR struct tcb_s *atcb; /* This TCB was awakened */
|
|
|
|
FAR struct tcb_s *ptcb; /* This TCB received the signal */
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
2015-10-03 15:25:53 +02:00
|
|
|
/****************************************************************************
|
2013-01-25 21:00:37 +01:00
|
|
|
* Private Functions
|
2015-10-03 15:25:53 +02:00
|
|
|
****************************************************************************/
|
2013-01-25 21:00:37 +01:00
|
|
|
|
2015-10-03 15:25:53 +02:00
|
|
|
/****************************************************************************
|
2013-02-06 16:43:28 +01:00
|
|
|
* Name: group_signal_handler
|
2013-01-25 21:00:37 +01:00
|
|
|
*
|
|
|
|
* Description:
|
2013-02-06 16:43:28 +01:00
|
|
|
* Callback from group_foreachchild that handles one member of the group.
|
2013-01-25 21:00:37 +01:00
|
|
|
*
|
2018-03-13 16:52:27 +01:00
|
|
|
* Input Parameters:
|
2013-02-06 16:43:28 +01:00
|
|
|
* pid - The ID of the group member that may be signalled.
|
|
|
|
* arg - A pointer to a struct group_signal_s instance.
|
2013-01-25 21:00:37 +01:00
|
|
|
*
|
2018-02-01 17:00:02 +01:00
|
|
|
* Returned Value:
|
2013-01-25 21:00:37 +01:00
|
|
|
* 0 (OK) on success; a negated errno value on failure.
|
|
|
|
*
|
2015-10-03 15:25:53 +02:00
|
|
|
****************************************************************************/
|
2013-01-25 21:00:37 +01:00
|
|
|
|
|
|
|
#ifdef HAVE_GROUP_MEMBERS
|
2013-02-06 16:43:28 +01:00
|
|
|
static int group_signal_handler(pid_t pid, FAR void *arg)
|
|
|
|
{
|
|
|
|
FAR struct group_signal_s *info = (FAR struct group_signal_s *)arg;
|
|
|
|
FAR struct tcb_s *tcb;
|
2013-02-05 20:50:37 +01:00
|
|
|
FAR sigactq_t *sigact;
|
|
|
|
int ret;
|
2013-01-25 21:00:37 +01:00
|
|
|
|
2013-02-06 16:43:28 +01:00
|
|
|
/* Get the TCB associated with the group member */
|
2013-01-25 21:00:37 +01:00
|
|
|
|
2020-05-09 16:04:45 +02:00
|
|
|
tcb = nxsched_get_tcb(pid);
|
2016-12-04 13:52:08 +01:00
|
|
|
DEBUGASSERT(tcb != NULL && tcb->group != NULL && info != NULL);
|
|
|
|
|
2013-02-06 16:43:28 +01:00
|
|
|
if (tcb)
|
|
|
|
{
|
2020-04-29 18:53:36 +02:00
|
|
|
/* Set this one as the default if we have not already set the
|
|
|
|
* default.
|
|
|
|
*/
|
2013-01-25 21:00:37 +01:00
|
|
|
|
2013-02-06 16:43:28 +01:00
|
|
|
if (!info->dtcb)
|
|
|
|
{
|
|
|
|
info->dtcb = tcb;
|
|
|
|
}
|
2013-01-25 21:00:37 +01:00
|
|
|
|
2013-02-06 16:43:28 +01:00
|
|
|
/* Is the thread waiting for this signal (in this case, the signal is
|
|
|
|
* probably blocked).
|
|
|
|
*/
|
|
|
|
|
2020-04-29 18:53:36 +02:00
|
|
|
ret = nxsig_ismember(&tcb->sigwaitmask, info->siginfo->si_signo);
|
signal: fix group signal can't dispatch some parent group twice
reproduce:
static void *pthread(void *arg)
{
system(arg);
}
void test (int argc, char *argv[])
{
pthread_create(&pthread0, &attr, pthread, argv[1]);
pthread_create(&pthread1, &attr, pthread, argv[2]);
}
only one pthread system() returnd, othres hanged
rootcause:
As we known, system() will create a new task called:
system -c XX
The example:
parent group child groups
pthread0 -> waitpid() -> system -c ps -> exit() -> nxtask_signalparent()
pthread1 -> waitpid() -> system -c ls -> exit() -> nxtask_signalparent()
Each child group exit with function nxtask_signalparent(),
As we expect:
system -c ps will signal pthread0
system -c ls will signal pthread1
But actually:
system -c ps will signal pthread0/1
system -c ls will signal pthread0/1
As the spec, we know, this behavior is normal:
https://man7.org/linux/man-pages/man2/sigwaitinfo.2.html
So for this situation, when the signo is SIGCHLD, we broadcast.
Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-06-21 16:40:52 +02:00
|
|
|
if (ret == 1 && (!info->atcb || info->siginfo->si_signo == SIGCHLD))
|
2013-01-25 21:00:37 +01:00
|
|
|
{
|
2013-02-06 16:43:28 +01:00
|
|
|
/* Yes.. This means that the task is suspended, waiting for this
|
|
|
|
* signal to occur. Stop looking and use this TCB. The
|
|
|
|
* requirement is this: If a task group receives a signal and
|
|
|
|
* more than one thread is waiting on that signal, then one and
|
|
|
|
* only one indeterminate thread out of that waiting group will
|
|
|
|
* receive the signal.
|
2013-01-25 21:00:37 +01:00
|
|
|
*/
|
|
|
|
|
This change renames all internal, private NuttX signal-related functions to use the prefix nxsig_ so that they cannot be confused with application interfaces that begin, primarily, with sig_
This is analogous to similar renaming that was done previously for semaphores.
Squashed commit of the following:
sched/signal: Fix a few compile warnings introduced by naming changes.
sched/signal: Rename all private, internal signl functions to use the nxsig_ prefix.
sched/signal: Rename sig_removependingsignal, sig_unmaskpendingsignal, and sig_mqnotempty to nxsig_remove_pendingsignal, nxsig_unmask_pendingsignal, and nxsig_mqnotempty to make it clear that these are OS internal interfaces.
sched/signal: Rename sig_findaction and sig_lowest to nxsig_find_action and nxsig_lowest to make it clear that these are OS internal interfaces.
sched/signal: Rename sig_allocatepingsigaction and sig_deliver to nxsig_alloc_pendingsigaction and nxsig_deliver to make it clear that these are OS internal interfaces.
sched/signal: Rename sig_cleanup, sig_release, sig_releasependingaction, and sig_releasependingsignal to nxsig_cleanup, nxsig_release, nxsig_release_pendingaction, and nxsig_release_pendingsignal to make it clear that these are OS internal interfaces.
sched/signal: Rename sig_tcbdispatch and sig_dispatch to nxsig_tcbdispatch and nxsig_dispatch to make it clear that these are OS internal interfaces.
sched/signal: Rename sig_releaseaction and sig_pendingset to nxsig_release_action and nxsig_pendingset to make it clear that these are OS internal interfaces.
sched/signal: Rename sig_initialize and sig_allocateactionblock to nxsig_initialize and nxsig_alloc_actionblock to make it clear that these are OS internal interfaces.
2017-10-05 21:25:25 +02:00
|
|
|
ret = nxsig_tcbdispatch(tcb, info->siginfo);
|
2013-02-06 16:43:28 +01:00
|
|
|
if (ret < 0)
|
2013-02-05 20:50:37 +01:00
|
|
|
{
|
2013-02-06 16:43:28 +01:00
|
|
|
return ret;
|
2013-02-05 20:50:37 +01:00
|
|
|
}
|
|
|
|
|
2013-02-06 16:43:28 +01:00
|
|
|
/* Limit to one thread */
|
2013-02-05 20:50:37 +01:00
|
|
|
|
2013-02-06 16:43:28 +01:00
|
|
|
info->atcb = tcb;
|
signal: fix group signal can't dispatch some parent group twice
reproduce:
static void *pthread(void *arg)
{
system(arg);
}
void test (int argc, char *argv[])
{
pthread_create(&pthread0, &attr, pthread, argv[1]);
pthread_create(&pthread1, &attr, pthread, argv[2]);
}
only one pthread system() returnd, othres hanged
rootcause:
As we known, system() will create a new task called:
system -c XX
The example:
parent group child groups
pthread0 -> waitpid() -> system -c ps -> exit() -> nxtask_signalparent()
pthread1 -> waitpid() -> system -c ls -> exit() -> nxtask_signalparent()
Each child group exit with function nxtask_signalparent(),
As we expect:
system -c ps will signal pthread0
system -c ls will signal pthread1
But actually:
system -c ps will signal pthread0/1
system -c ls will signal pthread0/1
As the spec, we know, this behavior is normal:
https://man7.org/linux/man-pages/man2/sigwaitinfo.2.html
So for this situation, when the signo is SIGCHLD, we broadcast.
Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-06-21 16:40:52 +02:00
|
|
|
|
|
|
|
if (info->ptcb != NULL && info->siginfo->si_signo != SIGCHLD)
|
2013-02-05 20:50:37 +01:00
|
|
|
{
|
2013-02-06 16:43:28 +01:00
|
|
|
return 1; /* Terminate the search */
|
|
|
|
}
|
|
|
|
}
|
2013-02-05 20:50:37 +01:00
|
|
|
|
2013-02-06 16:43:28 +01:00
|
|
|
/* Is this signal unblocked on this thread? */
|
2013-02-05 20:50:37 +01:00
|
|
|
|
2020-04-29 18:53:36 +02:00
|
|
|
if (!nxsig_ismember(&tcb->sigprocmask, info->siginfo->si_signo) &&
|
2013-02-06 16:43:28 +01:00
|
|
|
!info->ptcb && tcb != info->atcb)
|
|
|
|
{
|
|
|
|
/* Yes.. remember this TCB if we have not encountered any
|
|
|
|
* other threads that have the signal unblocked.
|
|
|
|
*/
|
2013-02-05 20:50:37 +01:00
|
|
|
|
2013-02-06 16:43:28 +01:00
|
|
|
if (!info->utcb)
|
|
|
|
{
|
|
|
|
info->utcb = tcb;
|
2013-02-05 20:50:37 +01:00
|
|
|
}
|
|
|
|
|
2016-02-18 15:34:11 +01:00
|
|
|
/* Is there also a action associated with the task group? */
|
2013-02-05 20:50:37 +01:00
|
|
|
|
This change renames all internal, private NuttX signal-related functions to use the prefix nxsig_ so that they cannot be confused with application interfaces that begin, primarily, with sig_
This is analogous to similar renaming that was done previously for semaphores.
Squashed commit of the following:
sched/signal: Fix a few compile warnings introduced by naming changes.
sched/signal: Rename all private, internal signl functions to use the nxsig_ prefix.
sched/signal: Rename sig_removependingsignal, sig_unmaskpendingsignal, and sig_mqnotempty to nxsig_remove_pendingsignal, nxsig_unmask_pendingsignal, and nxsig_mqnotempty to make it clear that these are OS internal interfaces.
sched/signal: Rename sig_findaction and sig_lowest to nxsig_find_action and nxsig_lowest to make it clear that these are OS internal interfaces.
sched/signal: Rename sig_allocatepingsigaction and sig_deliver to nxsig_alloc_pendingsigaction and nxsig_deliver to make it clear that these are OS internal interfaces.
sched/signal: Rename sig_cleanup, sig_release, sig_releasependingaction, and sig_releasependingsignal to nxsig_cleanup, nxsig_release, nxsig_release_pendingaction, and nxsig_release_pendingsignal to make it clear that these are OS internal interfaces.
sched/signal: Rename sig_tcbdispatch and sig_dispatch to nxsig_tcbdispatch and nxsig_dispatch to make it clear that these are OS internal interfaces.
sched/signal: Rename sig_releaseaction and sig_pendingset to nxsig_release_action and nxsig_pendingset to make it clear that these are OS internal interfaces.
sched/signal: Rename sig_initialize and sig_allocateactionblock to nxsig_initialize and nxsig_alloc_actionblock to make it clear that these are OS internal interfaces.
2017-10-05 21:25:25 +02:00
|
|
|
sigact = nxsig_find_action(tcb->group, info->siginfo->si_signo);
|
2013-02-06 16:43:28 +01:00
|
|
|
if (sigact)
|
2013-02-05 20:50:37 +01:00
|
|
|
{
|
2013-02-06 16:43:28 +01:00
|
|
|
/* Yes.. then use this thread. The requirement is this:
|
|
|
|
* If a task group receives a signal then one and only one
|
|
|
|
* indeterminate thread in the task group which is not
|
|
|
|
* blocking the signal will receive the signal.
|
2013-02-05 20:50:37 +01:00
|
|
|
*/
|
|
|
|
|
This change renames all internal, private NuttX signal-related functions to use the prefix nxsig_ so that they cannot be confused with application interfaces that begin, primarily, with sig_
This is analogous to similar renaming that was done previously for semaphores.
Squashed commit of the following:
sched/signal: Fix a few compile warnings introduced by naming changes.
sched/signal: Rename all private, internal signl functions to use the nxsig_ prefix.
sched/signal: Rename sig_removependingsignal, sig_unmaskpendingsignal, and sig_mqnotempty to nxsig_remove_pendingsignal, nxsig_unmask_pendingsignal, and nxsig_mqnotempty to make it clear that these are OS internal interfaces.
sched/signal: Rename sig_findaction and sig_lowest to nxsig_find_action and nxsig_lowest to make it clear that these are OS internal interfaces.
sched/signal: Rename sig_allocatepingsigaction and sig_deliver to nxsig_alloc_pendingsigaction and nxsig_deliver to make it clear that these are OS internal interfaces.
sched/signal: Rename sig_cleanup, sig_release, sig_releasependingaction, and sig_releasependingsignal to nxsig_cleanup, nxsig_release, nxsig_release_pendingaction, and nxsig_release_pendingsignal to make it clear that these are OS internal interfaces.
sched/signal: Rename sig_tcbdispatch and sig_dispatch to nxsig_tcbdispatch and nxsig_dispatch to make it clear that these are OS internal interfaces.
sched/signal: Rename sig_releaseaction and sig_pendingset to nxsig_release_action and nxsig_pendingset to make it clear that these are OS internal interfaces.
sched/signal: Rename sig_initialize and sig_allocateactionblock to nxsig_initialize and nxsig_alloc_actionblock to make it clear that these are OS internal interfaces.
2017-10-05 21:25:25 +02:00
|
|
|
ret = nxsig_tcbdispatch(tcb, info->siginfo);
|
2013-02-06 16:43:28 +01:00
|
|
|
if (ret < 0)
|
2013-02-05 20:50:37 +01:00
|
|
|
{
|
2013-02-06 16:43:28 +01:00
|
|
|
return ret;
|
2013-02-05 20:50:37 +01:00
|
|
|
}
|
|
|
|
|
2013-02-06 16:43:28 +01:00
|
|
|
/* Limit to one thread */
|
2013-02-05 20:50:37 +01:00
|
|
|
|
2013-02-06 16:43:28 +01:00
|
|
|
info->ptcb = tcb;
|
|
|
|
if (info->atcb != NULL)
|
2013-02-05 20:50:37 +01:00
|
|
|
{
|
2013-02-06 16:43:28 +01:00
|
|
|
return 1; /* Terminate the search */
|
2013-02-05 20:50:37 +01:00
|
|
|
}
|
|
|
|
}
|
2013-01-25 21:00:37 +01:00
|
|
|
}
|
|
|
|
}
|
2013-02-05 20:50:37 +01:00
|
|
|
|
2013-02-06 16:43:28 +01:00
|
|
|
return 0; /* Keep searching */
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2015-10-03 15:25:53 +02:00
|
|
|
/****************************************************************************
|
2013-02-06 16:43:28 +01:00
|
|
|
* Public Functions
|
2015-10-03 15:25:53 +02:00
|
|
|
****************************************************************************/
|
2013-02-06 16:43:28 +01:00
|
|
|
|
2015-10-03 15:25:53 +02:00
|
|
|
/****************************************************************************
|
2013-02-06 16:43:28 +01:00
|
|
|
* Name: group_signal
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Send a signal to every member of the group.
|
|
|
|
*
|
2018-03-13 16:52:27 +01:00
|
|
|
* Input Parameters:
|
2013-02-06 16:43:28 +01:00
|
|
|
* group - The task group that needs to be signalled.
|
|
|
|
*
|
2018-02-01 17:00:02 +01:00
|
|
|
* Returned Value:
|
2013-02-06 16:43:28 +01:00
|
|
|
* 0 (OK) on success; a negated errno value on failure.
|
|
|
|
*
|
|
|
|
* Assumptions:
|
2020-04-29 18:53:36 +02:00
|
|
|
* Called during task termination in a safe context. No special precautions
|
2013-02-06 16:43:28 +01:00
|
|
|
* are required here. Because signals can be sent from interrupt handlers,
|
|
|
|
* this function may be called indirectly in the context of an interrupt
|
|
|
|
* handler.
|
|
|
|
*
|
2015-10-03 15:25:53 +02:00
|
|
|
****************************************************************************/
|
2013-02-06 16:43:28 +01:00
|
|
|
|
|
|
|
int group_signal(FAR struct task_group_s *group, FAR siginfo_t *siginfo)
|
|
|
|
{
|
|
|
|
#ifdef HAVE_GROUP_MEMBERS
|
|
|
|
struct group_signal_s info;
|
|
|
|
FAR struct tcb_s *tcb;
|
|
|
|
int ret;
|
|
|
|
|
|
|
|
DEBUGASSERT(group && siginfo);
|
|
|
|
|
|
|
|
info.siginfo = siginfo;
|
|
|
|
info.dtcb = NULL; /* Default, valid TCB */
|
|
|
|
info.utcb = NULL; /* TCB with this signal unblocked */
|
|
|
|
info.atcb = NULL; /* This TCB was awakened */
|
|
|
|
info.ptcb = NULL; /* This TCB received the signal */
|
|
|
|
|
|
|
|
/* Make sure that pre-emption is disabled to that we signal all of the
|
|
|
|
* members of the group before any of them actually run. (This does
|
|
|
|
* nothing if were were called from an interrupt handler).
|
|
|
|
*/
|
|
|
|
|
2021-04-23 02:19:05 +02:00
|
|
|
#ifdef CONFIG_SMP
|
|
|
|
irqstate_t flags = enter_critical_section();
|
|
|
|
#else
|
2013-02-06 16:43:28 +01:00
|
|
|
sched_lock();
|
2021-04-23 02:19:05 +02:00
|
|
|
#endif
|
2013-02-06 16:43:28 +01:00
|
|
|
|
|
|
|
/* Now visit each member of the group and perform signal handling checks. */
|
|
|
|
|
|
|
|
ret = group_foreachchild(group, group_signal_handler, &info);
|
|
|
|
if (ret < 0)
|
|
|
|
{
|
|
|
|
goto errout;
|
|
|
|
}
|
|
|
|
|
2013-02-05 20:50:37 +01:00
|
|
|
/* We need to dispatch the signal in any event (if nothing else so that it
|
|
|
|
* can be added to the pending signal list). If we found a thread with the
|
|
|
|
* signal unblocked, then use that thread.
|
|
|
|
*/
|
|
|
|
|
2013-02-06 16:43:28 +01:00
|
|
|
if (info.atcb == NULL && info.ptcb == NULL)
|
2013-02-05 20:50:37 +01:00
|
|
|
{
|
2013-02-06 16:43:28 +01:00
|
|
|
if (info.utcb)
|
2013-02-05 20:50:37 +01:00
|
|
|
{
|
2013-02-06 16:43:28 +01:00
|
|
|
tcb = info.utcb;
|
2013-02-05 20:50:37 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Otherwise use the default TCB. There should always be a default
|
|
|
|
* TCB. It will have the signal blocked, but can be used to get the
|
|
|
|
* signal to a pending state.
|
|
|
|
*/
|
|
|
|
|
2021-05-12 09:27:03 +02:00
|
|
|
else if (info.dtcb)
|
2013-02-05 20:50:37 +01:00
|
|
|
{
|
2013-02-06 16:43:28 +01:00
|
|
|
tcb = info.dtcb;
|
2013-02-05 20:50:37 +01:00
|
|
|
}
|
2021-05-12 09:27:03 +02:00
|
|
|
else
|
|
|
|
{
|
|
|
|
ret = -ECHILD;
|
|
|
|
goto errout;
|
|
|
|
}
|
2013-02-05 20:50:37 +01:00
|
|
|
|
|
|
|
/* Now deliver the signal to the selected group member */
|
|
|
|
|
This change renames all internal, private NuttX signal-related functions to use the prefix nxsig_ so that they cannot be confused with application interfaces that begin, primarily, with sig_
This is analogous to similar renaming that was done previously for semaphores.
Squashed commit of the following:
sched/signal: Fix a few compile warnings introduced by naming changes.
sched/signal: Rename all private, internal signl functions to use the nxsig_ prefix.
sched/signal: Rename sig_removependingsignal, sig_unmaskpendingsignal, and sig_mqnotempty to nxsig_remove_pendingsignal, nxsig_unmask_pendingsignal, and nxsig_mqnotempty to make it clear that these are OS internal interfaces.
sched/signal: Rename sig_findaction and sig_lowest to nxsig_find_action and nxsig_lowest to make it clear that these are OS internal interfaces.
sched/signal: Rename sig_allocatepingsigaction and sig_deliver to nxsig_alloc_pendingsigaction and nxsig_deliver to make it clear that these are OS internal interfaces.
sched/signal: Rename sig_cleanup, sig_release, sig_releasependingaction, and sig_releasependingsignal to nxsig_cleanup, nxsig_release, nxsig_release_pendingaction, and nxsig_release_pendingsignal to make it clear that these are OS internal interfaces.
sched/signal: Rename sig_tcbdispatch and sig_dispatch to nxsig_tcbdispatch and nxsig_dispatch to make it clear that these are OS internal interfaces.
sched/signal: Rename sig_releaseaction and sig_pendingset to nxsig_release_action and nxsig_pendingset to make it clear that these are OS internal interfaces.
sched/signal: Rename sig_initialize and sig_allocateactionblock to nxsig_initialize and nxsig_alloc_actionblock to make it clear that these are OS internal interfaces.
2017-10-05 21:25:25 +02:00
|
|
|
ret = nxsig_tcbdispatch(tcb, siginfo);
|
2013-02-05 20:50:37 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
errout:
|
2021-04-23 02:19:05 +02:00
|
|
|
#ifdef CONFIG_SMP
|
|
|
|
leave_critical_section(flags);
|
|
|
|
#else
|
2013-01-25 21:00:37 +01:00
|
|
|
sched_unlock();
|
2021-04-23 02:19:05 +02:00
|
|
|
#endif
|
2013-02-05 20:50:37 +01:00
|
|
|
return ret;
|
|
|
|
|
2013-01-25 21:00:37 +01:00
|
|
|
#else
|
2013-02-05 20:50:37 +01:00
|
|
|
|
2022-07-11 17:11:40 +02:00
|
|
|
UNUSED(group);
|
|
|
|
UNUSED(siginfo);
|
2013-01-26 18:28:20 +01:00
|
|
|
return -ENOSYS;
|
2014-04-13 22:32:20 +02:00
|
|
|
|
2013-01-25 21:00:37 +01:00
|
|
|
#endif
|
|
|
|
}
|