summaryrefslogtreecommitdiff
path: root/nuttx/sched/sig_removependingsignal.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-07-14 19:30:31 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-07-14 19:30:31 +0000
commite135573acc348649e767ca67a1ec189fe4e0fcda (patch)
treeb34f7d2914cba8aeb9311c5bae3771af40054640 /nuttx/sched/sig_removependingsignal.c
parentd76fa866ad009d65396acf1aa08fcffd3b4b041e (diff)
downloadpx4-nuttx-e135573acc348649e767ca67a1ec189fe4e0fcda.tar.gz
px4-nuttx-e135573acc348649e767ca67a1ec189fe4e0fcda.tar.bz2
px4-nuttx-e135573acc348649e767ca67a1ec189fe4e0fcda.zip
Fix STM32 F2/F4 SDIO clocking; Clean-up files in sched/ directory
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4940 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/sched/sig_removependingsignal.c')
-rw-r--r--nuttx/sched/sig_removependingsignal.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/nuttx/sched/sig_removependingsignal.c b/nuttx/sched/sig_removependingsignal.c
index 37c829dfe..c82bf983b 100644
--- a/nuttx/sched/sig_removependingsignal.c
+++ b/nuttx/sched/sig_removependingsignal.c
@@ -2,7 +2,7 @@
* sched/sig_removependingsignal.c
*
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -46,8 +46,10 @@
#include <assert.h>
#include <debug.h>
#include <sched.h>
+
#include <nuttx/kmalloc.h>
#include <nuttx/arch.h>
+
#include "os_internal.h"
#include "sig_internal.h"
@@ -76,10 +78,11 @@
************************************************************************/
/************************************************************************
- * Function: sig_removependingsignal
+ * Name: sig_removependingsignal
*
* Description:
- * Remove the specified signal from the signal pending list
+ * Remove the specified signal from the signal pending list
+ *
************************************************************************/
FAR sigpendq_t *sig_removependingsignal(FAR _TCB *stcb, int signo)
@@ -89,9 +92,11 @@ FAR sigpendq_t *sig_removependingsignal(FAR _TCB *stcb, int signo)
irqstate_t saved_state;
saved_state = irqsave();
+
for (prevsig = NULL, currsig = (FAR sigpendq_t*)stcb->sigpendingq.head;
(currsig && currsig->info.si_signo != signo);
prevsig = currsig, currsig = currsig->flink);
+
if (currsig)
{
if (prevsig)
@@ -103,6 +108,7 @@ FAR sigpendq_t *sig_removependingsignal(FAR _TCB *stcb, int signo)
sq_remfirst(&stcb->sigpendingq);
}
}
+
irqrestore(saved_state);
return currsig;