Fix a signal trampoline bug
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3053 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
fc6c03b0d6
commit
30f2743926
16
ChangeLog
16
ChangeLog
@ -1288,7 +1288,7 @@
|
|||||||
test is ran repeatedly in a loop.
|
test is ran repeatedly in a loop.
|
||||||
* configs/ez80f910200zco - Updated to used ZDS-II 4.11.1
|
* configs/ez80f910200zco - Updated to used ZDS-II 4.11.1
|
||||||
|
|
||||||
5.12 2010-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
|
5.12 2010-10-26 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||||
|
|
||||||
* arch/avr - Add a place to support AVR family processors.
|
* arch/avr - Add a place to support AVR family processors.
|
||||||
* arch/avr/include/avr32 and arch/avr/src/avr32 - Add support for AVR32
|
* arch/avr/include/avr32 and arch/avr/src/avr32 - Add support for AVR32
|
||||||
@ -1301,4 +1301,18 @@
|
|||||||
lib_labs.c, lib_llabs.c, lib_imaxabs.c - Add abs(), labs(), llabs(), and
|
lib_labs.c, lib_llabs.c, lib_imaxabs.c - Add abs(), labs(), llabs(), and
|
||||||
imaxabs().
|
imaxabs().
|
||||||
* Add include/inttypes.h
|
* Add include/inttypes.h
|
||||||
|
* arch/hc/src/mc9s12ne64 - This hcs12 port grew a few more files. But it
|
||||||
|
is still a long way from complete.
|
||||||
|
* arch/*/src/*/*_sigdeliver.c - Fixed a serious error in the signal
|
||||||
|
trampoline logic. Essentially, interrupts are re-enabled while the
|
||||||
|
signal handler executes, but the logic to re-disable the interrupts
|
||||||
|
before returning from the signal handler trampoline was missing. Under
|
||||||
|
certain circumstances, this can cause stack corruption. This was
|
||||||
|
discovered by David Hewson on an ARM9 platform, but since the code
|
||||||
|
has been leveraged, the bug has been propogated from ARM to Cortex-M3,
|
||||||
|
AVR32, M16C, SH1, ZNEO, eZ80, Z8, and Z80 -- almost every architecture.
|
||||||
|
The correction has been incorporated for all architectures but only
|
||||||
|
verified on a few.
|
||||||
|
|
||||||
|
5.13 2010-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
<tr align="center" bgcolor="#e4e4e4">
|
<tr align="center" bgcolor="#e4e4e4">
|
||||||
<td>
|
<td>
|
||||||
<h1><big><font color="#3c34ec"><i>NuttX RTOS</i></font></big></h1>
|
<h1><big><font color="#3c34ec"><i>NuttX RTOS</i></font></big></h1>
|
||||||
<p>Last Updated: October 18, 2010</p>
|
<p>Last Updated: October 26, 2010</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@ -772,10 +772,10 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<p><b>nuttx-5.11 Release Notes</b>:
|
<p><b>nuttx-5.12 Release Notes</b>:
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
This 58<sup>th</sup> release of NuttX, Version 5.11, was made on October 1, 2010 and is available for download from the
|
This 59<sup>th</sup> release of NuttX, Version 5.12, was made on October 26, 2010 and is available for download from the
|
||||||
<a href="http://sourceforge.net/project/showfiles.php?group_id=189573">SourceForge</a> website.
|
<a href="http://sourceforge.net/project/showfiles.php?group_id=189573">SourceForge</a> website.
|
||||||
The change log associated with the release is available <a href="#currentrelease">here</a>.
|
The change log associated with the release is available <a href="#currentrelease">here</a>.
|
||||||
Unreleased changes after this release are available in CVS.
|
Unreleased changes after this release are available in CVS.
|
||||||
@ -785,26 +785,29 @@
|
|||||||
This is primarily a bugfix release and includes some important corrections to the code:
|
This is primarily a bugfix release and includes some important corrections to the code:
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
One very important bug fixes a race condition that can occur using
|
Fixed an important error in the signal trampoline logic. Essentially,
|
||||||
semaphores that can be awakened by signals. Under this particular
|
interrupts are re-enabled while the signal handler executes, but the
|
||||||
race condition, a task could hang waiting for a semaphore.
|
logic to re-disable the interrupts before returning from the signal
|
||||||
</li>
|
handler trampoline was missing. Under certain circumstances, this
|
||||||
<li>
|
can cause stack corruption. This was discovered by David Hewson on
|
||||||
Corrections to lm3s8962 port contributed by Larry Arnold. That
|
an ARM9 platform, but since the code has been leveraged, the bug has
|
||||||
port is purported to work correctly with these changes in place.
|
been propogated from ARM to Cortex-M3, AVR32, M16C, SH1, ZNEO, eZ80,
|
||||||
|
Z8, and Z80 -- almost every architecture. The correction has been
|
||||||
|
incorporated for all architectures but only verified on a few.
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
Plus less critical bugfixes as detailed in the ChangeLog. New features
|
Other notable changes in NuttX-5.12 include:
|
||||||
include:
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
* A new configuration to support the mbed.org LPC1768 board (Contributed
|
A complete port for the AVR32 (AT91UC3B0256) is incorporated in the
|
||||||
by Dave Marples), and
|
source tree. Testing of this port is underway now. This release
|
||||||
|
was made before verifying this port in order to get the important
|
||||||
|
bugfix in place.
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
* A driver for the Atmel AT45DB161D 4Mbit SPI FLASH part.
|
Other miscellaneous bugfix and enhancements as noted in the ChangeLog.
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</p>
|
</p>
|
||||||
@ -1342,7 +1345,8 @@
|
|||||||
This port is currently under development.
|
This port is currently under development.
|
||||||
All code is complete for the basic NuttX port including header files for all AT91UC3* peripherals.
|
All code is complete for the basic NuttX port including header files for all AT91UC3* peripherals.
|
||||||
Testing of this port is underway now.
|
Testing of this port is underway now.
|
||||||
It is hoped that the first, released AVR32 port will appear in version 5.12 of NuttX, probably near the beginning of September, 2010.
|
The untest AVR32 is present in the 5.12 release of NuttX.
|
||||||
|
It is hoped that the first, verified AVR32 port will be released in version 5.13 of NuttX.
|
||||||
</p>
|
</p>
|
||||||
</ul>
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
@ -1880,28 +1884,31 @@ Other memory:
|
|||||||
</table>
|
</table>
|
||||||
|
|
||||||
<ul><pre>
|
<ul><pre>
|
||||||
nuttx-5.11 2010-10-01 Gregory Nutt <spudmonkey@racsa.co.cr>
|
nuttx-5.12 2010-10-26 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||||
|
|
||||||
* configs/ea3131/src/up_fillpage.c - Added new configuration item
|
* arch/avr - Add a place to support AVR family processors.
|
||||||
CONFIG_PAGING_BINPATH. If CONFIG_PAGING_BINPATH is defined, then it
|
* arch/avr/include/avr32 and arch/avr/src/avr32 - Add support for AVR32
|
||||||
is the full path to a file on a mounted file system that contains
|
(all of the AVR32 is a work in progress).
|
||||||
a binary image of the NuttX executable. Pages will be filled by
|
* arch/avr/include/at91uc3 and arch/avr/src/at91uc3 - Add support
|
||||||
reading from offsets into this file that correspond to virtual
|
for the AT91 UC3A/B family of AVR32 MCUs.
|
||||||
fault addresses. up_fillpage.c implements logic to perform page
|
* confgs/avr32dev1 - Add support for the Atmel AVR32DEV1 board featuring
|
||||||
files using the CONFIG_PAGING_BINPATH file.
|
the AT91UC3B0256 MCU. This board is produced by www.mcuzone.com.
|
||||||
* configs/mbed - Add configuration to support the mbed.org LPC1768
|
* include/stdlib.h, lib/Makefile, lib/lib_abs.c, lib/lib_labs.c,
|
||||||
board (Contributed by Dave Marples).
|
lib_labs.c, lib_llabs.c, lib_imaxabs.c - Add abs(), labs(), llabs(), and
|
||||||
* sched/sem_wait.c and sem_waitirq.c - Eliminate a race condition
|
imaxabs().
|
||||||
that can occur when a semaphore wait is interrupt by a signal.
|
* Add include/inttypes.h
|
||||||
(see email thread: http://tech.groups.yahoo.com/group/nuttx/message/530)
|
* arch/hc/src/mc9s12ne64 - This hcs12 port grew a few more files. But it
|
||||||
* drivers/mtd/at45db.c - Add a driver for the Atmel AT45DB161D 4Mbit
|
is still a long way from complete.
|
||||||
SPI FLASH part (untested on initial check-in).
|
* arch/*/src/*/*_sigdeliver.c - Fixed a serious error in the signal
|
||||||
* arch/arm/src/lm3s and arch/arm/include/lm3s - Corrections for the
|
trampoline logic. Essentially, interrupts are re-enabled while the
|
||||||
lm3s8962 port contributed by Larry Arnold. That port is purported
|
signal handler executes, but the logic to re-disable the interrupts
|
||||||
to work correctly with these changes in place.
|
before returning from the signal handler trampoline was missing. Under
|
||||||
* examples/ostest/prioinherit.c - Need to reinitialize globals if
|
certain circumstances, this can cause stack corruption. This was
|
||||||
test is ran repeatedly in a loop.
|
discovered by David Hewson on an ARM9 platform, but since the code
|
||||||
* configs/ez80f910200zco - Updated to used ZDS-II 4.11.1
|
has been leveraged, the bug has been propogated from ARM to Cortex-M3,
|
||||||
|
AVR32, M16C, SH1, ZNEO, eZ80, Z8, and Z80 -- almost every architecture.
|
||||||
|
The correction has been incorporated for all architectures but only
|
||||||
|
verified on a few.
|
||||||
|
|
||||||
pascal-2.0 2009-12-21 Gregory Nutt <spudmonkey@racsa.co.cr>
|
pascal-2.0 2009-12-21 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||||
|
|
||||||
@ -1931,18 +1938,7 @@ buildroot-1.8 2009-12-21 <spudmonkey@racsa.co.cr>
|
|||||||
</table>
|
</table>
|
||||||
|
|
||||||
<ul><pre>
|
<ul><pre>
|
||||||
nuttx-5.12 2010-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
|
nuttx-5.13 2010-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||||
|
|
||||||
* arch/avr - Add a place to support AVR family processors.
|
|
||||||
* arch/avr/include/avr32 and arch/avr/src/avr32 - Add support for AVR32
|
|
||||||
(all of the AVR32 is a work in progress).
|
|
||||||
* arch/avr/include/at91uc3 and arch/avr/src/at91uc3 - Add support
|
|
||||||
for the AT91 UC3A/B family of AVR32 MCUs.
|
|
||||||
* confgs/avr32dev1 - Add support for the Atmel AVR32DEV1 board featuring
|
|
||||||
the AT91UC3B0256 MCU. This board is produced by www.mcuzone.com.
|
|
||||||
* include/stdlib.h, lib/Makefile, lib/lib_abs.c, lib/lib_labs.c,
|
|
||||||
lib_labs.c, lib_llabs.c, lib_imaxabs.c - Add abs(), labs(), llabs(), and
|
|
||||||
imaxabs().
|
|
||||||
|
|
||||||
pascal-2.1 2010-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
|
pascal-2.1 2010-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||||
|
|
||||||
|
23
ReleaseNotes
23
ReleaseNotes
@ -1431,3 +1431,26 @@ include:
|
|||||||
* A new configuration to support the mbed.org LPC1768 board (Contributed
|
* A new configuration to support the mbed.org LPC1768 board (Contributed
|
||||||
by Dave Marples), and
|
by Dave Marples), and
|
||||||
* A driver for the Atmel AT45DB161D 4Mbit SPI FLASH part,
|
* A driver for the Atmel AT45DB161D 4Mbit SPI FLASH part,
|
||||||
|
|
||||||
|
nuttx-5.12
|
||||||
|
^^^^^^^^^^
|
||||||
|
|
||||||
|
This is the 59th release of NuttX. This is a critical bugfix release.
|
||||||
|
|
||||||
|
* Fixed an important error in the signal trampoline logic. Essentially,
|
||||||
|
interrupts are re-enabled while the signal handler executes, but the
|
||||||
|
logic to re-disable the interrupts before returning from the signal
|
||||||
|
handler trampoline was missing. Under certain circumstances, this
|
||||||
|
can cause stack corruption. This was discovered by David Hewson on
|
||||||
|
an ARM9 platform, but since the code has been leveraged, the bug has
|
||||||
|
been propogated from ARM to Cortex-M3, AVR32, M16C, SH1, ZNEO, eZ80,
|
||||||
|
Z8, and Z80 -- almost every architecture. The correction has been
|
||||||
|
incorporated for all architectures but only verified on a few.
|
||||||
|
|
||||||
|
Other notable changes in NuttX-5.12:
|
||||||
|
|
||||||
|
* A complete port for the AVR32 (AT91UC3B0256) is incorporated in the
|
||||||
|
source tree. Testing of this port is underway now. This release
|
||||||
|
was made before verifying this port in order to get the important
|
||||||
|
bugfix in place.
|
||||||
|
* Other miscellaneous bugfix and enhancements as noted in the ChangeLog.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* arch/arm/src/arm/up_fullcontextrestore.S
|
* arch/arm/src/arm/up_fullcontextrestore.S
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2007, 2009-2010 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -95,8 +95,9 @@ up_fullcontextrestore:
|
|||||||
|
|
||||||
/* Now we can restore the CPSR. We wait until we are completely
|
/* Now we can restore the CPSR. We wait until we are completely
|
||||||
* finished with the context save data to do this. Restore the CPSR
|
* finished with the context save data to do this. Restore the CPSR
|
||||||
* may re-enable and interrupts and we couldt be in a context
|
* may re-enable and interrupts and we could be in a context
|
||||||
* where save structure is only protected by interrupts being disabled.
|
* where the save structure is only protected by interrupts being
|
||||||
|
* disabled.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
ldr r1, [r0, #(4*REG_CPSR)] /* Fetch the stored CPSR value */
|
ldr r1, [r0, #(4*REG_CPSR)] /* Fetch the stored CPSR value */
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/arm/src/arm/up_schedulesigaction.c
|
* arch/arm/src/arm/up_schedulesigaction.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2007-2010 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/arm/src/arm/up_sigdeliver.c
|
* arch/arm/src/arm/up_sigdeliver.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2007-2010 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -73,10 +73,9 @@
|
|||||||
* Name: up_sigdeliver
|
* Name: up_sigdeliver
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* This is the a signal handling trampoline. When a
|
* This is the a signal handling trampoline. When a signal action was
|
||||||
* signal action was posted. The task context was mucked
|
* posted. The task context was mucked with and forced to branch to this
|
||||||
* with and forced to branch to this location with interrupts
|
* location with interrupts disabled.
|
||||||
* disabled.
|
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
@ -86,9 +85,9 @@ void up_sigdeliver(void)
|
|||||||
uint32_t regs[XCPTCONTEXT_REGS];
|
uint32_t regs[XCPTCONTEXT_REGS];
|
||||||
sig_deliver_t sigdeliver;
|
sig_deliver_t sigdeliver;
|
||||||
|
|
||||||
/* Save the errno. This must be preserved throughout the
|
/* Save the errno. This must be preserved throughout the signal handling
|
||||||
* signal handling so that the user code final gets
|
* so that the user code final gets the correct errno value (probably
|
||||||
* the correct errno value (probably EINTR).
|
* EINTR).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int saved_errno = rtcb->pterrno;
|
int saved_errno = rtcb->pterrno;
|
||||||
@ -105,11 +104,9 @@ void up_sigdeliver(void)
|
|||||||
regs[REG_PC] = rtcb->xcp.saved_pc;
|
regs[REG_PC] = rtcb->xcp.saved_pc;
|
||||||
regs[REG_CPSR] = rtcb->xcp.saved_cpsr;
|
regs[REG_CPSR] = rtcb->xcp.saved_cpsr;
|
||||||
|
|
||||||
/* Get a local copy of the sigdeliver function pointer.
|
/* Get a local copy of the sigdeliver function pointer. we do this so that
|
||||||
* we do this so that we can nullify the sigdeliver
|
* we can nullify the sigdeliver function pointer in the TCB and accept
|
||||||
* function point in the TCB and accept more signal
|
* more signal deliveries while processing the current pending signals.
|
||||||
* deliveries while processing the current pending
|
|
||||||
* signals.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
sigdeliver = rtcb->xcp.sigdeliver;
|
sigdeliver = rtcb->xcp.sigdeliver;
|
||||||
@ -123,18 +120,16 @@ void up_sigdeliver(void)
|
|||||||
|
|
||||||
sigdeliver(rtcb);
|
sigdeliver(rtcb);
|
||||||
|
|
||||||
/* Output any debug messaged BEFORE restoreing errno
|
/* Output any debug messages BEFORE restoring errno (because they may
|
||||||
* (becuase they may alter errno), then restore the
|
* alter errno), then disable interrupts again and restore the original
|
||||||
* original errno that is needed by the user logic
|
* errno that is needed by the user logic (it is probably EINTR).
|
||||||
* (it is probably EINTR).
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
sdbg("Resuming\n");
|
sdbg("Resuming\n");
|
||||||
|
(void)irqsave();
|
||||||
rtcb->pterrno = saved_errno;
|
rtcb->pterrno = saved_errno;
|
||||||
|
|
||||||
/* Then restore the correct state for this thread of
|
/* Then restore the correct state for this thread of execution. */
|
||||||
* execution.
|
|
||||||
*/
|
|
||||||
|
|
||||||
up_ledoff(LED_SIGNAL);
|
up_ledoff(LED_SIGNAL);
|
||||||
up_fullcontextrestore(regs);
|
up_fullcontextrestore(regs);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/arm/src/cortexm3/up_schedulesigaction.c
|
* arch/arm/src/cortexm3/up_schedulesigaction.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/arm/src/cortexm3/up_sigdeliver.c
|
* arch/arm/src/cortexm3/up_sigdeliver.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -73,10 +73,9 @@
|
|||||||
* Name: up_sigdeliver
|
* Name: up_sigdeliver
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* This is the a signal handling trampoline. When a
|
* This is the a signal handling trampoline. When a signal action was
|
||||||
* signal action was posted. The task context was mucked
|
* posted. The task context was mucked with and forced to branch to this
|
||||||
* with and forced to branch to this location with interrupts
|
* location with interrupts disabled.
|
||||||
* disabled.
|
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
@ -86,9 +85,9 @@ void up_sigdeliver(void)
|
|||||||
uint32_t regs[XCPTCONTEXT_REGS];
|
uint32_t regs[XCPTCONTEXT_REGS];
|
||||||
sig_deliver_t sigdeliver;
|
sig_deliver_t sigdeliver;
|
||||||
|
|
||||||
/* Save the errno. This must be preserved throughout the
|
/* Save the errno. This must be preserved throughout the signal handling
|
||||||
* signal handling so that the user code final gets
|
* so that the user code final gets the correct errno value (probably
|
||||||
* the correct errno value (probably EINTR).
|
* EINTR).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int saved_errno = rtcb->pterrno;
|
int saved_errno = rtcb->pterrno;
|
||||||
@ -106,11 +105,9 @@ void up_sigdeliver(void)
|
|||||||
regs[REG_PRIMASK] = rtcb->xcp.saved_primask;
|
regs[REG_PRIMASK] = rtcb->xcp.saved_primask;
|
||||||
regs[REG_XPSR] = rtcb->xcp.saved_xpsr;
|
regs[REG_XPSR] = rtcb->xcp.saved_xpsr;
|
||||||
|
|
||||||
/* Get a local copy of the sigdeliver function pointer.
|
/* Get a local copy of the sigdeliver function pointer. We do this so that
|
||||||
* we do this so that we can nullify the sigdeliver
|
* we can nullify the sigdeliver function pointer in the TCB and accept
|
||||||
* function point in the TCB and accept more signal
|
* more signal deliveries while processing the current pending signals.
|
||||||
* deliveries while processing the current pending
|
|
||||||
* signals.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
sigdeliver = rtcb->xcp.sigdeliver;
|
sigdeliver = rtcb->xcp.sigdeliver;
|
||||||
@ -124,13 +121,13 @@ void up_sigdeliver(void)
|
|||||||
|
|
||||||
sigdeliver(rtcb);
|
sigdeliver(rtcb);
|
||||||
|
|
||||||
/* Output any debug messaged BEFORE restoreing errno
|
/* Output any debug messages BEFORE restoring errno (because they may
|
||||||
* (becuase they may alter errno), then restore the
|
* alter errno), then disable interrupts again and restore the original
|
||||||
* original errno that is needed by the user logic
|
* errno that is needed by the user logic (it is probably EINTR).
|
||||||
* (it is probably EINTR).
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
sdbg("Resuming\n");
|
sdbg("Resuming\n");
|
||||||
|
(void)irqsave();
|
||||||
rtcb->pterrno = saved_errno;
|
rtcb->pterrno = saved_errno;
|
||||||
|
|
||||||
/* Then restore the correct state for this thread of
|
/* Then restore the correct state for this thread of
|
||||||
|
@ -103,9 +103,9 @@ void up_sigdeliver(void)
|
|||||||
regs[REG_PC] = rtcb->xcp.saved_pc;
|
regs[REG_PC] = rtcb->xcp.saved_pc;
|
||||||
regs[REG_SR] = rtcb->xcp.saved_sr;
|
regs[REG_SR] = rtcb->xcp.saved_sr;
|
||||||
|
|
||||||
/* Get a local copy of the sigdeliver function pointer. We do this so tha
|
/* Get a local copy of the sigdeliver function pointer. We do this so that
|
||||||
* we can nullify the sigdeliver function point in the TCB and accept more
|
* we can nullify the sigdeliver function pointer in the TCB and accept
|
||||||
* signal deliveries while processing the current pending signals.
|
* more signal deliveries while processing the current pending signals.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
sigdeliver = rtcb->xcp.sigdeliver;
|
sigdeliver = rtcb->xcp.sigdeliver;
|
||||||
@ -119,17 +119,16 @@ void up_sigdeliver(void)
|
|||||||
|
|
||||||
sigdeliver(rtcb);
|
sigdeliver(rtcb);
|
||||||
|
|
||||||
/* Output any debug messaged BEFORE restoring errno (becuase they may
|
/* Output any debug messages BEFORE restoring errno (because they may
|
||||||
* alter errno), then restore the original errno that is needed by
|
* alter errno), then disable interrupts again and restore the original
|
||||||
* the user logic (it is probably EINTR).
|
* errno that is needed by the user logic (it is probably EINTR).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
sdbg("Resuming\n");
|
sdbg("Resuming\n");
|
||||||
|
(void)irqsave();
|
||||||
rtcb->pterrno = saved_errno;
|
rtcb->pterrno = saved_errno;
|
||||||
|
|
||||||
/* Then restore the correct state for this thread of
|
/* Then restore the correct state for this thread of execution. */
|
||||||
* execution.
|
|
||||||
*/
|
|
||||||
|
|
||||||
up_ledoff(LED_SIGNAL);
|
up_ledoff(LED_SIGNAL);
|
||||||
up_fullcontextrestore(regs);
|
up_fullcontextrestore(regs);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/sh/src/m16c/m16c_schedulesigaction.c
|
* arch/sh/src/m16c/m16c_schedulesigaction.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/sh/src/m16c/m16c_sigdeliver.c
|
* arch/sh/src/m16c/m16c_sigdeliver.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -72,10 +72,9 @@
|
|||||||
* Name: up_sigdeliver
|
* Name: up_sigdeliver
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* This is the a signal handling trampoline. When a
|
* This is the a signal handling trampoline. When a signal action was
|
||||||
* signal action was posted. The task context was mucked
|
* posted. The task context was mucked with and forced to branch to this
|
||||||
* with and forced to branch to this location with interrupts
|
* location with interrupts disabled.
|
||||||
* disabled.
|
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
@ -86,9 +85,9 @@ void up_sigdeliver(void)
|
|||||||
uint8_t regs[XCPTCONTEXT_SIZE];
|
uint8_t regs[XCPTCONTEXT_SIZE];
|
||||||
sig_deliver_t sigdeliver;
|
sig_deliver_t sigdeliver;
|
||||||
|
|
||||||
/* Save the errno. This must be preserved throughout the
|
/* Save the errno. This must be preserved throughout the signal handling
|
||||||
* signal handling so that the user code final gets
|
* so that the user code final gets the correct errno value (probably
|
||||||
* the correct errno value (probably EINTR).
|
* EINTR).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int saved_errno = rtcb->pterrno;
|
int saved_errno = rtcb->pterrno;
|
||||||
@ -106,10 +105,9 @@ void up_sigdeliver(void)
|
|||||||
regs[REG_PC+1] = rtcb->xcp.saved_pc[1];
|
regs[REG_PC+1] = rtcb->xcp.saved_pc[1];
|
||||||
regs[REG_FLG] = rtcb->xcp.saved_flg;
|
regs[REG_FLG] = rtcb->xcp.saved_flg;
|
||||||
|
|
||||||
/* Get a local copy of the sigdeliver function pointer.
|
/* Get a local copy of the sigdeliver function pointer. We do this so
|
||||||
* we do this so that we can nullify the sigdeliver
|
* that we can nullify the sigdeliver function pointer in the TCB and
|
||||||
* function point in the TCB and accept more signal
|
* accept more signal deliveries while processing the current pending
|
||||||
* deliveries while processing the current pending
|
|
||||||
* signals.
|
* signals.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -124,13 +122,13 @@ void up_sigdeliver(void)
|
|||||||
|
|
||||||
sigdeliver(rtcb);
|
sigdeliver(rtcb);
|
||||||
|
|
||||||
/* Output any debug messaged BEFORE restoreing errno
|
/* Output any debug messages BEFORE restoring errno (because they may
|
||||||
* (becuase they may alter errno), then restore the
|
* alter errno), then disable interrupts again and restore the original
|
||||||
* original errno that is needed by the user logic
|
* errno that is needed by the user logic (it is probably EINTR).
|
||||||
* (it is probably EINTR).
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
sdbg("Resuming\n");
|
sdbg("Resuming\n");
|
||||||
|
(void)irqsave();
|
||||||
rtcb->pterrno = saved_errno;
|
rtcb->pterrno = saved_errno;
|
||||||
|
|
||||||
/* Then restore the correct state for this thread of
|
/* Then restore the correct state for this thread of
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/sh/src/sh1/sh1_schedulesigaction.c
|
* arch/sh/src/sh1/sh1_schedulesigaction.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2008-2010 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* common/up_sigdeliver.c
|
* common/up_sigdeliver.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2008-2010 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -72,10 +72,9 @@
|
|||||||
* Name: up_sigdeliver
|
* Name: up_sigdeliver
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* This is the a signal handling trampoline. When a
|
* This is the a signal handling trampoline. When a signal action was
|
||||||
* signal action was posted. The task context was mucked
|
* posted. The task context was mucked with and forced to branch to this
|
||||||
* with and forced to branch to this location with interrupts
|
* location with interrupts disabled.
|
||||||
* disabled.
|
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
@ -86,9 +85,9 @@ void up_sigdeliver(void)
|
|||||||
uint32_t regs[XCPTCONTEXT_REGS];
|
uint32_t regs[XCPTCONTEXT_REGS];
|
||||||
sig_deliver_t sigdeliver;
|
sig_deliver_t sigdeliver;
|
||||||
|
|
||||||
/* Save the errno. This must be preserved throughout the
|
/* Save the errno. This must be preserved throughout the signal handling
|
||||||
* signal handling so that the user code final gets
|
* so that the user code final gets the correct errno value (probably
|
||||||
* the correct errno value (probably EINTR).
|
* EINTR).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int saved_errno = rtcb->pterrno;
|
int saved_errno = rtcb->pterrno;
|
||||||
@ -105,17 +104,16 @@ void up_sigdeliver(void)
|
|||||||
regs[REG_PC] = rtcb->xcp.saved_pc;
|
regs[REG_PC] = rtcb->xcp.saved_pc;
|
||||||
regs[REG_SR] = rtcb->xcp.saved_sr;
|
regs[REG_SR] = rtcb->xcp.saved_sr;
|
||||||
|
|
||||||
/* Get a local copy of the sigdeliver function pointer.
|
/* Get a local copy of the sigdeliver function pointer. We do this so
|
||||||
* we do this so that we can nullify the sigdeliver
|
* that we can nullify the sigdeliver function pointer in the TCB and
|
||||||
* function point in the TCB and accept more signal
|
* accept more signal deliveries while processing the current pending
|
||||||
* deliveries while processing the current pending
|
|
||||||
* signals.
|
* signals.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
sigdeliver = rtcb->xcp.sigdeliver;
|
sigdeliver = rtcb->xcp.sigdeliver;
|
||||||
rtcb->xcp.sigdeliver = NULL;
|
rtcb->xcp.sigdeliver = NULL;
|
||||||
|
|
||||||
/* Then restore the task interrupt statat. */
|
/* Then restore the task interrupt state. */
|
||||||
|
|
||||||
irqrestore(regs[REG_SR] & 0x000000f0);
|
irqrestore(regs[REG_SR] & 0x000000f0);
|
||||||
|
|
||||||
@ -123,18 +121,16 @@ void up_sigdeliver(void)
|
|||||||
|
|
||||||
sigdeliver(rtcb);
|
sigdeliver(rtcb);
|
||||||
|
|
||||||
/* Output any debug messaged BEFORE restoreing errno
|
/* Output any debug messages BEFORE restoring errno (because they may
|
||||||
* (becuase they may alter errno), then restore the
|
* alter errno), then disable interrupts again and restore the original
|
||||||
* original errno that is needed by the user logic
|
* errno that is needed by the user logic (it is probably EINTR).
|
||||||
* (it is probably EINTR).
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
sdbg("Resuming\n");
|
sdbg("Resuming\n");
|
||||||
|
(void)irqsave();
|
||||||
rtcb->pterrno = saved_errno;
|
rtcb->pterrno = saved_errno;
|
||||||
|
|
||||||
/* Then restore the correct state for this thread of
|
/* Then restore the correct state for this thread of execution. */
|
||||||
* execution.
|
|
||||||
*/
|
|
||||||
|
|
||||||
up_ledoff(LED_SIGNAL);
|
up_ledoff(LED_SIGNAL);
|
||||||
up_fullcontextrestore(regs);
|
up_fullcontextrestore(regs);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* up_schedulesigaction.c
|
* up_schedulesigaction.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2007-2010 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -98,7 +98,7 @@
|
|||||||
|
|
||||||
void up_schedule_sigaction(_TCB *tcb, sig_deliver_t sigdeliver)
|
void up_schedule_sigaction(_TCB *tcb, sig_deliver_t sigdeliver)
|
||||||
{
|
{
|
||||||
/* We don't have to anything complex of the simulated target */
|
/* We don't have to anything complex for the simulated target */
|
||||||
|
|
||||||
if (tcb == (_TCB*)g_readytorun.head)
|
if (tcb == (_TCB*)g_readytorun.head)
|
||||||
{
|
{
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* common/up_schedulesigaction.c
|
* common/up_schedulesigaction.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2008-2010 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* common/up_sigdeliver.c
|
* common/up_sigdeliver.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2008-2010 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -95,7 +95,7 @@ void up_sigdeliver(void)
|
|||||||
|
|
||||||
up_ledon(LED_SIGNAL);
|
up_ledon(LED_SIGNAL);
|
||||||
|
|
||||||
dbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
||||||
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
||||||
ASSERT(rtcb->xcp.sigdeliver != NULL);
|
ASSERT(rtcb->xcp.sigdeliver != NULL);
|
||||||
|
|
||||||
@ -125,17 +125,16 @@ void up_sigdeliver(void)
|
|||||||
|
|
||||||
sigdeliver(rtcb);
|
sigdeliver(rtcb);
|
||||||
|
|
||||||
/* Output any debug messaged BEFORE restoring errno (because they may
|
/* Output any debug messages BEFORE restoring errno (because they may
|
||||||
* alter errno), then restore the original errno that is needed by
|
* alter errno), then disable interrupts again and restore the original
|
||||||
* the user logic (it is probably EINTR).
|
* errno that is needed by the user logic (it is probably EINTR).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
dbg("Resuming\n");
|
sdbg("Resuming\n");
|
||||||
|
(void)irqsave();
|
||||||
rtcb->pterrno = saved_errno;
|
rtcb->pterrno = saved_errno;
|
||||||
|
|
||||||
/* Then restore the correct state for this thread of
|
/* Then restore the correct state for this thread of execution. */
|
||||||
* execution.
|
|
||||||
*/
|
|
||||||
|
|
||||||
up_ledoff(LED_SIGNAL);
|
up_ledoff(LED_SIGNAL);
|
||||||
SIGNAL_RETURN(regs);
|
SIGNAL_RETURN(regs);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/z80/src/ez80/ez80_schedulesigaction.c
|
* arch/z80/src/ez80/ez80_schedulesigaction.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2008-2010 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/z80/src/ez80/ez80_sigdeliver.c
|
* arch/z80/src/ez80/ez80_sigdeliver.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2008-2010 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -72,10 +72,9 @@
|
|||||||
* Name: up_sigdeliver
|
* Name: up_sigdeliver
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* This is the a signal handling trampoline. When a
|
* This is the a signal handling trampoline. When a signal action was
|
||||||
* signal action was posted. The task context was mucked
|
* posted. The task context was mucked with and forced to branch to this
|
||||||
* with and forced to branch to this location with interrupts
|
* location with interrupts disabled.
|
||||||
* disabled.
|
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
@ -106,8 +105,9 @@ void up_sigdeliver(void)
|
|||||||
regs[XCPT_I] = rtcb->xcp.saved_i;
|
regs[XCPT_I] = rtcb->xcp.saved_i;
|
||||||
|
|
||||||
/* Get a local copy of the sigdeliver function pointer. We do this so
|
/* Get a local copy of the sigdeliver function pointer. We do this so
|
||||||
* that we can nullify the sigdeliver function point in the TCB and accept
|
* that we can nullify the sigdeliver function pointer in the TCB and
|
||||||
* more signal deliveries while processing the current pending signals.
|
* accept more signal deliveries while processing the current pending
|
||||||
|
* signals.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
sigdeliver = rtcb->xcp.sigdeliver;
|
sigdeliver = rtcb->xcp.sigdeliver;
|
||||||
@ -121,12 +121,13 @@ void up_sigdeliver(void)
|
|||||||
|
|
||||||
sigdeliver(rtcb);
|
sigdeliver(rtcb);
|
||||||
|
|
||||||
/* Output any debug messaged BEFORE restoring errno (because they may alter
|
/* Output any debug messages BEFORE restoring errno (because they may
|
||||||
* errno), then restore the original errno that is needed by the user logic
|
* alter errno), then disable interrupts again and restore the original
|
||||||
* (it is probably EINTR).
|
* errno that is needed by the user logic (it is probably EINTR).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
sdbg("Resuming\n");
|
sdbg("Resuming\n");
|
||||||
|
(void)irqsave();
|
||||||
rtcb->pterrno = saved_errno;
|
rtcb->pterrno = saved_errno;
|
||||||
|
|
||||||
/* Then restore the correct state for this thread of
|
/* Then restore the correct state for this thread of
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/z80/src/z8/z8_schedulesigaction.c
|
* arch/z80/src/z8/z8_schedulesigaction.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2008-2010 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/z80/src/z8/z8_sigdeliver.c
|
* arch/z80/src/z8/z8_sigdeliver.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2008-2010 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -86,10 +86,9 @@ static void z8_copystate(FAR chipreg_t *dest, FAR const chipreg_t *src)
|
|||||||
* Name: up_sigdeliver
|
* Name: up_sigdeliver
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* This is the a signal handling trampoline. When a
|
* This is the a signal handling trampoline. When a signal action was
|
||||||
* signal action was posted. The task context was mucked
|
* posted. The task context was mucked with and forced to branch to this
|
||||||
* with and forced to branch to this location with interrupts
|
* location with interrupts disabled.
|
||||||
* disabled.
|
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
@ -109,7 +108,7 @@ void up_sigdeliver(void)
|
|||||||
|
|
||||||
up_ledon(LED_SIGNAL);
|
up_ledon(LED_SIGNAL);
|
||||||
|
|
||||||
dbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
||||||
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
||||||
ASSERT(rtcb->xcp.sigdeliver != NULL);
|
ASSERT(rtcb->xcp.sigdeliver != NULL);
|
||||||
|
|
||||||
@ -120,8 +119,9 @@ void up_sigdeliver(void)
|
|||||||
regs[XCPT_IRQCTL] = rtcb->xcp.saved_irqctl;
|
regs[XCPT_IRQCTL] = rtcb->xcp.saved_irqctl;
|
||||||
|
|
||||||
/* Get a local copy of the sigdeliver function pointer. We do this so
|
/* Get a local copy of the sigdeliver function pointer. We do this so
|
||||||
* that we can nullify the sigdeliver function point in the TCB and accept
|
* that we can nullify the sigdeliver function pointer in the TCB and
|
||||||
* more signal deliveries while processing the current pending signals.
|
* accept more signal deliveries while processing the current pending
|
||||||
|
* signals.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
sigdeliver = rtcb->xcp.sigdeliver;
|
sigdeliver = rtcb->xcp.sigdeliver;
|
||||||
@ -135,17 +135,16 @@ void up_sigdeliver(void)
|
|||||||
|
|
||||||
sigdeliver(rtcb);
|
sigdeliver(rtcb);
|
||||||
|
|
||||||
/* Output any debug messaged BEFORE restoring errno (because they may alter
|
/* Output any debug messages BEFORE restoring errno (because they may
|
||||||
* errno), then restore the original errno that is needed by the user logic
|
* alter errno), then disable interrupts again and restore the original
|
||||||
* (it is probably EINTR).
|
* errno that is needed by the user logic (it is probably EINTR).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
dbg("Resuming\n");
|
sdbg("Resuming\n");
|
||||||
|
(void)irqsave();
|
||||||
rtcb->pterrno = saved_errno;
|
rtcb->pterrno = saved_errno;
|
||||||
|
|
||||||
/* Then restore the correct state for this thread of
|
/* Then restore the correct state for this thread of execution. */
|
||||||
* execution.
|
|
||||||
*/
|
|
||||||
|
|
||||||
up_ledoff(LED_SIGNAL);
|
up_ledoff(LED_SIGNAL);
|
||||||
z8_restorecontext(regs);
|
z8_restorecontext(regs);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/z80/src/z80/z80_schedulesigaction.c
|
* arch/z80/src/z80/z80_schedulesigaction.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2007-2010 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/z80/src/z80/z80_sigdeliver.c
|
* arch/z80/src/z80/z80_sigdeliver.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2007-2010 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -71,10 +71,9 @@
|
|||||||
* Name: up_sigdeliver
|
* Name: up_sigdeliver
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* This is the a signal handling trampoline. When a
|
* This is the a signal handling trampoline. When a signal action was
|
||||||
* signal action was posted. The task context was mucked
|
* posted. The task context was mucked with and forced to branch to this
|
||||||
* with and forced to branch to this location with interrupts
|
* location with interrupts disabled.
|
||||||
* disabled.
|
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
@ -94,7 +93,7 @@ void up_sigdeliver(void)
|
|||||||
|
|
||||||
up_ledon(LED_SIGNAL);
|
up_ledon(LED_SIGNAL);
|
||||||
|
|
||||||
dbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
||||||
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
||||||
ASSERT(rtcb->xcp.sigdeliver != NULL);
|
ASSERT(rtcb->xcp.sigdeliver != NULL);
|
||||||
|
|
||||||
@ -105,8 +104,9 @@ void up_sigdeliver(void)
|
|||||||
regs[XCPT_I] = rtcb->xcp.saved_i;
|
regs[XCPT_I] = rtcb->xcp.saved_i;
|
||||||
|
|
||||||
/* Get a local copy of the sigdeliver function pointer. We do this so
|
/* Get a local copy of the sigdeliver function pointer. We do this so
|
||||||
* that we can nullify the sigdeliver function point in the TCB and accept
|
* that we can nullify the sigdeliver function pointer in the TCB and
|
||||||
* more signal deliveries while processing the current pending signals.
|
* accept more signal deliveries while processing the current pending
|
||||||
|
* signals.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
sigdeliver = rtcb->xcp.sigdeliver;
|
sigdeliver = rtcb->xcp.sigdeliver;
|
||||||
@ -120,17 +120,16 @@ void up_sigdeliver(void)
|
|||||||
|
|
||||||
sigdeliver(rtcb);
|
sigdeliver(rtcb);
|
||||||
|
|
||||||
/* Output any debug messaged BEFORE restoring errno (because they may alter
|
/* Output any debug messages BEFORE restoring errno (because they may
|
||||||
* errno), then restore the original errno that is needed by the user logic
|
* alter errno), then disable interrupts again and restore the original
|
||||||
* (it is probably EINTR).
|
* errno that is needed by the user logic (it is probably EINTR).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
dbg("Resuming\n");
|
sdbg("Resuming\n");
|
||||||
|
(void)irqsave();
|
||||||
rtcb->pterrno = saved_errno;
|
rtcb->pterrno = saved_errno;
|
||||||
|
|
||||||
/* Then restore the correct state for this thread of
|
/* Then restore the correct state for this thread of execution. */
|
||||||
* execution.
|
|
||||||
*/
|
|
||||||
|
|
||||||
up_ledoff(LED_SIGNAL);
|
up_ledoff(LED_SIGNAL);
|
||||||
z80_restoreusercontext(regs);
|
z80_restoreusercontext(regs);
|
||||||
|
@ -631,6 +631,93 @@ CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
|
|||||||
CONFIG_USBSTRG_VERSIONNO=0x0399
|
CONFIG_USBSTRG_VERSIONNO=0x0399
|
||||||
CONFIG_USBSTRG_REMOVABLE=y
|
CONFIG_USBSTRG_REMOVABLE=y
|
||||||
|
|
||||||
|
#
|
||||||
|
# Graphics related configuration settings
|
||||||
|
#
|
||||||
|
# CONFIG_NX
|
||||||
|
# Enables overall support for graphics library and NX
|
||||||
|
# CONFIG_NX_MULTIUSER
|
||||||
|
# Configures NX in multi-user mode
|
||||||
|
# CONFIG_NX_NPLANES
|
||||||
|
# Some YUV color formats requires support for multiple planes,
|
||||||
|
# one for each color component. Unless you have such special
|
||||||
|
# hardware, this value should be undefined or set to 1
|
||||||
|
# CONFIG_NX_DISABLE_1BPP, CONFIG_NX_DISABLE_2BPP,
|
||||||
|
# CONFIG_NX_DISABLE_4BPP, CONFIG_NX_DISABLE_8BPP,
|
||||||
|
# CONFIG_NX_DISABLE_16BPP, CONFIG_NX_DISABLE_24BPP, and
|
||||||
|
# CONFIG_NX_DISABLE_32BPP
|
||||||
|
# NX supports a variety of pixel depths. You can save some
|
||||||
|
# memory by disabling support for unused color depths.
|
||||||
|
# CONFIG_NX_PACKEDMSFIRST
|
||||||
|
# If a pixel depth of less than 8-bits is used, then NX needs
|
||||||
|
# to know if the pixels pack from the MS to LS or from LS to MS
|
||||||
|
# CONFIG_NX_LCDDRIVER
|
||||||
|
# By default, NX builds to use a framebuffer driver (see
|
||||||
|
# include/nuttx/fb.h). If this option is defined, NX will
|
||||||
|
# build to use an LCD driver (see include/nuttx/lcd.h).
|
||||||
|
# CONFIG_LCD_MAXPOWER - The full-on power setting for an LCD device.
|
||||||
|
# CONFIG_LCD_MAXCONTRAST - The maximum contrast value for an LCD device.
|
||||||
|
# CONFIG_NX_MOUSE
|
||||||
|
# Build in support for mouse input
|
||||||
|
# CONFIG_NX_KBD
|
||||||
|
# Build in support of keypad/keyboard input
|
||||||
|
# CONFIG_NXTK_BORDERWIDTH
|
||||||
|
# Specifies with with of the border (in pixels) used with
|
||||||
|
# framed windows. The default is 4.
|
||||||
|
# CONFIG_NXTK_BORDERCOLOR1 and CONFIG_NXTK_BORDERCOLOR2
|
||||||
|
# Specify the colors of the border used with framed windows.
|
||||||
|
# CONFIG_NXTK_BORDERCOLOR2 is the shadow side color and so
|
||||||
|
# is normally darker. The default is medium and dark grey,
|
||||||
|
# respectively
|
||||||
|
# CONFIG_NXTK_AUTORAISE
|
||||||
|
# If set, a window will be raised to the top if the mouse position
|
||||||
|
# is over a visible portion of the window. Default: A mouse
|
||||||
|
# button must be clicked over a visible portion of the window.
|
||||||
|
# CONFIG_NXFONTS_CHARBITS
|
||||||
|
# The number of bits in the character set. Current options are
|
||||||
|
# only 7 and 8. The default is 7.
|
||||||
|
# CONFIG_NXFONT_SANS
|
||||||
|
# At present, there is only one font. But if there were were more,
|
||||||
|
# then this option would select the sans serif font.
|
||||||
|
#
|
||||||
|
# NX Multi-user only options:
|
||||||
|
#
|
||||||
|
# CONFIG_NX_BLOCKING
|
||||||
|
# Open the client message queues in blocking mode. In this case,
|
||||||
|
# nx_eventhandler() will not return until a message is received and processed.
|
||||||
|
# CONFIG_NX_MXSERVERMSGS and CONFIG_NX_MXCLIENTMSGS
|
||||||
|
# Specifies the maximum number of messages that can fit in
|
||||||
|
# the message queues. No additional resources are allocated, but
|
||||||
|
# this can be set to prevent flooding of the client or server with
|
||||||
|
# too many messages (CONFIG_PREALLOC_MQ_MSGS controls how many
|
||||||
|
# messages are pre-allocated).
|
||||||
|
#
|
||||||
|
CONFIG_NX=n
|
||||||
|
CONFIG_NX_MULTIUSER=n
|
||||||
|
CONFIG_NX_NPLANES=1
|
||||||
|
CONFIG_NX_DISABLE_1BPP=y
|
||||||
|
CONFIG_NX_DISABLE_2BPP=y
|
||||||
|
CONFIG_NX_DISABLE_4BPP=y
|
||||||
|
CONFIG_NX_DISABLE_8BPP=y
|
||||||
|
CONFIG_NX_DISABLE_16BPP=n
|
||||||
|
CONFIG_NX_DISABLE_24BPP=y
|
||||||
|
CONFIG_NX_DISABLE_32BPP=y
|
||||||
|
CONFIG_NX_PACKEDMSFIRST=n
|
||||||
|
CONFIG_NX_LCDDRIVER=y
|
||||||
|
CONFIG_LCD_MAXPOWER=31
|
||||||
|
CONFIG_LCD_MAXCONTRAST=1
|
||||||
|
CONFIG_NX_MOUSE=y
|
||||||
|
CONFIG_NX_KBD=y
|
||||||
|
#CONFIG_NXTK_BORDERWIDTH=4
|
||||||
|
#CONFIG_NXTK_BORDERCOLOR1
|
||||||
|
#CONFIG_NXTK_BORDERCOLOR2
|
||||||
|
CONFIG_NXTK_AUTORAISE=n
|
||||||
|
CONFIG_NXFONT_SANS=y
|
||||||
|
CONFIG_NXFONTS_CHARBITS=7
|
||||||
|
CONFIG_NX_BLOCKING=y
|
||||||
|
CONFIG_NX_MXSERVERMSGS=32
|
||||||
|
CONFIG_NX_MXCLIENTMSGS=16
|
||||||
|
|
||||||
#
|
#
|
||||||
# Settings for examples/uip
|
# Settings for examples/uip
|
||||||
#
|
#
|
||||||
|
@ -629,6 +629,93 @@ CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
|
|||||||
CONFIG_USBSTRG_VERSIONNO=0x0399
|
CONFIG_USBSTRG_VERSIONNO=0x0399
|
||||||
CONFIG_USBSTRG_REMOVABLE=y
|
CONFIG_USBSTRG_REMOVABLE=y
|
||||||
|
|
||||||
|
#
|
||||||
|
# Graphics related configuration settings
|
||||||
|
#
|
||||||
|
# CONFIG_NX
|
||||||
|
# Enables overall support for graphics library and NX
|
||||||
|
# CONFIG_NX_MULTIUSER
|
||||||
|
# Configures NX in multi-user mode
|
||||||
|
# CONFIG_NX_NPLANES
|
||||||
|
# Some YUV color formats requires support for multiple planes,
|
||||||
|
# one for each color component. Unless you have such special
|
||||||
|
# hardware, this value should be undefined or set to 1
|
||||||
|
# CONFIG_NX_DISABLE_1BPP, CONFIG_NX_DISABLE_2BPP,
|
||||||
|
# CONFIG_NX_DISABLE_4BPP, CONFIG_NX_DISABLE_8BPP,
|
||||||
|
# CONFIG_NX_DISABLE_16BPP, CONFIG_NX_DISABLE_24BPP, and
|
||||||
|
# CONFIG_NX_DISABLE_32BPP
|
||||||
|
# NX supports a variety of pixel depths. You can save some
|
||||||
|
# memory by disabling support for unused color depths.
|
||||||
|
# CONFIG_NX_PACKEDMSFIRST
|
||||||
|
# If a pixel depth of less than 8-bits is used, then NX needs
|
||||||
|
# to know if the pixels pack from the MS to LS or from LS to MS
|
||||||
|
# CONFIG_NX_LCDDRIVER
|
||||||
|
# By default, NX builds to use a framebuffer driver (see
|
||||||
|
# include/nuttx/fb.h). If this option is defined, NX will
|
||||||
|
# build to use an LCD driver (see include/nuttx/lcd.h).
|
||||||
|
# CONFIG_LCD_MAXPOWER - The full-on power setting for an LCD device.
|
||||||
|
# CONFIG_LCD_MAXCONTRAST - The maximum contrast value for an LCD device.
|
||||||
|
# CONFIG_NX_MOUSE
|
||||||
|
# Build in support for mouse input
|
||||||
|
# CONFIG_NX_KBD
|
||||||
|
# Build in support of keypad/keyboard input
|
||||||
|
# CONFIG_NXTK_BORDERWIDTH
|
||||||
|
# Specifies with with of the border (in pixels) used with
|
||||||
|
# framed windows. The default is 4.
|
||||||
|
# CONFIG_NXTK_BORDERCOLOR1 and CONFIG_NXTK_BORDERCOLOR2
|
||||||
|
# Specify the colors of the border used with framed windows.
|
||||||
|
# CONFIG_NXTK_BORDERCOLOR2 is the shadow side color and so
|
||||||
|
# is normally darker. The default is medium and dark grey,
|
||||||
|
# respectively
|
||||||
|
# CONFIG_NXTK_AUTORAISE
|
||||||
|
# If set, a window will be raised to the top if the mouse position
|
||||||
|
# is over a visible portion of the window. Default: A mouse
|
||||||
|
# button must be clicked over a visible portion of the window.
|
||||||
|
# CONFIG_NXFONTS_CHARBITS
|
||||||
|
# The number of bits in the character set. Current options are
|
||||||
|
# only 7 and 8. The default is 7.
|
||||||
|
# CONFIG_NXFONT_SANS
|
||||||
|
# At present, there is only one font. But if there were were more,
|
||||||
|
# then this option would select the sans serif font.
|
||||||
|
#
|
||||||
|
# NX Multi-user only options:
|
||||||
|
#
|
||||||
|
# CONFIG_NX_BLOCKING
|
||||||
|
# Open the client message queues in blocking mode. In this case,
|
||||||
|
# nx_eventhandler() will not return until a message is received and processed.
|
||||||
|
# CONFIG_NX_MXSERVERMSGS and CONFIG_NX_MXCLIENTMSGS
|
||||||
|
# Specifies the maximum number of messages that can fit in
|
||||||
|
# the message queues. No additional resources are allocated, but
|
||||||
|
# this can be set to prevent flooding of the client or server with
|
||||||
|
# too many messages (CONFIG_PREALLOC_MQ_MSGS controls how many
|
||||||
|
# messages are pre-allocated).
|
||||||
|
#
|
||||||
|
CONFIG_NX=n
|
||||||
|
CONFIG_NX_MULTIUSER=n
|
||||||
|
CONFIG_NX_NPLANES=1
|
||||||
|
CONFIG_NX_DISABLE_1BPP=y
|
||||||
|
CONFIG_NX_DISABLE_2BPP=y
|
||||||
|
CONFIG_NX_DISABLE_4BPP=y
|
||||||
|
CONFIG_NX_DISABLE_8BPP=y
|
||||||
|
CONFIG_NX_DISABLE_16BPP=n
|
||||||
|
CONFIG_NX_DISABLE_24BPP=y
|
||||||
|
CONFIG_NX_DISABLE_32BPP=y
|
||||||
|
CONFIG_NX_PACKEDMSFIRST=n
|
||||||
|
CONFIG_NX_LCDDRIVER=y
|
||||||
|
CONFIG_LCD_MAXPOWER=31
|
||||||
|
CONFIG_LCD_MAXCONTRAST=1
|
||||||
|
CONFIG_NX_MOUSE=y
|
||||||
|
CONFIG_NX_KBD=y
|
||||||
|
#CONFIG_NXTK_BORDERWIDTH=4
|
||||||
|
#CONFIG_NXTK_BORDERCOLOR1
|
||||||
|
#CONFIG_NXTK_BORDERCOLOR2
|
||||||
|
CONFIG_NXTK_AUTORAISE=n
|
||||||
|
CONFIG_NXFONT_SANS=y
|
||||||
|
CONFIG_NXFONTS_CHARBITS=7
|
||||||
|
CONFIG_NX_BLOCKING=y
|
||||||
|
CONFIG_NX_MXSERVERMSGS=32
|
||||||
|
CONFIG_NX_MXCLIENTMSGS=16
|
||||||
|
|
||||||
#
|
#
|
||||||
# Settings for examples/uip
|
# Settings for examples/uip
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user