From 8cad4a664b6745ba30bcc8c08c8754f6a51a6383 Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 27 Nov 2012 17:22:32 +0000 Subject: Fix backward conditional compilation in work_queue.c git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5394 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/ChangeLog | 3 +++ nuttx/configs/z8f64200100kit/ostest/Make.defs | 4 ++-- nuttx/sched/work_thread.c | 6 +++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index 810e0eb40..4b0992680 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -3700,3 +3700,6 @@ * cloudctrl/src/up_chipid.c and shenzhou/src/up_chipid.c: Add functions to get chip ID. Contributed by Darcy Gong. These should not be board-dependent, but should be in arch/arm/src/stm32 where they can be used from any board. + * sched/work_thread.c: Fix backward conditional compilation. This might + has caused a memory leadk. From Freddie Chopin. + diff --git a/nuttx/configs/z8f64200100kit/ostest/Make.defs b/nuttx/configs/z8f64200100kit/ostest/Make.defs index 80a79eca4..05c2b1593 100644 --- a/nuttx/configs/z8f64200100kit/ostest/Make.defs +++ b/nuttx/configs/z8f64200100kit/ostest/Make.defs @@ -41,7 +41,7 @@ include $(TOPDIR)/tools/Config.mk ZDSVERSION := 5.0.0 ifeq ($(CONFIG_WINDOWS_NATIVE),y) - ZDSINSTALLDIR := C:/PROGRA~2/ZiLOG/ZZDSII_Z8Encore!_$(ZDSVERSION) + ZDSINSTALLDIR := C:/PROGRA~2/ZiLOG/ZDSII_Z8Encore!_$(ZDSVERSION) INSTALLDIR = ${shell echo $(ZDSINSTALLDIR)| sed -e "s/\//\\/g"} ZDSBINDIR := $(INSTALLDIR)\bin ZDSSTDINCDIR := $(INSTALLDIR)\include\std @@ -63,7 +63,7 @@ endif ARCHUSRINCLUDES = -usrinc:. else WINTOOL := y - ZDSINSTALLDIR := C:/Program Files (x86)/ZiLOG/ZZDSII_Z8Encore!_$(ZDSVERSION) + ZDSINSTALLDIR := C:/Program Files (x86)/ZiLOG/ZDSII_Z8Encore!_$(ZDSVERSION) INSTALLDIR = ${shell cygpath -u "$(ZDSINSTALLDIR)"} ZDSBINDIR := $(INSTALLDIR)/bin ZDSSTDINCDIR := $(INSTALLDIR)/include/std diff --git a/nuttx/sched/work_thread.c b/nuttx/sched/work_thread.c index abd86f771..5646b06a1 100644 --- a/nuttx/sched/work_thread.c +++ b/nuttx/sched/work_thread.c @@ -208,10 +208,10 @@ int work_hpthread(int argc, char *argv[]) * that were queued because they could not be freed in that execution * context (for example, if the memory was freed from an interrupt handler). * NOTE: If the work thread is disabled, this clean-up is performed by - * the IDLE thread (at a very, very lower priority). + * the IDLE thread (at a very, very low priority). */ -#ifdef CONFIG_SCHED_LPWORK +#ifndef CONFIG_SCHED_LPWORK sched_garbagecollection(); #endif @@ -236,7 +236,7 @@ int work_lpthread(int argc, char *argv[]) * that were queued because they could not be freed in that execution * context (for example, if the memory was freed from an interrupt handler). * NOTE: If the work thread is disabled, this clean-up is performed by - * the IDLE thread (at a very, very lower priority). + * the IDLE thread (at a very, very low priority). */ sched_garbagecollection(); -- cgit v1.2.3