diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-05-02 15:36:19 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-05-02 15:36:19 +0000 |
commit | 5ebf11ee63f1baaf070fd8484d99362810cd5bcc (patch) | |
tree | 2068f6956ceee5aba740da5acb8f97858e2b3f8a /nuttx/sched | |
parent | addae64d8c028ffd2c3bb05ec7ebdd1a73720998 (diff) | |
download | px4-nuttx-5ebf11ee63f1baaf070fd8484d99362810cd5bcc.tar.gz px4-nuttx-5ebf11ee63f1baaf070fd8484d99362810cd5bcc.tar.bz2 px4-nuttx-5ebf11ee63f1baaf070fd8484d99362810cd5bcc.zip |
Fix some warnings and fix some simulator builds
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4688 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/sched')
-rw-r--r-- | nuttx/sched/prctl.c | 2 | ||||
-rw-r--r-- | nuttx/sched/pthread_exit.c | 5 | ||||
-rw-r--r-- | nuttx/sched/sem_open.c | 4 | ||||
-rw-r--r-- | nuttx/sched/sig_deliver.c | 11 | ||||
-rw-r--r-- | nuttx/sched/wd_start.c | 11 |
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); |