diff options
-rw-r--r-- | nuttx/TODO | 22 | ||||
-rw-r--r-- | nuttx/arch/arm/src/Makefile | 2 | ||||
-rw-r--r-- | nuttx/arch/arm/src/stm32/Make.defs | 3 | ||||
-rw-r--r-- | nuttx/arch/arm/src/stm32/stm32_pm.h | 11 | ||||
-rw-r--r-- | nuttx/arch/arm/src/stm32/stm32_pmstandby.c | 7 | ||||
-rw-r--r-- | nuttx/arch/arm/src/stm32/stm32_pmstop.c | 7 | ||||
-rw-r--r-- | nuttx/arch/avr/src/Makefile | 2 | ||||
-rwxr-xr-x | nuttx/arch/hc/src/Makefile | 2 | ||||
-rw-r--r-- | nuttx/arch/mips/src/Makefile | 2 | ||||
-rw-r--r-- | nuttx/arch/sh/src/Makefile | 2 | ||||
-rw-r--r-- | nuttx/arch/x86/src/Makefile | 2 |
11 files changed, 39 insertions, 23 deletions
diff --git a/nuttx/TODO b/nuttx/TODO index 0baac17ab..f5dd64ddf 100644 --- a/nuttx/TODO +++ b/nuttx/TODO @@ -10,7 +10,7 @@ nuttx/ (1) On-demand paging (sched/) (1) Memory Managment (mm/) (2) Signals (sched/, arch/) - (1) pthreads (sched/) + (2) pthreads (sched/) (2) C++ Support (5) Binary loaders (binfmt/) (17) Network (net/, drivers/net) @@ -190,6 +190,26 @@ o pthreads (sched/) Status: Open Priority: Low, probably not that useful + Title: PTHREAD_PRIO_PROTECT + Extended pthread_mutexattr_setprotocol() suport PTHREAD_PRIO_PROTECT: + "When a thread owns one or more mutexes initialized with the + PTHREAD_PRIO_PROTECT protocol, it shall execute at the higher of its + priority or the highest of the priority ceilings of all the mutexes + owned by this thread and initialized with this attribute, regardless of + whether other threads are blocked on any of these mutexes or not. + + "While a thread is holding a mutex which has been initialized with + the PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT protocol attributes, + it shall not be subject to being moved to the tail of the scheduling queue + at its priority in the event that its original priority is changed, + such as by a call to sched_setparam(). Likewise, when a thread unlocks + a mutex that has been initialized with the PTHREAD_PRIO_INHERIT or + PTHREAD_PRIO_PROTECT protocol attributes, it shall not be subject to + being moved to the tail of the scheduling queue at its priority in the + event that its original priority is changed." + Status: Open + Priority: Low, probably not that useful + o C++ Support ^^^^^^^^^^^ diff --git a/nuttx/arch/arm/src/Makefile b/nuttx/arch/arm/src/Makefile index 790880c86..3d4f30043 100644 --- a/nuttx/arch/arm/src/Makefile +++ b/nuttx/arch/arm/src/Makefile @@ -71,7 +71,7 @@ SRCS = $(ASRCS) $(CSRCS) OBJS = $(AOBJS) $(COBJS) LDFLAGS = $(ARCHSCRIPT) -EXTRA_LIBS = +EXTRA_LIBS ?= LINKLIBS = ifeq ($(WINTOOL),y) diff --git a/nuttx/arch/arm/src/stm32/Make.defs b/nuttx/arch/arm/src/stm32/Make.defs index 79f0979cc..516cc434e 100644 --- a/nuttx/arch/arm/src/stm32/Make.defs +++ b/nuttx/arch/arm/src/stm32/Make.defs @@ -76,8 +76,9 @@ ifneq ($(CONFIG_IDLE_CUSTOM),y) CHIP_CSRCS += stm32_idle.c endif +CHIP_CSRCS += stm32_pmstop.c stm32_pmstandby.c ifeq ($(CONFIG_PM),y) -CHIP_CSRCS += stm32_pminitialize.c stm32_pmstop.c stm32_pmstandby.c +CHIP_CSRCS += stm32_pminitialize.c endif ifeq ($(CONFIG_STM32_ETHMAC),y) diff --git a/nuttx/arch/arm/src/stm32/stm32_pm.h b/nuttx/arch/arm/src/stm32/stm32_pm.h index 87af09cb9..25c56ecbb 100644 --- a/nuttx/arch/arm/src/stm32/stm32_pm.h +++ b/nuttx/arch/arm/src/stm32/stm32_pm.h @@ -48,8 +48,6 @@ #include "chip.h" #include "up_internal.h" -#ifdef CONFIG_PM - /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -75,7 +73,9 @@ extern "C" { * state activities. */ +#ifdef CONFIG_PM EXTERN sem_t g_pmsem; +#endif /**************************************************************************** * Public Function Prototypes @@ -99,7 +99,8 @@ EXTERN sem_t g_pmsem; * errno value is returned to indicate the cause of the failure. * * Assumptions: - * The caller holds the PM semaphore (g_pmsem). + * The caller holds the PM semaphore (g_pmsem) if this function is used + * as part of the NuttX power management logic. * ****************************************************************************/ @@ -121,7 +122,8 @@ EXTERN int stm32_pmstop(bool lpds); * failure. * * Assumptions: - * The caller holds the PM semaphore (g_pmsem). + * The caller holds the PM semaphore (g_pmsem) if this function is used + * as part of the NuttX power management logic. * ****************************************************************************/ @@ -133,5 +135,4 @@ EXTERN int stm32_pmstandby(void); #endif #endif /* __ASSEMBLY__ */ -#endif /* CONFIG_PM */ #endif /* __ARCH_ARM_SRC_STM32_STM32_PM_H */ diff --git a/nuttx/arch/arm/src/stm32/stm32_pmstandby.c b/nuttx/arch/arm/src/stm32/stm32_pmstandby.c index 7364dbaeb..6846ac1f1 100644 --- a/nuttx/arch/arm/src/stm32/stm32_pmstandby.c +++ b/nuttx/arch/arm/src/stm32/stm32_pmstandby.c @@ -46,8 +46,6 @@ #include "stm32_pwr.h" #include "stm32_pm.h" -#ifdef CONFIG_PM - /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -80,7 +78,8 @@ * failure. * * Assumptions: - * The caller holds the PM semaphore (g_pmsem). + * The caller holds the PM semaphore (g_pmsem) if this function is used + * as part of the NuttX power management logic. * ****************************************************************************/ @@ -112,5 +111,3 @@ int stm32_pmstandby(void) asm("WFI"); return OK; /* Won't get here */ } - -#endif /* CONFIG_PM */ diff --git a/nuttx/arch/arm/src/stm32/stm32_pmstop.c b/nuttx/arch/arm/src/stm32/stm32_pmstop.c index 259f0d7df..55e8201c6 100644 --- a/nuttx/arch/arm/src/stm32/stm32_pmstop.c +++ b/nuttx/arch/arm/src/stm32/stm32_pmstop.c @@ -46,8 +46,6 @@ #include "stm32_pwr.h" #include "stm32_pm.h" -#ifdef CONFIG_PM - /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -82,7 +80,8 @@ * errno value is returned to indicate the cause of the failure. * * Assumptions: - * The caller holds the PM semaphore (g_pmsem). + * The caller holds the PM semaphore (g_pmsem) if this function is used + * as part of the NuttX power management logic. * ****************************************************************************/ @@ -117,5 +116,3 @@ int stm32_pmstop(bool lpds) asm("WFI"); return OK; } - -#endif /* CONFIG_PM */ diff --git a/nuttx/arch/avr/src/Makefile b/nuttx/arch/avr/src/Makefile index 5584ca5af..6bcb8707b 100644 --- a/nuttx/arch/avr/src/Makefile +++ b/nuttx/arch/avr/src/Makefile @@ -76,7 +76,7 @@ SRCS = $(ASRCS) $(CSRCS) OBJS = $(AOBJS) $(COBJS) LDFLAGS = $(ARCHSCRIPT) -EXTRA_LIBS = +EXTRA_LIBS ?= LINKLIBS = ifeq ($(WINTOOL),y) diff --git a/nuttx/arch/hc/src/Makefile b/nuttx/arch/hc/src/Makefile index 9e5be386e..63b8df643 100755 --- a/nuttx/arch/hc/src/Makefile +++ b/nuttx/arch/hc/src/Makefile @@ -68,7 +68,7 @@ SRCS = $(ASRCS) $(CSRCS) OBJS = $(AOBJS) $(COBJS) LDFLAGS = $(ARCHSCRIPT) -EXTRA_LIBS = +EXTRA_LIBS ?= LINKLIBS = ifeq ($(WINTOOL),y) diff --git a/nuttx/arch/mips/src/Makefile b/nuttx/arch/mips/src/Makefile index 57da4844b..5c763da1e 100644 --- a/nuttx/arch/mips/src/Makefile +++ b/nuttx/arch/mips/src/Makefile @@ -65,7 +65,7 @@ SRCS = $(ASRCS) $(CSRCS) OBJS = $(AOBJS) $(COBJS) LDFLAGS = $(ARCHSCRIPT) -EXTRA_LIBS = +EXTRA_LIBS ?= LINKLIBS = ifeq ($(WINTOOL),y) diff --git a/nuttx/arch/sh/src/Makefile b/nuttx/arch/sh/src/Makefile index 3423b63f4..4a6f3eb9c 100644 --- a/nuttx/arch/sh/src/Makefile +++ b/nuttx/arch/sh/src/Makefile @@ -51,7 +51,7 @@ SRCS = $(ASRCS) $(CSRCS) OBJS = $(AOBJS) $(COBJS) LDFLAGS = $(ARCHSCRIPT) -EXTRA_LIBS = +EXTRA_LIBS ?= LINKLIBS = LDPATHES = $(addprefix -L$(TOPDIR)/,$(dir $(LINKLIBS))) diff --git a/nuttx/arch/x86/src/Makefile b/nuttx/arch/x86/src/Makefile index 8b7032a09..122126296 100644 --- a/nuttx/arch/x86/src/Makefile +++ b/nuttx/arch/x86/src/Makefile @@ -65,7 +65,7 @@ SRCS = $(ASRCS) $(CSRCS) OBJS = $(AOBJS) $(COBJS) LDFLAGS = $(ARCHSCRIPT) -EXTRA_LIBS = +EXTRA_LIBS ?= LINKLIBS = ifeq ($(WINTOOL),y) |