aboutsummaryrefslogtreecommitdiff
path: root/nuttx/sched
diff options
context:
space:
mode:
authorpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2011-12-26 16:24:43 +0000
committerpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2011-12-26 16:24:43 +0000
commit8f88c268c2e343fee167be7ccaba5520532faad1 (patch)
treee948ed86f4ebc9b8772c7a660ce0c1cc5df03196 /nuttx/sched
parent49a51cb0f169386de168bcc6c70c35c3be6b781c (diff)
downloadpx4-firmware-8f88c268c2e343fee167be7ccaba5520532faad1.tar.gz
px4-firmware-8f88c268c2e343fee167be7ccaba5520532faad1.tar.bz2
px4-firmware-8f88c268c2e343fee167be7ccaba5520532faad1.zip
Fix an PIC32 error in scheduling of signal handlers
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4229 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'nuttx/sched')
-rw-r--r--nuttx/sched/pthread_completejoin.c10
-rw-r--r--nuttx/sched/pthread_exit.c8
-rw-r--r--nuttx/sched/pthread_join.c4
-rw-r--r--nuttx/sched/pthread_kill.c8
-rw-r--r--nuttx/sched/sig_kill.c2
-rw-r--r--nuttx/sched/sig_received.c2
6 files changed, 18 insertions, 16 deletions
diff --git a/nuttx/sched/pthread_completejoin.c b/nuttx/sched/pthread_completejoin.c
index fff3b46cf..fa7c2a443 100644
--- a/nuttx/sched/pthread_completejoin.c
+++ b/nuttx/sched/pthread_completejoin.c
@@ -1,8 +1,8 @@
/************************************************************************
* sched/pthread_completejoin.c
*
- * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved.
+ * 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
@@ -83,7 +83,7 @@ static bool pthread_notifywaiters(FAR join_t *pjoin)
int ntasks_waiting;
int status;
- sdbg("pjoin=0x%p\n", pjoin);
+ svdbg("pjoin=0x%p\n", pjoin);
/* Are any tasks waiting for our exit value? */
@@ -148,7 +148,7 @@ int pthread_completejoin(pid_t pid, FAR void *exit_value)
{
FAR join_t *pjoin;
- sdbg("process_id=%d exit_value=%p\n", pid, exit_value);
+ svdbg("pid=%d exit_value=%p\n", pid, exit_value);
/* First, find thread's structure in the private data set. */
@@ -156,7 +156,7 @@ int pthread_completejoin(pid_t pid, FAR void *exit_value)
pjoin = pthread_findjoininfo(pid);
if (!pjoin)
{
-
+ sdbg("Could not find join info, pid=%d\n", pid);
(void)pthread_givesemaphore(&g_join_semaphore);
return ERROR;
}
diff --git a/nuttx/sched/pthread_exit.c b/nuttx/sched/pthread_exit.c
index c320bbb10..31ac62362 100644
--- a/nuttx/sched/pthread_exit.c
+++ b/nuttx/sched/pthread_exit.c
@@ -1,8 +1,8 @@
/************************************************************************
* sched/pthread_exit.c
*
- * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved.
+ * 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
@@ -45,7 +45,9 @@
#include <pthread.h>
#include <errno.h>
#include <debug.h>
+
#include <nuttx/arch.h>
+
#include "pthread_internal.h"
/************************************************************************
@@ -111,7 +113,7 @@ void pthread_exit(FAR void *exit_value)
status = pthread_completejoin(getpid(), exit_value);
if (status != OK)
{
- /* Assume that the join completion failured becuase this
+ /* Assume that the join completion failured because this
* not really a pthread. Exit by calling exit() to flush
* and close all file descriptors and calling atexit()
* functions.
diff --git a/nuttx/sched/pthread_join.c b/nuttx/sched/pthread_join.c
index 4684b4f98..b4f60a7c9 100644
--- a/nuttx/sched/pthread_join.c
+++ b/nuttx/sched/pthread_join.c
@@ -1,8 +1,8 @@
/****************************************************************************
* pthread_join.c
*
- * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved.
+ * 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
diff --git a/nuttx/sched/pthread_kill.c b/nuttx/sched/pthread_kill.c
index 171b30942..f876220f7 100644
--- a/nuttx/sched/pthread_kill.c
+++ b/nuttx/sched/pthread_kill.c
@@ -1,8 +1,8 @@
/************************************************************************
* sched/pthread_kill.c
*
- * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved.
+ * 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
@@ -83,11 +83,11 @@ int pthread_kill(pthread_t thread, int signo)
{
int ret;
- *get_errno_ptr() = EINVAL;
+ set_errno(EINVAL);
ret = kill((pid_t)thread, signo);
if (ret != OK)
{
- ret = *get_errno_ptr();
+ ret = get_errno();
}
return ret;
}
diff --git a/nuttx/sched/sig_kill.c b/nuttx/sched/sig_kill.c
index 5e9125088..1573a17a9 100644
--- a/nuttx/sched/sig_kill.c
+++ b/nuttx/sched/sig_kill.c
@@ -2,7 +2,7 @@
* sched/sig_kill.c
*
* Copyright (C) 2007, 2009, 2011 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
diff --git a/nuttx/sched/sig_received.c b/nuttx/sched/sig_received.c
index 26727dfbc..f92e07146 100644
--- a/nuttx/sched/sig_received.c
+++ b/nuttx/sched/sig_received.c
@@ -2,7 +2,7 @@
* sched/sig_received.c
*
* Copyright (C) 2007, 2009, 2011 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