summaryrefslogtreecommitdiff
path: root/nuttx/include/signal.h
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-03-17 00:40:49 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-03-17 00:40:49 +0000
commite6dc1927ce61a16359477bb93a2292caade5df75 (patch)
tree3b7ed6b971413d6423d6012fe593980ee8370429 /nuttx/include/signal.h
parentc6e15be439a293e411a5ff571c48e0ca15dfaad5 (diff)
downloadpx4-nuttx-e6dc1927ce61a16359477bb93a2292caade5df75.tar.gz
px4-nuttx-e6dc1927ce61a16359477bb93a2292caade5df75.tar.bz2
px4-nuttx-e6dc1927ce61a16359477bb93a2292caade5df75.zip
Add support for calling to and returning from signal handlers in in user-mode threads
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5750 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include/signal.h')
-rw-r--r--nuttx/include/signal.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/nuttx/include/signal.h b/nuttx/include/signal.h
index a02170242..a31e62ff2 100644
--- a/nuttx/include/signal.h
+++ b/nuttx/include/signal.h
@@ -1,7 +1,7 @@
/********************************************************************************
* include/signal.h
*
- * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007-2009, 2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -206,19 +206,28 @@ struct siginfo
typedef struct siginfo siginfo_t;
+/* Non-standard convenience definition of signal handling function types.
+ * These should be used only internally within the NuttX signal logic.
+ */
+
+typedef CODE void (*_sa_handler_t)(int);
+typedef CODE void (*_sa_sigaction_t)(int, FAR siginfo_t *, FAR void *);
+
/* The following structure defines the action to take for given signal */
struct sigaction
{
union
{
- CODE void (*_sa_handler)(int);
- CODE void (*_sa_sigaction)(int, FAR siginfo_t *, FAR void *);
+ _sa_handler_t _sa_handler;
+ _sa_sigaction_t _sa_sigaction;
} sa_u;
- sigset_t sa_mask;
- int sa_flags;
+ sigset_t sa_mask;
+ int sa_flags;
};
+/* Definitions that adjust the non-standard naming */
+
#define sa_handler sa_u._sa_handler
#define sa_sigaction sa_u._sa_sigaction