summaryrefslogtreecommitdiff
path: root/nuttx
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx')
-rw-r--r--nuttx/Documentation/NuttX.html14
-rw-r--r--nuttx/arch/avr/src/Makefile5
-rw-r--r--nuttx/arch/hc/src/common/up_doirq.c2
-rwxr-xr-xnuttx/arch/hc/src/common/up_internal.h2
-rw-r--r--nuttx/include/nuttx/sched.h12
-rw-r--r--nuttx/sched/exit.c2
-rw-r--r--nuttx/sched/pthread_create.c2
-rw-r--r--nuttx/sched/sched_releasetcb.c6
8 files changed, 29 insertions, 16 deletions
diff --git a/nuttx/Documentation/NuttX.html b/nuttx/Documentation/NuttX.html
index 5721c5eff..891e619bb 100644
--- a/nuttx/Documentation/NuttX.html
+++ b/nuttx/Documentation/NuttX.html
@@ -8,7 +8,7 @@
<tr align="center" bgcolor="#e4e4e4">
<td>
<h1><big><font color="#3c34ec"><i>NuttX RTOS</i></font></big></h1>
- <p>Last Updated: April 3, 2011</p>
+ <p>Last Updated: April 6, 2011</p>
</td>
</tr>
</table>
@@ -2201,6 +2201,15 @@ nuttx-6.1 2011-xx-xx Gregory Nutt &lt;spudmonkey@racsa.co.cr&gt;
separately linked images: (1) a kernel-mode RTOS image, and (2) a user-
mode application image that communicates to the RTOS kernel via system
calls. A lot more still must be done.
+ * user_initialize(): Eliminated the user_initialize() initialization hook.
+ It is difficult to maintain and redundant: Board level initialization
+ an up_initialize() provide the same kind of capability.
+ * arch/*/include/*/type.h: On some compilers, char defaults as unsigned.
+ Explicitly add signed to integer types if signed is what is required.
+ * arch/*: For all architectures -- Global register state save structure
+ (usually called current_regs) should be marked volatile; Added general
+ capability to support nested interrupts (not fully realized for all
+ architectures).
apps-6.1 2011-xx-xx Gregory Nutt &lt;spudmonkey@racsa.co.cr&gt;
@@ -2228,6 +2237,9 @@ buildroot-1.10 2011-xx-xx &lt;spudmonkey@racsa.co.cr&gt;
* Makefile - Alter copy arguements to avoid permissions problems when
copying NuttX header files.
* toolchain/nxflat/nxflat.mk and Makefile - Fix include paths.
+ * toolchain/gcc/3.3.6 - Added a patch to fixed compilation error on Ubuntu
+ 9.10.
+
</pre></ul>
<table width ="100%">
diff --git a/nuttx/arch/avr/src/Makefile b/nuttx/arch/avr/src/Makefile
index 531a2100d..1704aad62 100644
--- a/nuttx/arch/avr/src/Makefile
+++ b/nuttx/arch/avr/src/Makefile
@@ -108,11 +108,6 @@ nuttx: $(HEAD_AOBJ) board/libboard$(LIBEXT)
@echo "LD: nuttx"
@$(LD) --entry=__start $(LDFLAGS) $(LIBPATHS) -o $(NUTTX)$(EXEEXT) $(HEAD_AOBJ) $(EXTRA_OBJS) \
--start-group $(LDLIBS) -lboard --end-group $(EXTRA_LIBS) $(LIBGCC)
-ifeq ($(CONFIG_BOOT_RUNFROMFLASH),y)
- @export flashloc=`$(OBJDUMP) --all-headers $(NUTTX)$(EXEEXT) | grep _eronly | cut -d' ' -f1`; \
- $(OBJCOPY) $(OBJCOPYARGS) --adjust-section-vma=.data=0x$$flashloc $(NUTTX)$(EXEEXT) $(NUTTX).flashimage
- @mv $(NUTTX).flashimage $(NUTTX)$(EXEEXT)
-endif
@$(NM) $(NUTTX)$(EXEEXT) | \
grep -v '\(compiled\)\|\(\$(OBJEXT)$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
sort > $(TOPDIR)/System.map
diff --git a/nuttx/arch/hc/src/common/up_doirq.c b/nuttx/arch/hc/src/common/up_doirq.c
index adb3f81ce..4fc52224e 100644
--- a/nuttx/arch/hc/src/common/up_doirq.c
+++ b/nuttx/arch/hc/src/common/up_doirq.c
@@ -101,7 +101,7 @@ uint8_t *up_doirq(int irq, uint8_t *regs)
* switch occurred during interrupt processing.
*/
- regs = current_regs;
+ regs = (uint8_t*)current_regs;
/* Restore the previous value of current_regs. NULL would indicate that
* we are no longer in an interrupt handler. It will be non-NULL if we
diff --git a/nuttx/arch/hc/src/common/up_internal.h b/nuttx/arch/hc/src/common/up_internal.h
index 1a30f28e5..efc4ce4b0 100755
--- a/nuttx/arch/hc/src/common/up_internal.h
+++ b/nuttx/arch/hc/src/common/up_internal.h
@@ -101,7 +101,7 @@ typedef void (*up_vector_t)(void);
* structure. If is non-NULL only during interrupt processing.
*/
-extern uint8_t *current_regs;
+extern volatile uint8_t *current_regs;
/* This is the beginning of heap as provided from processor-specific logic.
* This is the first address in RAM after the loaded program+bss+idle stack.
diff --git a/nuttx/include/nuttx/sched.h b/nuttx/include/nuttx/sched.h
index 1b5d28f82..78e6f6b37 100644
--- a/nuttx/include/nuttx/sched.h
+++ b/nuttx/include/nuttx/sched.h
@@ -66,10 +66,14 @@
/* Values for the _TCB flags flag bits */
-#define TCB_FLAG_PTHREAD 0x0001 /* Thread is a pthread */
-#define TCB_FLAG_NONCANCELABLE 0x0002 /* Pthread is non-cancelable */
-#define TCB_FLAG_CANCEL_PENDING 0x0004 /* Pthread cancel is pending */
-#define TCB_FLAG_ROUND_ROBIN 0x0008 /* Round robin sched enabled */
+#define TCB_FLAG_TTYPE_SHIFT (0) /* Bits 0-1: thread type */
+#define TCB_FLAG_TTYPE_MASK (3 << TCB_FLAG_TTYPE_SHIFT)
+# define TCB_FLAG_TTYPE_TASK (0 << TCB_FLAG_TTYPE_SHIFT) /* Normal user task */
+# define TCB_FLAG_TTYPE_PTHREAD (1 << TCB_FLAG_TTYPE_SHIFT) /* User pthread */
+# define TCB_FLAG_TTYPE_KERNEL (2 << TCB_FLAG_TTYPE_SHIFT) /* Kernel thread */
+#define TCB_FLAG_NONCANCELABLE (1 << 2) /* Bit 2: Pthread is non-cancelable */
+#define TCB_FLAG_CANCEL_PENDING (1 << 3) /* Bit 3: Pthread cancel is pending */
+#define TCB_FLAG_ROUND_ROBIN (1 << 4) /* Bit 4: Round robin sched enabled */
/********************************************************************************
* Global Type Definitions
diff --git a/nuttx/sched/exit.c b/nuttx/sched/exit.c
index 93e24a29d..6793eae77 100644
--- a/nuttx/sched/exit.c
+++ b/nuttx/sched/exit.c
@@ -91,7 +91,9 @@
void exit(int status)
{
+#if CONFIG_NFILE_STREAMS > 0 || defined(CONFIG_SCHED_WAITPID) || defined(CONFIG_SCHED_ATEXIT)
_TCB *tcb = (_TCB*)g_readytorun.head;
+#endif
/* Only the lower 8 bits of the exit status are used */
diff --git a/nuttx/sched/pthread_create.c b/nuttx/sched/pthread_create.c
index d1f838a9e..e247ce372 100644
--- a/nuttx/sched/pthread_create.c
+++ b/nuttx/sched/pthread_create.c
@@ -354,7 +354,7 @@ int pthread_create(FAR pthread_t *thread, FAR pthread_attr_t *attr,
/* Mark this task as a pthread */
- ptcb->flags |= TCB_FLAG_PTHREAD;
+ ptcb->flags |= TCB_FLAG_TTYPE_PTHREAD;
/* Configure the TCB for a pthread receiving on parameter
* passed by value
diff --git a/nuttx/sched/sched_releasetcb.c b/nuttx/sched/sched_releasetcb.c
index 2be77b77b..5fd509006 100644
--- a/nuttx/sched/sched_releasetcb.c
+++ b/nuttx/sched/sched_releasetcb.c
@@ -151,11 +151,11 @@ int sched_releasetcb(FAR _TCB *tcb)
}
#endif
- /* Release command line arguments that were allocated
- * for task start/re-start.
+ /* Release command line arguments that were allocated for task
+ * start/re-start.
*/
- if ((tcb->flags & TCB_FLAG_PTHREAD) == 0)
+ if ((tcb->flags & TCB_FLAG_TTYPE_MASK) == TCB_FLAG_TTYPE_TASK)
{
for (i = 1; i < CONFIG_MAX_TASK_ARGS+1 && tcb->argv[i]; i++)
{