summaryrefslogtreecommitdiff
path: root/nuttx/sched
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-12-13 18:01:46 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-12-13 18:01:46 +0000
commitea45a3718fc280b291b2f45d467a2494973636fa (patch)
tree446e7ccffd35a3baa2afefa3afc05ba6fdd09427 /nuttx/sched
parentc37fdc28c2cfdf41a549ba245c1cad85b757e53a (diff)
downloadpx4-nuttx-ea45a3718fc280b291b2f45d467a2494973636fa.tar.gz
px4-nuttx-ea45a3718fc280b291b2f45d467a2494973636fa.tar.bz2
px4-nuttx-ea45a3718fc280b291b2f45d467a2494973636fa.zip
types blkcnt_t and off_t should not depend on memory model; Remove non-standard type STATUS
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2330 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/sched')
-rw-r--r--nuttx/sched/os_internal.h6
-rw-r--r--nuttx/sched/pthread_create.c2
-rw-r--r--nuttx/sched/sched_lock.c48
-rw-r--r--nuttx/sched/sched_unlock.c48
-rw-r--r--nuttx/sched/sem_post.c2
-rw-r--r--nuttx/sched/task_activate.c2
-rw-r--r--nuttx/sched/task_create.c4
-rw-r--r--nuttx/sched/task_delete.c6
-rw-r--r--nuttx/sched/task_deletecurrent.c4
-rw-r--r--nuttx/sched/task_init.c14
-rw-r--r--nuttx/sched/task_restart.c4
-rw-r--r--nuttx/sched/task_setup.c11
-rw-r--r--nuttx/sched/wd_cancel.c6
-rw-r--r--nuttx/sched/wd_delete.c6
-rw-r--r--nuttx/sched/wd_start.c2
15 files changed, 82 insertions, 83 deletions
diff --git a/nuttx/sched/os_internal.h b/nuttx/sched/os_internal.h
index 84a2997c7..a7b55acfd 100644
--- a/nuttx/sched/os_internal.h
+++ b/nuttx/sched/os_internal.h
@@ -239,11 +239,11 @@ extern const tasklist_t g_tasklisttable[NUM_TASK_STATES];
****************************************************************************/
extern void task_start(void);
-extern STATUS task_schedsetup(FAR _TCB *tcb, int priority,
+extern int task_schedsetup(FAR _TCB *tcb, int priority,
start_t start, main_t main);
-extern STATUS task_argsetup(FAR _TCB *tcb, const char *name,
+extern int task_argsetup(FAR _TCB *tcb, const char *name,
const char *argv[]);
-extern STATUS task_deletecurrent(void);
+extern int task_deletecurrent(void);
extern boolean sched_addreadytorun(FAR _TCB *rtrtcb);
extern boolean sched_removereadytorun(FAR _TCB *rtrtcb);
diff --git a/nuttx/sched/pthread_create.c b/nuttx/sched/pthread_create.c
index 836b422c6..4f3d05bdc 100644
--- a/nuttx/sched/pthread_create.c
+++ b/nuttx/sched/pthread_create.c
@@ -247,7 +247,7 @@ int pthread_create(FAR pthread_t *thread, FAR pthread_attr_t *attr,
{
FAR _TCB *ptcb;
FAR join_t *pjoin;
- STATUS status;
+ int status;
int priority;
#if CONFIG_RR_INTERVAL > 0
int policy;
diff --git a/nuttx/sched/sched_lock.c b/nuttx/sched/sched_lock.c
index 344d3d75b..5cddc436e 100644
--- a/nuttx/sched/sched_lock.c
+++ b/nuttx/sched/sched_lock.c
@@ -1,7 +1,7 @@
-/************************************************************
- * sched_lock.c
+/************************************************************************
+ * sched/sched_lock.c
*
- * Copyright (C) 2007 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -14,7 +14,7 @@
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
- * 3. Neither the name Gregory Nutt nor the names of its contributors may be
+ * 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
@@ -31,11 +31,11 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
- ************************************************************/
+ ************************************************************************/
-/************************************************************
+/************************************************************************
* Included Files
- ************************************************************/
+ ************************************************************************/
#include <nuttx/config.h>
#include <sys/types.h>
@@ -44,35 +44,35 @@
#include <nuttx/arch.h>
#include "os_internal.h"
-/************************************************************
+/************************************************************************
* Definitions
- ************************************************************/
+ ************************************************************************/
-/************************************************************
+/************************************************************************
* Private Type Declarations
- ************************************************************/
+ ************************************************************************/
-/************************************************************
+/************************************************************************
* Global Variables
- ************************************************************/
+ ************************************************************************/
-/************************************************************
+/************************************************************************
* Private Variables
- ************************************************************/
+ ************************************************************************/
-/************************************************************
+/************************************************************************
* Private Function Prototypes
- ************************************************************/
+ ************************************************************************/
-/************************************************************
+/************************************************************************
* Private Functionss
- ************************************************************/
+ ************************************************************************/
-/************************************************************
+/************************************************************************
* Public Functions
- ************************************************************/
+ ************************************************************************/
-/************************************************************
+/************************************************************************
* Name: sched_lock
*
* Description:
@@ -89,9 +89,9 @@
* Return Value:
* OK on success; ERROR on failure
*
- ************************************************************/
+ ************************************************************************/
-STATUS sched_lock(void)
+int sched_lock(void)
{
_TCB *rtcb = (_TCB*)g_readytorun.head;
diff --git a/nuttx/sched/sched_unlock.c b/nuttx/sched/sched_unlock.c
index 073f5e31f..1d56b07e7 100644
--- a/nuttx/sched/sched_unlock.c
+++ b/nuttx/sched/sched_unlock.c
@@ -1,7 +1,7 @@
-/************************************************************
- * sched_unlock.c
+/************************************************************************
+ * sched/sched_unlock.c
*
- * Copyright (C) 2007 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -14,7 +14,7 @@
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
- * 3. Neither the name Gregory Nutt nor the names of its contributors may be
+ * 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
@@ -31,46 +31,46 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
- ************************************************************/
+ ************************************************************************/
-/************************************************************
+/************************************************************************
* Included Files
- ************************************************************/
+ ************************************************************************/
#include <nuttx/config.h>
#include <sys/types.h>
#include <nuttx/arch.h>
#include "os_internal.h"
-/************************************************************
+/************************************************************************
* Definitions
- ************************************************************/
+ ************************************************************************/
-/************************************************************
+/************************************************************************
* Private Type Declarations
- ************************************************************/
+ ************************************************************************/
-/************************************************************
+/************************************************************************
* Global Variables
- ************************************************************/
+ ************************************************************************/
-/************************************************************
+/************************************************************************
* Private Variables
- ************************************************************/
+ ************************************************************************/
-/************************************************************
+/************************************************************************
* Private Function Prototypes
- ************************************************************/
+ ************************************************************************/
-/************************************************************
+/************************************************************************
* Private Functionss
- ************************************************************/
+ ************************************************************************/
-/************************************************************
+/************************************************************************
* Public Functions
- ************************************************************/
+ ************************************************************************/
-/************************************************************
+/************************************************************************
* Name: sched_unlock
*
* Description: This function decrements the preemption lock
@@ -80,9 +80,9 @@
* times as sched_lock(). When the lockcount is decremented
* to zero, any tasks that were eligible to preempt the
* current task will execute.
- ************************************************************/
+ ************************************************************************/
-STATUS sched_unlock(void)
+int sched_unlock(void)
{
_TCB *rtcb = (_TCB*)g_readytorun.head;
diff --git a/nuttx/sched/sem_post.c b/nuttx/sched/sem_post.c
index 3c5ccaf77..bed58f6bc 100644
--- a/nuttx/sched/sem_post.c
+++ b/nuttx/sched/sem_post.c
@@ -101,7 +101,7 @@
int sem_post(FAR sem_t *sem)
{
FAR _TCB *stcb = NULL;
- STATUS ret = ERROR;
+ int ret = ERROR;
irqstate_t saved_state;
/* Make sure we were supplied with a valid semaphore. */
diff --git a/nuttx/sched/task_activate.c b/nuttx/sched/task_activate.c
index e324e17a3..12038960f 100644
--- a/nuttx/sched/task_activate.c
+++ b/nuttx/sched/task_activate.c
@@ -88,7 +88,7 @@
*
****************************************************************************/
-STATUS task_activate(FAR _TCB *tcb)
+int task_activate(FAR _TCB *tcb)
{
irqstate_t flags = irqsave();
diff --git a/nuttx/sched/task_create.c b/nuttx/sched/task_create.c
index 5d7a5872b..247183eca 100644
--- a/nuttx/sched/task_create.c
+++ b/nuttx/sched/task_create.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * task_create.c
+ * sched/task_create.c
*
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
@@ -116,7 +116,7 @@ int task_create(const char *name, int priority,
#endif
{
FAR _TCB *tcb;
- STATUS status;
+ int status;
pid_t pid;
/* Allocate a TCB for the new task. */
diff --git a/nuttx/sched/task_delete.c b/nuttx/sched/task_delete.c
index 369f601ed..683fbd18d 100644
--- a/nuttx/sched/task_delete.c
+++ b/nuttx/sched/task_delete.c
@@ -1,7 +1,7 @@
/****************************************************************************
* sched/task_delete.c
*
- * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -93,12 +93,12 @@
*
****************************************************************************/
-STATUS task_delete(pid_t pid)
+int task_delete(pid_t pid)
{
FAR _TCB *rtcb;
FAR _TCB *dtcb;
irqstate_t saved_state;
- STATUS ret = ERROR;
+ int ret = ERROR;
/* Check if the task to delete is the calling task */
diff --git a/nuttx/sched/task_deletecurrent.c b/nuttx/sched/task_deletecurrent.c
index 8246bb471..4de621b2a 100644
--- a/nuttx/sched/task_deletecurrent.c
+++ b/nuttx/sched/task_deletecurrent.c
@@ -1,7 +1,7 @@
/****************************************************************************
* sched/task_deletecurrent.c
*
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -93,7 +93,7 @@
*
****************************************************************************/
-STATUS task_deletecurrent(void)
+int task_deletecurrent(void)
{
FAR _TCB *dtcb = (FAR _TCB*)g_readytorun.head;
FAR _TCB *rtcb;
diff --git a/nuttx/sched/task_init.c b/nuttx/sched/task_init.c
index 6d5395594..6c70bf435 100644
--- a/nuttx/sched/task_init.c
+++ b/nuttx/sched/task_init.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * task_init.c
+ * sched/task_init.c
*
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
@@ -108,15 +108,15 @@
****************************************************************************/
#ifndef CONFIG_CUSTOM_STACK
-STATUS task_init(FAR _TCB *tcb, const char *name, int priority,
- FAR uint32 *stack, uint32 stack_size,
- main_t entry, const char *argv[])
+int task_init(FAR _TCB *tcb, const char *name, int priority,
+ FAR uint32 *stack, uint32 stack_size,
+ main_t entry, const char *argv[])
#else
-STATUS task_init(FAR _TCB *tcb, const char *name, int priority,
- main_t entry, const char *argv[])
+int task_init(FAR _TCB *tcb, const char *name, int priority,
+ main_t entry, const char *argv[])
#endif
{
- STATUS ret;
+ int ret;
/* Associate file descriptors with the new task */
diff --git a/nuttx/sched/task_restart.c b/nuttx/sched/task_restart.c
index 00b8bf0a8..1cd575a4e 100644
--- a/nuttx/sched/task_restart.c
+++ b/nuttx/sched/task_restart.c
@@ -96,11 +96,11 @@
*
****************************************************************************/
-STATUS task_restart(pid_t pid)
+int task_restart(pid_t pid)
{
FAR _TCB *rtcb;
FAR _TCB *tcb;
- STATUS status;
+ int status;
irqstate_t state;
/* Make sure this task does not become ready-to-run while
diff --git a/nuttx/sched/task_setup.c b/nuttx/sched/task_setup.c
index 83bae570b..f54796e59 100644
--- a/nuttx/sched/task_setup.c
+++ b/nuttx/sched/task_setup.c
@@ -70,7 +70,7 @@ static const char g_noname[] = "<noname>";
* Private Function Prototypes
****************************************************************************/
-static STATUS task_assignpid(FAR _TCB* tcb);
+static int task_assignpid(FAR _TCB* tcb);
/****************************************************************************
* Private Functions
@@ -90,7 +90,7 @@ static STATUS task_assignpid(FAR _TCB* tcb);
*
****************************************************************************/
-static STATUS task_assignpid(FAR _TCB *tcb)
+static int task_assignpid(FAR _TCB *tcb)
{
pid_t next_pid;
int hash_ndx;
@@ -207,10 +207,9 @@ static inline void task_dupdspace(FAR _TCB *tcb)
*
****************************************************************************/
-STATUS task_schedsetup(FAR _TCB *tcb, int priority,
- start_t start, main_t main)
+int task_schedsetup(FAR _TCB *tcb, int priority, start_t start, main_t main)
{
- STATUS ret;
+ int ret;
/* Assign a unique task ID to the task. */
@@ -289,7 +288,7 @@ STATUS task_schedsetup(FAR _TCB *tcb, int priority,
*
****************************************************************************/
-STATUS task_argsetup(FAR _TCB *tcb, const char *name, const char *argv[])
+int task_argsetup(FAR _TCB *tcb, const char *name, const char *argv[])
{
int i;
diff --git a/nuttx/sched/wd_cancel.c b/nuttx/sched/wd_cancel.c
index 9bdeafcf8..acf957163 100644
--- a/nuttx/sched/wd_cancel.c
+++ b/nuttx/sched/wd_cancel.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * wd_cancel.c
+ * sched/wd_cancel.c
*
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
@@ -85,12 +85,12 @@
*
****************************************************************************/
-STATUS wd_cancel (WDOG_ID wdid)
+int wd_cancel (WDOG_ID wdid)
{
wdog_t *curr;
wdog_t *prev;
irqstate_t saved_state;
- STATUS ret = ERROR;
+ int ret = ERROR;
/* Prohibit timer interactions with the timer queue until the
* cancellation is complete
diff --git a/nuttx/sched/wd_delete.c b/nuttx/sched/wd_delete.c
index 25f2db8ab..eebfc0dc8 100644
--- a/nuttx/sched/wd_delete.c
+++ b/nuttx/sched/wd_delete.c
@@ -1,7 +1,7 @@
/****************************************************************************
- * wd_delete.c
+ * sched/wd_delete.c
*
- * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -92,7 +92,7 @@
*
****************************************************************************/
-STATUS wd_delete(WDOG_ID wdId)
+int wd_delete(WDOG_ID wdId)
{
irqstate_t saved_state;
diff --git a/nuttx/sched/wd_start.c b/nuttx/sched/wd_start.c
index a406b3f30..39525c0bc 100644
--- a/nuttx/sched/wd_start.c
+++ b/nuttx/sched/wd_start.c
@@ -125,7 +125,7 @@ typedef void (*wdentry4_t)(int argc, uint32 arg1, uint32 arg2,
*
****************************************************************************/
-STATUS wd_start(WDOG_ID wdog, int delay, wdentry_t wdentry, int argc, ...)
+int wd_start(WDOG_ID wdog, int delay, wdentry_t wdentry, int argc, ...)
{
va_list ap;
FAR wdog_t *curr;