diff --git a/Documentation/NuttX.html b/Documentation/NuttX.html index 5721c5eff2b823d22f1b7edcc3d94bf9e321fe6b..891e619bb094d08905ff8fcb99804a9f5457473b 100644 --- a/Documentation/NuttX.html +++ b/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 <spudmonkey@racsa.co.cr> 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 <spudmonkey@racsa.co.cr> @@ -2228,6 +2237,9 @@ buildroot-1.10 2011-xx-xx <spudmonkey@racsa.co.cr> * 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/arch/avr/src/Makefile b/arch/avr/src/Makefile index 531a2100d99556afd380d2f41fcbcf60b74fec0d..1704aad622f2aa3882ab1b2e93da22da8db837e0 100644 --- a/arch/avr/src/Makefile +++ b/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/arch/hc/src/common/up_doirq.c b/arch/hc/src/common/up_doirq.c index adb3f81ce84c07e7fdba8bd68e4d360f008c18fd..4fc52224ef52abd1b5bcdd88f2a70196bc7f72b2 100644 --- a/arch/hc/src/common/up_doirq.c +++ b/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/arch/hc/src/common/up_internal.h b/arch/hc/src/common/up_internal.h index 1a30f28e5d46908ceb00c6a50f24799d8ea98efe..efc4ce4b0b0ebc196afeb86fd31a7a7baf8a415e 100755 --- a/arch/hc/src/common/up_internal.h +++ b/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/include/nuttx/sched.h b/include/nuttx/sched.h index 1b5d28f82b959f9c6db6dd6c02ee34da7ee469bf..78e6f6b378af296ebbf98c076111e981ce9a4cb8 100644 --- a/include/nuttx/sched.h +++ b/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/sched/exit.c b/sched/exit.c index 93e24a29d03ac074d729d95ad4716a76863777a2..6793eae77a166382172bec7f63efda722765f18c 100644 --- a/sched/exit.c +++ b/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/sched/pthread_create.c b/sched/pthread_create.c index d1f838a9e77b63c1658375cb5623f0897d281b48..e247ce372f4e93f800bfabbb27711aa7d3a3674a 100644 --- a/sched/pthread_create.c +++ b/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/sched/sched_releasetcb.c b/sched/sched_releasetcb.c index 2be77b77be4a93c6931ccc923eaa40990b3da19d..5fd50900699c227682f9b8e64551c97b4cb22603 100644 --- a/sched/sched_releasetcb.c +++ b/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++) {