summaryrefslogtreecommitdiff
path: root/nuttx/include
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-01-30 18:49:31 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-01-30 18:49:31 +0000
commit013eef130f1bc2cab1e3f4022d8498fb98bb29bf (patch)
treea6455ca9fb6a1aaab3f305b1bf5e937bff704f59 /nuttx/include
parent802ee953dd39863a9b296d8ffbfcc428f2d6fc4f (diff)
downloadpx4-nuttx-013eef130f1bc2cab1e3f4022d8498fb98bb29bf.tar.gz
px4-nuttx-013eef130f1bc2cab1e3f4022d8498fb98bb29bf.tar.bz2
px4-nuttx-013eef130f1bc2cab1e3f4022d8498fb98bb29bf.zip
errno was clobbered by mm_trysemaphore when task exists
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@591 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include')
-rw-r--r--nuttx/include/nuttx/arch.h20
-rw-r--r--nuttx/include/nuttx/sched.h16
2 files changed, 18 insertions, 18 deletions
diff --git a/nuttx/include/nuttx/arch.h b/nuttx/include/nuttx/arch.h
index 3eef7b15d..2c83f1f2a 100644
--- a/nuttx/include/nuttx/arch.h
+++ b/nuttx/include/nuttx/arch.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * arch.h
+ * nuttx/arch.h
*
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
@@ -53,12 +53,12 @@
* Public Types
****************************************************************************/
+typedef CODE void (*sig_deliver_t)(FAR _TCB *tcb);
+
/****************************************************************************
* Public Variables
****************************************************************************/
-typedef CODE void (*sig_deliver_t)(FAR _TCB *tcb);
-
/****************************************************************************
* Public Function Prototypes
****************************************************************************/
@@ -291,12 +291,13 @@ EXTERN void up_reprioritize_rtr(FAR _TCB *tcb, ubyte priority);
*
* Description:
* This function causes the currently executing task to cease
- * to exist. This is a special case of task_delete().
+ * to exist. This is a special case of task_delete() where the task to
+ * be deleted is the currently executing task. It is more complex because
+ * a context switch must be perform to the the next ready to run task.
*
- * Unlike other UP APIs, this function may be called
- * directly from user programs in various states. The
- * implementation of this function should diable interrupts
- * before performing scheduling operations.
+ * Unlike other UP APIs, this function may be called directly from user
+ * programs in various states. The implementation of this function should
+ * disable interrupts before performing scheduling operations.
*
****************************************************************************/
/* Prototype is in unistd.h */
@@ -448,8 +449,7 @@ EXTERN void up_mdelay(unsigned int milliseconds);
EXTERN void up_udelay(unsigned int microseconds);
/****************************************************************************
- * Debug interfaces exported by the architecture-specific
- * logic
+ * Debug interfaces exported by the architecture-specific logic
****************************************************************************/
/****************************************************************************
diff --git a/nuttx/include/nuttx/sched.h b/nuttx/include/nuttx/sched.h
index 7386979c8..4548b3365 100644
--- a/nuttx/include/nuttx/sched.h
+++ b/nuttx/include/nuttx/sched.h
@@ -1,5 +1,5 @@
/********************************************************************************
- * sched.h
+ * nuttx/sched.h
*
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
@@ -83,22 +83,22 @@
enum tstate_e
{
- TSTATE_TASK_INVALID = 0, /* INVALID - TCB has not yet been initialized */
-
+ TSTATE_TASK_INVALID = 0, /* INVALID - The TCB is is not in a valid state
+ * (Uninitialized or between context switches) */
TSTATE_TASK_PENDING = 1, /* READY_TO_RUN - Pending preemption unlock */
TSTATE_TASK_READYTORUN = 2, /* READY-TO-RUN - But not running */
TSTATE_TASK_RUNNING = 3, /* READY_TO_RUN - And running */
- TSTATE_TASK_INACTIVE = 4, /* BLOCKED - Initialized but not yet activated */
- TSTATE_WAIT_SEM = 5 /* BLOCKED - Waiting for a semaphore */
+ TSTATE_TASK_INACTIVE = 4, /* BLOCKED - Initialized but not yet activated */
+ TSTATE_WAIT_SEM = 5 /* BLOCKED - Waiting for a semaphore */
#ifndef CONFIG_DISABLE_SIGNALS
,
- TSTATE_WAIT_SIG = 6 /* BLOCKED - Waiting for a signal */
+ TSTATE_WAIT_SIG = 6 /* BLOCKED - Waiting for a signal */
#endif
#ifndef CONFIG_DISABLE_MQUEUE
,
- TSTATE_WAIT_MQNOTEMPTY, /* BLOCKED - Waiting for a MQ to become not empty. */
- TSTATE_WAIT_MQNOTFULL /* BLOCKED - Waiting for a MQ to become not full. */
+ TSTATE_WAIT_MQNOTEMPTY, /* BLOCKED - Waiting for a MQ to become not empty. */
+ TSTATE_WAIT_MQNOTFULL /* BLOCKED - Waiting for a MQ to become not full. */
#endif
};
typedef enum tstate_e tstate_t;