summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nuttx/ChangeLog3
-rw-r--r--nuttx/Documentation/NuttxUserGuide.html11
-rw-r--r--nuttx/configs/sim/nsh2/Make.defs3
-rw-r--r--nuttx/include/sys/types.h7
4 files changed, 18 insertions, 6 deletions
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index fc19a55b9..de0f8872f 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -2222,3 +2222,6 @@
STM32F50xxx family of MCUs.
* configs/stm3240g-eval: Add framework for the STMicro STM3240G-EVAL
board.
+ * include/sys/types.h: wchar_t is a builtin type in C++ and its
+ declaration can cause errors with certain C++ compilers.
+
diff --git a/nuttx/Documentation/NuttxUserGuide.html b/nuttx/Documentation/NuttxUserGuide.html
index 60c63f181..a5997f972 100644
--- a/nuttx/Documentation/NuttxUserGuide.html
+++ b/nuttx/Documentation/NuttxUserGuide.html
@@ -1261,6 +1261,9 @@ interface of the same name.
is not queued and <code>ERROR</code> is returned.
</p>
<p>
+<b>NOTE</b>: <i>mq_send()</i> may be called from an interrupt handler.
+<p>
+<p>
<b>Input Parameters:</b>
</p>
<ul>
@@ -2236,7 +2239,7 @@ If the value of the semaphore resulting from this operation is zero, then
on of the tasks blocked waiting for the semaphore will be allowed to
return successfully from its call to <i>sem_wait()</i>.
<p>
-<b>NOTE</b>: <i>sem_post()</i> may be called from an interrupt handler.
+<b>NOTE</b>: <i>sem_post()</i> may be called from an interrupt handler.
<p>
<b>Input Parameters:</b>
<ul>
@@ -2250,9 +2253,9 @@ return successfully from its call to <i>sem_wait()</i>.
</ul>
<p>
-<b>Assumptions/Limitations:</b> This function cannot be called
-from an interrupt handler. It assumes the currently executing
-task is the one that is performing the unlock.
+<b>Assumptions/Limitations:</b>.
+When called from an interrupt handler, it will appear as though the
+interrupt task is the one that is performing the unlock.
<p>
<b> POSIX Compatibility:</b> Comparable to the POSIX
interface of the same name.
diff --git a/nuttx/configs/sim/nsh2/Make.defs b/nuttx/configs/sim/nsh2/Make.defs
index b127e0a20..39b33dc7d 100644
--- a/nuttx/configs/sim/nsh2/Make.defs
+++ b/nuttx/configs/sim/nsh2/Make.defs
@@ -49,6 +49,7 @@ ARCHPICFLAGS = -fpic
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
ARCHWARNINGSXX = -Wall -Wshadow
ARCHDEFINES =
+ARCHDEFINESXX = -DCONFIG_WCHAR_BUILTIN
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
ARCHINCLUDESXX = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
ARCHSCRIPT =
@@ -66,7 +67,7 @@ OBJDUMP = $(CROSSDEV)objdump
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \
$(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
CXXFLAGS = $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) \
- $(ARCHCPUFLAGSXX) $(ARCHINCLUDESXX) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
+ $(ARCHCPUFLAGSXX) $(ARCHINCLUDESXX) $(ARCHDEFINESXX) $(EXTRADEFINES) -pipe
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
diff --git a/nuttx/include/sys/types.h b/nuttx/include/sys/types.h
index f505c6afa..0c6f72394 100644
--- a/nuttx/include/sys/types.h
+++ b/nuttx/include/sys/types.h
@@ -165,9 +165,14 @@ typedef unsigned int id_t;
typedef intptr_t ptrdiff_t;
-/* Wide, 16-bit character types */
+/* Wide, 16-bit character types. wchar_t is a built-in type in C++ and
+ * its declaration here may cause compilation errors on some compilers
+ * if -DCONFIG_WCHAR_BUILTIN is not included in the CXXFLAGS.
+ */
+#ifndef CONFIG_WCHAR_BUILTIN
typedef uint16_t wchar_t;
+#endif
/* blkcnt_t and off_t are signed integer types.
*