mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:58:59 +08:00
Apply same fix for ARMv7-M to other architectures
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/arm/src/arm/up_schedulesigaction.c
|
* arch/arm/src/arm/up_schedulesigaction.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007-2010 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2007-2010, 2015 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
|
||||||
@@ -103,18 +103,18 @@
|
|||||||
|
|
||||||
void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||||
{
|
{
|
||||||
/* Refuse to handle nested signal actions */
|
irqstate_t flags;
|
||||||
|
|
||||||
sdbg("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver);
|
sdbg("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver);
|
||||||
|
|
||||||
if (!tcb->xcp.sigdeliver)
|
|
||||||
{
|
|
||||||
irqstate_t flags;
|
|
||||||
|
|
||||||
/* Make sure that interrupts are disabled */
|
/* Make sure that interrupts are disabled */
|
||||||
|
|
||||||
flags = irqsave();
|
flags = irqsave();
|
||||||
|
|
||||||
|
/* Refuse to handle nested signal actions */
|
||||||
|
|
||||||
|
if (!tcb->xcp.sigdeliver)
|
||||||
|
{
|
||||||
/* First, handle some special cases when the signal is
|
/* First, handle some special cases when the signal is
|
||||||
* being delivered to the currently executing task.
|
* being delivered to the currently executing task.
|
||||||
*/
|
*/
|
||||||
@@ -196,9 +196,9 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
|||||||
tcb->xcp.regs[REG_PC] = (uint32_t)up_sigdeliver;
|
tcb->xcp.regs[REG_PC] = (uint32_t)up_sigdeliver;
|
||||||
tcb->xcp.regs[REG_CPSR] = SVC_MODE | PSR_I_BIT | PSR_F_BIT;
|
tcb->xcp.regs[REG_CPSR] = SVC_MODE | PSR_I_BIT | PSR_F_BIT;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
irqrestore(flags);
|
irqrestore(flags);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* !CONFIG_DISABLE_SIGNALS */
|
#endif /* !CONFIG_DISABLE_SIGNALS */
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/arm/src/armv6-m/up_schedulesigaction.c
|
* arch/arm/src/armv6-m/up_schedulesigaction.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2013-2014 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2013-2015 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
|
||||||
@@ -104,18 +104,18 @@
|
|||||||
|
|
||||||
void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||||
{
|
{
|
||||||
/* Refuse to handle nested signal actions */
|
irqstate_t flags;
|
||||||
|
|
||||||
sdbg("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver);
|
sdbg("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver);
|
||||||
|
|
||||||
if (!tcb->xcp.sigdeliver)
|
|
||||||
{
|
|
||||||
irqstate_t flags;
|
|
||||||
|
|
||||||
/* Make sure that interrupts are disabled */
|
/* Make sure that interrupts are disabled */
|
||||||
|
|
||||||
flags = irqsave();
|
flags = irqsave();
|
||||||
|
|
||||||
|
/* Refuse to handle nested signal actions */
|
||||||
|
|
||||||
|
if (!tcb->xcp.sigdeliver)
|
||||||
|
{
|
||||||
/* First, handle some special cases when the signal is being delivered
|
/* First, handle some special cases when the signal is being delivered
|
||||||
* to the currently executing task.
|
* to the currently executing task.
|
||||||
*/
|
*/
|
||||||
@@ -206,9 +206,9 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
|||||||
tcb->xcp.regs[REG_LR] = EXC_RETURN_PRIVTHR;
|
tcb->xcp.regs[REG_LR] = EXC_RETURN_PRIVTHR;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
irqrestore(flags);
|
irqrestore(flags);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* !CONFIG_DISABLE_SIGNALS */
|
#endif /* !CONFIG_DISABLE_SIGNALS */
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/arm/src/armv7-a/arm_schedulesigaction.c
|
* arch/arm/src/armv7-a/arm_schedulesigaction.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2013 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2013, 2015 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
|
||||||
@@ -103,18 +103,18 @@
|
|||||||
|
|
||||||
void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||||
{
|
{
|
||||||
/* Refuse to handle nested signal actions */
|
irqstate_t flags;
|
||||||
|
|
||||||
sdbg("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver);
|
sdbg("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver);
|
||||||
|
|
||||||
if (!tcb->xcp.sigdeliver)
|
|
||||||
{
|
|
||||||
irqstate_t flags;
|
|
||||||
|
|
||||||
/* Make sure that interrupts are disabled */
|
/* Make sure that interrupts are disabled */
|
||||||
|
|
||||||
flags = irqsave();
|
flags = irqsave();
|
||||||
|
|
||||||
|
/* Refuse to handle nested signal actions */
|
||||||
|
|
||||||
|
if (!tcb->xcp.sigdeliver)
|
||||||
|
{
|
||||||
/* First, handle some special cases when the signal is being delivered
|
/* First, handle some special cases when the signal is being delivered
|
||||||
* to the currently executing task.
|
* to the currently executing task.
|
||||||
*/
|
*/
|
||||||
@@ -195,9 +195,9 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
|||||||
tcb->xcp.regs[REG_PC] = (uint32_t)up_sigdeliver;
|
tcb->xcp.regs[REG_PC] = (uint32_t)up_sigdeliver;
|
||||||
tcb->xcp.regs[REG_CPSR] = (PSR_MODE_SVC | PSR_I_BIT | PSR_F_BIT);
|
tcb->xcp.regs[REG_CPSR] = (PSR_MODE_SVC | PSR_I_BIT | PSR_F_BIT);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
irqrestore(flags);
|
irqrestore(flags);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* !CONFIG_DISABLE_SIGNALS */
|
#endif /* !CONFIG_DISABLE_SIGNALS */
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/avr/src/avr/up_schedulesigaction.c
|
* arch/avr/src/avr/up_schedulesigaction.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2011, 2015 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
|
||||||
@@ -103,18 +103,18 @@
|
|||||||
|
|
||||||
void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||||
{
|
{
|
||||||
/* Refuse to handle nested signal actions */
|
irqstate_t flags;
|
||||||
|
|
||||||
sdbg("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver);
|
sdbg("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver);
|
||||||
|
|
||||||
if (!tcb->xcp.sigdeliver)
|
|
||||||
{
|
|
||||||
irqstate_t flags;
|
|
||||||
|
|
||||||
/* Make sure that interrupts are disabled */
|
/* Make sure that interrupts are disabled */
|
||||||
|
|
||||||
flags = irqsave();
|
flags = irqsave();
|
||||||
|
|
||||||
|
/* Refuse to handle nested signal actions */
|
||||||
|
|
||||||
|
if (!tcb->xcp.sigdeliver)
|
||||||
|
{
|
||||||
/* First, handle some special cases when the signal is
|
/* First, handle some special cases when the signal is
|
||||||
* being delivered to the currently executing task.
|
* being delivered to the currently executing task.
|
||||||
*/
|
*/
|
||||||
@@ -200,9 +200,9 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
|||||||
tcb->xcp.regs[REG_PCH] = (uint16_t)up_sigdeliver >> 8;
|
tcb->xcp.regs[REG_PCH] = (uint16_t)up_sigdeliver >> 8;
|
||||||
tcb->xcp.regs[REG_SREG] &= ~(1 << SREG_I);
|
tcb->xcp.regs[REG_SREG] &= ~(1 << SREG_I);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
irqrestore(flags);
|
irqrestore(flags);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* !CONFIG_DISABLE_SIGNALS */
|
#endif /* !CONFIG_DISABLE_SIGNALS */
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/avr/src/avr32/up_schedulesigaction.c
|
* arch/avr/src/avr32/up_schedulesigaction.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2010, 2015 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
|
||||||
@@ -103,18 +103,18 @@
|
|||||||
|
|
||||||
void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||||
{
|
{
|
||||||
/* Refuse to handle nested signal actions */
|
irqstate_t flags;
|
||||||
|
|
||||||
sdbg("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver);
|
sdbg("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver);
|
||||||
|
|
||||||
if (!tcb->xcp.sigdeliver)
|
|
||||||
{
|
|
||||||
irqstate_t flags;
|
|
||||||
|
|
||||||
/* Make sure that interrupts are disabled */
|
/* Make sure that interrupts are disabled */
|
||||||
|
|
||||||
flags = irqsave();
|
flags = irqsave();
|
||||||
|
|
||||||
|
/* Refuse to handle nested signal actions */
|
||||||
|
|
||||||
|
if (!tcb->xcp.sigdeliver)
|
||||||
|
{
|
||||||
/* First, handle some special cases when the signal is
|
/* First, handle some special cases when the signal is
|
||||||
* being delivered to the currently executing task.
|
* being delivered to the currently executing task.
|
||||||
*/
|
*/
|
||||||
@@ -196,9 +196,9 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
|||||||
tcb->xcp.regs[REG_PC] = (uint32_t)up_sigdeliver;
|
tcb->xcp.regs[REG_PC] = (uint32_t)up_sigdeliver;
|
||||||
tcb->xcp.regs[REG_SR] |= AVR32_SR_GM_MASK;
|
tcb->xcp.regs[REG_SR] |= AVR32_SR_GM_MASK;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
irqrestore(flags);
|
irqrestore(flags);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* !CONFIG_DISABLE_SIGNALS */
|
#endif /* !CONFIG_DISABLE_SIGNALS */
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/mips/src/mips32/up_schedulesigaction.c
|
* arch/mips/src/mips32/up_schedulesigaction.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2011, 2015 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
|
||||||
@@ -103,20 +103,19 @@
|
|||||||
|
|
||||||
void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||||
{
|
{
|
||||||
|
irqstate_t flags;
|
||||||
uint32_t status;
|
uint32_t status;
|
||||||
|
|
||||||
/* Refuse to handle nested signal actions */
|
|
||||||
|
|
||||||
sdbg("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver);
|
sdbg("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver);
|
||||||
|
|
||||||
if (!tcb->xcp.sigdeliver)
|
|
||||||
{
|
|
||||||
irqstate_t flags;
|
|
||||||
|
|
||||||
/* Make sure that interrupts are disabled */
|
/* Make sure that interrupts are disabled */
|
||||||
|
|
||||||
flags = irqsave();
|
flags = irqsave();
|
||||||
|
|
||||||
|
/* Refuse to handle nested signal actions */
|
||||||
|
|
||||||
|
if (!tcb->xcp.sigdeliver)
|
||||||
|
{
|
||||||
/* First, handle some special cases when the signal is
|
/* First, handle some special cases when the signal is
|
||||||
* being delivered to the currently executing task.
|
* being delivered to the currently executing task.
|
||||||
*/
|
*/
|
||||||
@@ -212,9 +211,9 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
|||||||
tcb->xcp.saved_epc, tcb->xcp.saved_status,
|
tcb->xcp.saved_epc, tcb->xcp.saved_status,
|
||||||
tcb->xcp.regs[REG_EPC], tcb->xcp.regs[REG_STATUS]);
|
tcb->xcp.regs[REG_EPC], tcb->xcp.regs[REG_STATUS]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
irqrestore(flags);
|
irqrestore(flags);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* !CONFIG_DISABLE_SIGNALS */
|
#endif /* !CONFIG_DISABLE_SIGNALS */
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/sh/src/m16c/m16c_schedulesigaction.c
|
* arch/sh/src/m16c/m16c_schedulesigaction.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2009-2010, 2015 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
|
||||||
@@ -102,18 +102,18 @@
|
|||||||
|
|
||||||
void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||||
{
|
{
|
||||||
/* Refuse to handle nested signal actions */
|
irqstate_t flags;
|
||||||
|
|
||||||
sdbg("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver);
|
sdbg("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver);
|
||||||
|
|
||||||
if (!tcb->xcp.sigdeliver)
|
|
||||||
{
|
|
||||||
irqstate_t flags;
|
|
||||||
|
|
||||||
/* Make sure that interrupts are disabled */
|
/* Make sure that interrupts are disabled */
|
||||||
|
|
||||||
flags = irqsave();
|
flags = irqsave();
|
||||||
|
|
||||||
|
/* Refuse to handle nested signal actions */
|
||||||
|
|
||||||
|
if (!tcb->xcp.sigdeliver)
|
||||||
|
{
|
||||||
/* First, handle some special cases when the signal is
|
/* First, handle some special cases when the signal is
|
||||||
* being delivered to the currently executing task.
|
* being delivered to the currently executing task.
|
||||||
*/
|
*/
|
||||||
@@ -193,9 +193,9 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
|||||||
tcb->xcp.regs[REG_PC+1] = (uint32_t)up_sigdeliver;
|
tcb->xcp.regs[REG_PC+1] = (uint32_t)up_sigdeliver;
|
||||||
tcb->xcp.regs[REG_FLG] &= ~M16C_FLG_I;
|
tcb->xcp.regs[REG_FLG] &= ~M16C_FLG_I;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
irqrestore(flags);
|
irqrestore(flags);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* !CONFIG_DISABLE_SIGNALS */
|
#endif /* !CONFIG_DISABLE_SIGNALS */
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/sh/src/sh1/sh1_schedulesigaction.c
|
* arch/sh/src/sh1/sh1_schedulesigaction.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2010 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2008-2010, 2015 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
|
||||||
@@ -102,18 +102,18 @@
|
|||||||
|
|
||||||
void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||||
{
|
{
|
||||||
/* Refuse to handle nested signal actions */
|
irqstate_t flags;
|
||||||
|
|
||||||
sdbg("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver);
|
sdbg("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver);
|
||||||
|
|
||||||
if (!tcb->xcp.sigdeliver)
|
|
||||||
{
|
|
||||||
irqstate_t flags;
|
|
||||||
|
|
||||||
/* Make sure that interrupts are disabled */
|
/* Make sure that interrupts are disabled */
|
||||||
|
|
||||||
flags = irqsave();
|
flags = irqsave();
|
||||||
|
|
||||||
|
/* Refuse to handle nested signal actions */
|
||||||
|
|
||||||
|
if (!tcb->xcp.sigdeliver)
|
||||||
|
{
|
||||||
/* First, handle some special cases when the signal is
|
/* First, handle some special cases when the signal is
|
||||||
* being delivered to the currently executing task.
|
* being delivered to the currently executing task.
|
||||||
*/
|
*/
|
||||||
@@ -189,9 +189,9 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
|||||||
tcb->xcp.regs[REG_PC] = (uint32_t)up_sigdeliver;
|
tcb->xcp.regs[REG_PC] = (uint32_t)up_sigdeliver;
|
||||||
tcb->xcp.regs[REG_SR] |= 0x000000f0 ;
|
tcb->xcp.regs[REG_SR] |= 0x000000f0 ;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
irqrestore(flags);
|
irqrestore(flags);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* !CONFIG_DISABLE_SIGNALS */
|
#endif /* !CONFIG_DISABLE_SIGNALS */
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/x86/src/i486/up_schedulesigaction.c
|
* arch/x86/src/i486/up_schedulesigaction.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2011, 2015 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
|
||||||
@@ -98,18 +98,18 @@
|
|||||||
|
|
||||||
void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||||
{
|
{
|
||||||
/* Refuse to handle nested signal actions */
|
irqstate_t flags;
|
||||||
|
|
||||||
sdbg("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver);
|
sdbg("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver);
|
||||||
|
|
||||||
if (!tcb->xcp.sigdeliver)
|
|
||||||
{
|
|
||||||
irqstate_t flags;
|
|
||||||
|
|
||||||
/* Make sure that interrupts are disabled */
|
/* Make sure that interrupts are disabled */
|
||||||
|
|
||||||
flags = irqsave();
|
flags = irqsave();
|
||||||
|
|
||||||
|
/* Refuse to handle nested signal actions */
|
||||||
|
|
||||||
|
if (!tcb->xcp.sigdeliver)
|
||||||
|
{
|
||||||
/* First, handle some special cases when the signal is being delivered
|
/* First, handle some special cases when the signal is being delivered
|
||||||
* to the currently executing task.
|
* to the currently executing task.
|
||||||
*/
|
*/
|
||||||
@@ -190,9 +190,9 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
|||||||
tcb->xcp.regs[REG_EIP] = (uint32_t)up_sigdeliver;
|
tcb->xcp.regs[REG_EIP] = (uint32_t)up_sigdeliver;
|
||||||
tcb->xcp.regs[REG_EFLAGS] = 0;
|
tcb->xcp.regs[REG_EFLAGS] = 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
irqrestore(flags);
|
irqrestore(flags);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* !CONFIG_DISABLE_SIGNALS */
|
#endif /* !CONFIG_DISABLE_SIGNALS */
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* common/up_schedulesigaction.c
|
* common/up_schedulesigaction.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2010 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2008-2010, 2015 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
|
||||||
@@ -102,18 +102,18 @@
|
|||||||
|
|
||||||
void up_schedule_sigaction(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
void up_schedule_sigaction(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||||
{
|
{
|
||||||
/* Refuse to handle nested signal actions */
|
irqstate_t flags;
|
||||||
|
|
||||||
dbg("tcb=0x%p sigdeliver=0x%06x\n", tcb, (uint32_t)sigdeliver);
|
dbg("tcb=0x%p sigdeliver=0x%06x\n", tcb, (uint32_t)sigdeliver);
|
||||||
|
|
||||||
if (!tcb->xcp.sigdeliver)
|
|
||||||
{
|
|
||||||
irqstate_t flags;
|
|
||||||
|
|
||||||
/* Make sure that interrupts are disabled */
|
/* Make sure that interrupts are disabled */
|
||||||
|
|
||||||
flags = irqsave();
|
flags = irqsave();
|
||||||
|
|
||||||
|
/* Refuse to handle nested signal actions */
|
||||||
|
|
||||||
|
if (!tcb->xcp.sigdeliver)
|
||||||
|
{
|
||||||
/* First, handle some special cases when the signal is
|
/* First, handle some special cases when the signal is
|
||||||
* being delivered to the currently executing task.
|
* being delivered to the currently executing task.
|
||||||
*/
|
*/
|
||||||
@@ -192,9 +192,9 @@ void up_schedule_sigaction(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
|||||||
*saved_pc = (uint32_t)up_sigdeliver;
|
*saved_pc = (uint32_t)up_sigdeliver;
|
||||||
tcb->xcp.regs[REG_FLAGS] = 0;
|
tcb->xcp.regs[REG_FLAGS] = 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
irqrestore(flags);
|
irqrestore(flags);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_DISABLE_SIGNALS */
|
#endif /* CONFIG_DISABLE_SIGNALS */
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/z80/src/ez80/ez80_schedulesigaction.c
|
* arch/z80/src/ez80/ez80_schedulesigaction.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2010 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2008-2010, 2015 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
|
||||||
@@ -123,18 +123,18 @@ static void ez80_sigsetup(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver, FAR c
|
|||||||
|
|
||||||
void up_schedule_sigaction(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
void up_schedule_sigaction(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||||
{
|
{
|
||||||
sdbg("tcb=0x%p sigdeliver=0x%04x\n", tcb, (uint16_t)sigdeliver);
|
|
||||||
|
|
||||||
/* Refuse to handle nested signal actions */
|
|
||||||
|
|
||||||
if (tcb->xcp.sigdeliver == NULL)
|
|
||||||
{
|
|
||||||
irqstate_t flags;
|
irqstate_t flags;
|
||||||
|
|
||||||
|
sdbg("tcb=0x%p sigdeliver=0x%04x\n", tcb, (uint16_t)sigdeliver);
|
||||||
|
|
||||||
/* Make sure that interrupts are disabled */
|
/* Make sure that interrupts are disabled */
|
||||||
|
|
||||||
flags = irqsave();
|
flags = irqsave();
|
||||||
|
|
||||||
|
/* Refuse to handle nested signal actions */
|
||||||
|
|
||||||
|
if (tcb->xcp.sigdeliver == NULL)
|
||||||
|
{
|
||||||
/* First, handle some special cases when the signal is being delivered
|
/* First, handle some special cases when the signal is being delivered
|
||||||
* to the currently executing task.
|
* to the currently executing task.
|
||||||
*/
|
*/
|
||||||
@@ -183,9 +183,9 @@ void up_schedule_sigaction(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
|||||||
|
|
||||||
ez80_sigsetup(tcb, sigdeliver, tcb->xcp.regs);
|
ez80_sigsetup(tcb, sigdeliver, tcb->xcp.regs);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
irqrestore(flags);
|
irqrestore(flags);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_DISABLE_SIGNALS */
|
#endif /* CONFIG_DISABLE_SIGNALS */
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/z80/src/z180/z180_schedulesigaction.c
|
* arch/z80/src/z180/z180_schedulesigaction.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2012, 2015 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
|
||||||
@@ -123,18 +123,18 @@ static void z180_sigsetup(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver, FAR c
|
|||||||
|
|
||||||
void up_schedule_sigaction(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
void up_schedule_sigaction(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||||
{
|
{
|
||||||
dbg("tcb=0x%p sigdeliver=0x%04x\n", tcb, (uint16_t)sigdeliver);
|
|
||||||
|
|
||||||
/* Refuse to handle nested signal actions */
|
|
||||||
|
|
||||||
if (tcb->xcp.sigdeliver == NULL)
|
|
||||||
{
|
|
||||||
irqstate_t flags;
|
irqstate_t flags;
|
||||||
|
|
||||||
|
dbg("tcb=0x%p sigdeliver=0x%04x\n", tcb, (uint16_t)sigdeliver);
|
||||||
|
|
||||||
/* Make sure that interrupts are disabled */
|
/* Make sure that interrupts are disabled */
|
||||||
|
|
||||||
flags = irqsave();
|
flags = irqsave();
|
||||||
|
|
||||||
|
/* Refuse to handle nested signal actions */
|
||||||
|
|
||||||
|
if (tcb->xcp.sigdeliver == NULL)
|
||||||
|
{
|
||||||
/* First, handle some special cases when the signal is being delivered
|
/* First, handle some special cases when the signal is being delivered
|
||||||
* to the currently executing task.
|
* to the currently executing task.
|
||||||
*/
|
*/
|
||||||
@@ -183,9 +183,9 @@ void up_schedule_sigaction(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
|||||||
|
|
||||||
z180_sigsetup(tcb, sigdeliver, tcb->xcp.regs);
|
z180_sigsetup(tcb, sigdeliver, tcb->xcp.regs);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
irqrestore(flags);
|
irqrestore(flags);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_DISABLE_SIGNALS */
|
#endif /* CONFIG_DISABLE_SIGNALS */
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/z80/src/z8/z8_schedulesigaction.c
|
* arch/z80/src/z8/z8_schedulesigaction.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2010 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2008-2010, 2015 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
|
||||||
@@ -123,18 +123,18 @@ static void z8_sigsetup(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver, FAR chi
|
|||||||
|
|
||||||
void up_schedule_sigaction(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
void up_schedule_sigaction(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||||
{
|
{
|
||||||
dbg("tcb=0x%p sigdeliver=0x%04x\n", tcb, (uint16_t)sigdeliver);
|
|
||||||
|
|
||||||
/* Refuse to handle nested signal actions */
|
|
||||||
|
|
||||||
if (tcb->xcp.sigdeliver == NULL)
|
|
||||||
{
|
|
||||||
irqstate_t flags;
|
irqstate_t flags;
|
||||||
|
|
||||||
|
dbg("tcb=0x%p sigdeliver=0x%04x\n", tcb, (uint16_t)sigdeliver);
|
||||||
|
|
||||||
/* Make sure that interrupts are disabled */
|
/* Make sure that interrupts are disabled */
|
||||||
|
|
||||||
flags = irqsave();
|
flags = irqsave();
|
||||||
|
|
||||||
|
/* Refuse to handle nested signal actions */
|
||||||
|
|
||||||
|
if (tcb->xcp.sigdeliver == NULL)
|
||||||
|
{
|
||||||
/* First, handle some special cases when the signal is being delivered
|
/* First, handle some special cases when the signal is being delivered
|
||||||
* to the currently executing task.
|
* to the currently executing task.
|
||||||
*/
|
*/
|
||||||
@@ -183,9 +183,9 @@ void up_schedule_sigaction(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
|||||||
|
|
||||||
z8_sigsetup(tcb, sigdeliver, tcb->xcp.regs);
|
z8_sigsetup(tcb, sigdeliver, tcb->xcp.regs);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
irqrestore(flags);
|
irqrestore(flags);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_DISABLE_SIGNALS */
|
#endif /* CONFIG_DISABLE_SIGNALS */
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/z80/src/z80/z80_schedulesigaction.c
|
* arch/z80/src/z80/z80_schedulesigaction.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007-2010 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2007-2010, 2015 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
|
||||||
@@ -123,18 +123,18 @@ static void z80_sigsetup(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver, FAR ch
|
|||||||
|
|
||||||
void up_schedule_sigaction(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
void up_schedule_sigaction(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||||
{
|
{
|
||||||
dbg("tcb=0x%p sigdeliver=0x%04x\n", tcb, (uint16_t)sigdeliver);
|
|
||||||
|
|
||||||
/* Refuse to handle nested signal actions */
|
|
||||||
|
|
||||||
if (tcb->xcp.sigdeliver == NULL)
|
|
||||||
{
|
|
||||||
irqstate_t flags;
|
irqstate_t flags;
|
||||||
|
|
||||||
|
dbg("tcb=0x%p sigdeliver=0x%04x\n", tcb, (uint16_t)sigdeliver);
|
||||||
|
|
||||||
/* Make sure that interrupts are disabled */
|
/* Make sure that interrupts are disabled */
|
||||||
|
|
||||||
flags = irqsave();
|
flags = irqsave();
|
||||||
|
|
||||||
|
/* Refuse to handle nested signal actions */
|
||||||
|
|
||||||
|
if (tcb->xcp.sigdeliver == NULL)
|
||||||
|
{
|
||||||
/* First, handle some special cases when the signal is being delivered
|
/* First, handle some special cases when the signal is being delivered
|
||||||
* to the currently executing task.
|
* to the currently executing task.
|
||||||
*/
|
*/
|
||||||
@@ -183,10 +183,9 @@ void up_schedule_sigaction(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
|||||||
|
|
||||||
z80_sigsetup(tcb, sigdeliver, tcb->xcp.regs);
|
z80_sigsetup(tcb, sigdeliver, tcb->xcp.regs);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
irqrestore(flags);
|
irqrestore(flags);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_DISABLE_SIGNALS */
|
#endif /* CONFIG_DISABLE_SIGNALS */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user