aboutsummaryrefslogtreecommitdiff
path: root/apps/examples
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-01-27 15:52:58 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-01-27 15:52:58 +0000
commite96d8f046b6bce6c4e810b302c1cc1cc578bdae3 (patch)
treedebe53d5a4c8d5a904b5487d632995bbab5a11a2 /apps/examples
parent47b94bafa5045532f239ea57a3610873b1a71368 (diff)
downloadpx4-firmware-e96d8f046b6bce6c4e810b302c1cc1cc578bdae3.tar.gz
px4-firmware-e96d8f046b6bce6c4e810b302c1cc1cc578bdae3.tar.bz2
px4-firmware-e96d8f046b6bce6c4e810b302c1cc1cc578bdae3.zip
Add a start hook that can be setup to call a function in the context of a new thread before the new threads main() has been called.
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5571 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/examples')
-rw-r--r--apps/examples/elf/tests/signal/signal.c2
-rw-r--r--apps/examples/nxflat/tests/signal/signal.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/apps/examples/elf/tests/signal/signal.c b/apps/examples/elf/tests/signal/signal.c
index b40da7a86..d43f012cb 100644
--- a/apps/examples/elf/tests/signal/signal.c
+++ b/apps/examples/elf/tests/signal/signal.c
@@ -161,7 +161,7 @@ int main(int argc, char **argv)
/* Send SIGUSR1 to ourselves via kill() */
printf("Kill-ing SIGUSR1 from pid=%d\n", mypid);
- status = kill(0, SIGUSR1);
+ status = kill(mypid, SIGUSR1);
if (status != 0)
{
fprintf(stderr, "Failed to kill SIGUSR1, errno=%d\n", errno);
diff --git a/apps/examples/nxflat/tests/signal/signal.c b/apps/examples/nxflat/tests/signal/signal.c
index c5ea6bdcc..ac03f6d33 100644
--- a/apps/examples/nxflat/tests/signal/signal.c
+++ b/apps/examples/nxflat/tests/signal/signal.c
@@ -161,7 +161,7 @@ int main(int argc, char **argv)
/* Send SIGUSR1 to ourselves via kill() */
printf("Kill-ing SIGUSR1 from pid=%d\n", mypid);
- status = kill(0, SIGUSR1);
+ status = kill(mypid, SIGUSR1);
if (status != 0)
{
fprintf(stderr, "Failed to kill SIGUSR1, errno=%d\n", errno);