Trivial changes from review of last PR.
This commit is contained in:
parent
b9707776d6
commit
d7fae340c1
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/arm/src/armv7-m/up_schedulesigaction.c
|
* arch/arm/src/armv7-m/up_schedulesigaction.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009-2014, 2016-2017 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2009-2014, 2016-2018 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -118,7 +118,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
|||||||
if (tcb == this_task())
|
if (tcb == this_task())
|
||||||
{
|
{
|
||||||
/* CASE 1: We are not in an interrupt handler and a task is
|
/* CASE 1: We are not in an interrupt handler and a task is
|
||||||
* signalling itself for some reason.
|
* signaling itself for some reason.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!CURRENT_REGS)
|
if (!CURRENT_REGS)
|
||||||
@ -176,9 +176,9 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Otherwise, we are (1) signalling a task is not running from an
|
/* Otherwise, we are (1) signaling a task is not running from an
|
||||||
* interrupt handler or (2) we are not in an interrupt handler and the
|
* interrupt handler or (2) we are not in an interrupt handler and the
|
||||||
* running task is signalling* some non-running task.
|
* running task is signaling* some non-running task.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
else
|
else
|
||||||
@ -250,7 +250,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
|||||||
cpu = tcb->cpu;
|
cpu = tcb->cpu;
|
||||||
|
|
||||||
/* CASE 1: We are not in an interrupt handler and a task is
|
/* CASE 1: We are not in an interrupt handler and a task is
|
||||||
* signalling itself for some reason.
|
* signaling itself for some reason.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (cpu == me && !CURRENT_REGS)
|
if (cpu == me && !CURRENT_REGS)
|
||||||
@ -270,7 +270,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
|||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* If we signalling a task running on the other CPU, we have
|
/* If we signaling a task running on the other CPU, we have
|
||||||
* to PAUSE the other CPU.
|
* to PAUSE the other CPU.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -282,7 +282,9 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
|||||||
|
|
||||||
/* Wait while the pause request is pending */
|
/* Wait while the pause request is pending */
|
||||||
|
|
||||||
while (up_cpu_pausereq(cpu));
|
while (up_cpu_pausereq(cpu))
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
/* Now tcb on the other CPU can be accessed safely */
|
/* Now tcb on the other CPU can be accessed safely */
|
||||||
|
|
||||||
@ -392,7 +394,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
|||||||
|
|
||||||
/* Otherwise, we are (1) signaling a task is not running from an
|
/* Otherwise, we are (1) signaling a task is not running from an
|
||||||
* interrupt handler or (2) we are not in an interrupt handler and the
|
* interrupt handler or (2) we are not in an interrupt handler and the
|
||||||
* running task is signalling some other non-running task.
|
* running task is signaling some other non-running task.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
else
|
else
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
* This kernel-mode stub will then be called transfer control to the user
|
* This kernel-mode stub will then be called transfer control to the user
|
||||||
* mode signal handler by calling this function.
|
* mode signal handler by calling this function.
|
||||||
*
|
*
|
||||||
* Normally the a user-mode signalling handling stub will also execute
|
* Normally the a user-mode signaling handling stub will also execute
|
||||||
* before the ultimate signal handler is called. See
|
* before the ultimate signal handler is called. See
|
||||||
* arch/arm/src/armv[6\7]/up_signal_handler. This function is the
|
* arch/arm/src/armv[6\7]/up_signal_handler. This function is the
|
||||||
* user-space, signal handler trampoline function. It is called from
|
* user-space, signal handler trampoline function. It is called from
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* sched/signal/sig_dispatch.c
|
* sched/signal/sig_dispatch.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007, 2009, 2011, 2016 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2007, 2009, 2011, 2016, 2018 Gregory Nutt. All rights
|
||||||
|
* reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -201,11 +202,11 @@ static FAR sigpendq_t *
|
|||||||
|
|
||||||
DEBUGASSERT(group != NULL);
|
DEBUGASSERT(group != NULL);
|
||||||
|
|
||||||
/* Pending sigals can be added from interrupt level. */
|
/* Pending signals can be added from interrupt level. */
|
||||||
|
|
||||||
flags = enter_critical_section();
|
flags = enter_critical_section();
|
||||||
|
|
||||||
/* Seach the list for a sigpendion on this signal */
|
/* Search the list for a action pending on this signal */
|
||||||
|
|
||||||
for (sigpend = (FAR sigpendq_t *)group->tg_sigpendingq.head;
|
for (sigpend = (FAR sigpendq_t *)group->tg_sigpendingq.head;
|
||||||
(sigpend && sigpend->info.si_signo != signo);
|
(sigpend && sigpend->info.si_signo != signo);
|
||||||
|
Loading…
Reference in New Issue
Block a user