From 665c4bf764eb07e58e70393c08671a2dfcd834bb Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 27 Oct 2010 01:46:08 +0000 Subject: Fix a signal trampoline bug git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3053 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/arch/z16/src/common/up_schedulesigaction.c | 2 +- nuttx/arch/z16/src/common/up_sigdeliver.c | 19 +++++++++---------- 2 files changed, 10 insertions(+), 11 deletions(-) (limited to 'nuttx/arch/z16/src/common') diff --git a/nuttx/arch/z16/src/common/up_schedulesigaction.c b/nuttx/arch/z16/src/common/up_schedulesigaction.c index e76a8c4ff..368b2ed54 100644 --- a/nuttx/arch/z16/src/common/up_schedulesigaction.c +++ b/nuttx/arch/z16/src/common/up_schedulesigaction.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * Redistribution and use in source and binary forms, with or without diff --git a/nuttx/arch/z16/src/common/up_sigdeliver.c b/nuttx/arch/z16/src/common/up_sigdeliver.c index 85f3e972d..4ca05d17b 100644 --- a/nuttx/arch/z16/src/common/up_sigdeliver.c +++ b/nuttx/arch/z16/src/common/up_sigdeliver.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * Redistribution and use in source and binary forms, with or without @@ -95,8 +95,8 @@ void up_sigdeliver(void) up_ledon(LED_SIGNAL); - dbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", - rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); + sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", + rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); ASSERT(rtcb->xcp.sigdeliver != NULL); /* Save the real return state on the stack. */ @@ -125,17 +125,16 @@ void up_sigdeliver(void) sigdeliver(rtcb); - /* Output any debug messaged BEFORE restoring errno (because they may - * alter errno), then restore the original errno that is needed by - * the user logic (it is probably EINTR). + /* Output any debug messages BEFORE restoring errno (because they may + * alter errno), then disable interrupts again and restore the original + * errno that is needed by the user logic (it is probably EINTR). */ - dbg("Resuming\n"); + sdbg("Resuming\n"); + (void)irqsave(); rtcb->pterrno = saved_errno; - /* Then restore the correct state for this thread of - * execution. - */ + /* Then restore the correct state for this thread of execution. */ up_ledoff(LED_SIGNAL); SIGNAL_RETURN(regs); -- cgit v1.2.3