aboutsummaryrefslogtreecommitdiff
path: root/nuttx/sched
diff options
context:
space:
mode:
authorpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2012-05-02 15:36:19 +0000
committerpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2012-05-02 15:36:19 +0000
commit882448de92cd793aa01c2a4d585d02306411e7ed (patch)
tree2068f6956ceee5aba740da5acb8f97858e2b3f8a /nuttx/sched
parentd7c6496584fdbe590ee33f8e8759eec849612f73 (diff)
downloadpx4-firmware-882448de92cd793aa01c2a4d585d02306411e7ed.tar.gz
px4-firmware-882448de92cd793aa01c2a4d585d02306411e7ed.tar.bz2
px4-firmware-882448de92cd793aa01c2a4d585d02306411e7ed.zip
Fix some warnings and fix some simulator builds
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4688 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'nuttx/sched')
-rw-r--r--nuttx/sched/prctl.c2
-rw-r--r--nuttx/sched/pthread_exit.c5
-rw-r--r--nuttx/sched/sem_open.c4
-rw-r--r--nuttx/sched/sig_deliver.c11
-rw-r--r--nuttx/sched/wd_start.c11
5 files changed, 10 insertions, 23 deletions
diff --git a/nuttx/sched/prctl.c b/nuttx/sched/prctl.c
index bc55992b4..817083561 100644
--- a/nuttx/sched/prctl.c
+++ b/nuttx/sched/prctl.c
@@ -140,7 +140,7 @@ int prctl(int option, ...)
/* The returned value will be null-terminated, truncating if necessary */
strncpy(name, tcb->name, CONFIG_TASK_NAME_SIZE-1);
- name[CONFIG_TASK_NAME_SIZE-1];
+ name[CONFIG_TASK_NAME_SIZE-1] = '\0';
}
}
break;
diff --git a/nuttx/sched/pthread_exit.c b/nuttx/sched/pthread_exit.c
index 31ac62362..b8183142a 100644
--- a/nuttx/sched/pthread_exit.c
+++ b/nuttx/sched/pthread_exit.c
@@ -1,7 +1,7 @@
/************************************************************************
* sched/pthread_exit.c
*
- * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007, 2009, 2011-2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -39,6 +39,7 @@
#include <nuttx/config.h>
+#include <stdint.h>
#include <stdlib.h>
#include <unistd.h>
#include <signal.h>
@@ -92,7 +93,7 @@
void pthread_exit(FAR void *exit_value)
{
- int error_code = (int)exit_value;
+ int error_code = (int)((intptr_t)exit_value);
int status;
sdbg("exit_value=%p\n", exit_value);
diff --git a/nuttx/sched/sem_open.c b/nuttx/sched/sem_open.c
index cd9ca6129..d5b22f018 100644
--- a/nuttx/sched/sem_open.c
+++ b/nuttx/sched/sem_open.c
@@ -1,8 +1,8 @@
/****************************************************************************
* sched/sem_open.c
*
- * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Copyright (C) 2007, 2008, 2012 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/sig_deliver.c b/nuttx/sched/sig_deliver.c
index 2244ca2fe..bbfe0965c 100644
--- a/nuttx/sched/sig_deliver.c
+++ b/nuttx/sched/sig_deliver.c
@@ -1,8 +1,8 @@
/****************************************************************************
* sched/sig_deliver.c
*
- * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Copyright (C) 2007, 2008, 2012 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
@@ -86,7 +86,6 @@
void sig_deliver(FAR _TCB *stcb)
{
- pid_t rpid;
FAR sigq_t *sigq;
FAR sigq_t *next;
sigset_t savesigprocmask;
@@ -129,12 +128,6 @@ void sig_deliver(FAR _TCB *stcb)
savesigprocmask = stcb->sigprocmask;
stcb->sigprocmask = savesigprocmask | sigq->mask | SIGNO2SET(sigq->info.si_signo);
- /* The current tasks process.ID. We'll need this later to see if
- * the signal handler caused a context switch.
- */
-
- rpid = getpid();
-
/* Deliver the signal */
(*sigq->action.sighandler)(sigq->info.si_signo, &sigq->info, NULL);
diff --git a/nuttx/sched/wd_start.c b/nuttx/sched/wd_start.c
index 1f37dbf99..a2f19fbdc 100644
--- a/nuttx/sched/wd_start.c
+++ b/nuttx/sched/wd_start.c
@@ -1,8 +1,8 @@
/****************************************************************************
* sched/wd_start.c
*
- * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Copyright (C) 2007-2009, 2012 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
@@ -294,7 +294,6 @@ int wd_start(WDOG_ID wdog, int delay, wdentry_t wdentry, int argc, ...)
void wd_timer(void)
{
- pid_t pid;
FAR wdog_t *wdog;
/* Check if there are any active watchdogs to process */
@@ -333,12 +332,6 @@ void wd_timer(void)
wdog->active = false;
- /* Get the current task's process ID. We'll need this later to
- * see if the watchdog function caused a context switch.
- */
-
- pid = getpid();
-
/* Execute the watchdog function */
up_setpicbase(wdog->picbase);