summaryrefslogtreecommitdiff
path: root/nuttx/libc
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-09-07 10:46:58 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-09-07 10:46:58 -0600
commit0c7ac0730d92870bb63f3017d45c9909df6b3ac7 (patch)
tree16ce75ae1c279f28383bc56154e7b2d14fed58ca /nuttx/libc
parentc5711dd525c2eae779fb8ec384f3aa9c4253edaf (diff)
downloadpx4-nuttx-0c7ac0730d92870bb63f3017d45c9909df6b3ac7.tar.gz
px4-nuttx-0c7ac0730d92870bb63f3017d45c9909df6b3ac7.tar.bz2
px4-nuttx-0c7ac0730d92870bb63f3017d45c9909df6b3ac7.zip
Fix some conditional compilation in kernel build mode. And, while we are touching this logic, make g_default_pthread_attr const.
Diffstat (limited to 'nuttx/libc')
-rw-r--r--nuttx/libc/pthread/pthread_attrinit.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/nuttx/libc/pthread/pthread_attrinit.c b/nuttx/libc/pthread/pthread_attrinit.c
index d4a3e0f93..644e94e2c 100644
--- a/nuttx/libc/pthread/pthread_attrinit.c
+++ b/nuttx/libc/pthread/pthread_attrinit.c
@@ -58,15 +58,15 @@
* Global Variables
****************************************************************************/
-/* Default pthread attributes (see included/nuttx/pthread.h). When configured
+/* Default pthread attributes (see include/nuttx/pthread.h). When configured
* to build separate kernel- and user-address spaces, this global is
* duplicated in each address spaced. This copy can only be shared within
* the user address space.
*/
-#if (defined(CONFIG_BUILD_PROTECTED) && !defined(__KERNEL__)) && \
- !defined(CONFIG_BUILD_KERNEL)
-pthread_attr_t g_default_pthread_attr = PTHREAD_ATTR_INITIALIZER;
+#if (defined(CONFIG_BUILD_PROTECTED) || defined(CONFIG_BUILD_KERNEL)) && \
+ !defined(__KERNEL__)
+const pthread_attr_t g_default_pthread_attr = PTHREAD_ATTR_INITIALIZER;
#endif
/****************************************************************************