summaryrefslogtreecommitdiff
path: root/nuttx/include
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-03-31 01:42:50 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-03-31 01:42:50 +0000
commitfd57b2a0da0473e878eb1c2abef05de3be7c2e2d (patch)
tree942c9e6714349eb61faa27c17a71cf2c689cb65a /nuttx/include
parent2d6e5ff6c4450662ffc8d1d8d2f46da0155d6905 (diff)
downloadpx4-nuttx-fd57b2a0da0473e878eb1c2abef05de3be7c2e2d.tar.gz
px4-nuttx-fd57b2a0da0473e878eb1c2abef05de3be7c2e2d.tar.bz2
px4-nuttx-fd57b2a0da0473e878eb1c2abef05de3be7c2e2d.zip
Move more files into subdirectories under lib/
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3445 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include')
-rw-r--r--nuttx/include/nuttx/pthread.h85
-rw-r--r--nuttx/include/pthread.h12
2 files changed, 90 insertions, 7 deletions
diff --git a/nuttx/include/nuttx/pthread.h b/nuttx/include/nuttx/pthread.h
new file mode 100644
index 000000000..449c189cb
--- /dev/null
+++ b/nuttx/include/nuttx/pthread.h
@@ -0,0 +1,85 @@
+/****************************************************************************
+ * include/nuttx/pthread.h
+ * Non-standard, NuttX-specific pthread-related declarations.
+ *
+ * Copyright (C) 2011 Gregory Nutt. All rights reserved.
+ * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the name NuttX nor the names of its contributors may be
+ * used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ ****************************************************************************/
+
+#ifndef __INCLUDE_NUTTX_PTHREAD_H
+#define __INCLUDE_NUTTX_PTHREAD_H
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+#include <pthread.h>
+
+/****************************************************************************
+ * Pre-Processor Definitions
+ ****************************************************************************/
+
+/* Default pthread attribute initializer */
+
+#define PTHREAD_ATTR_INITIALIZER \
+{ \
+ PTHREAD_STACK_DEFAULT, /* stacksize */ \
+ PTHREAD_DEFAULT_PRIORITY, /* priority */ \
+ SCHED_RR, /* policy */ \
+ PTHREAD_EXPLICIT_SCHED, /* inheritsched */ \
+}
+
+/****************************************************************************
+ * Public Data
+ ****************************************************************************/
+
+/* Default pthread attributes (see sched/pthread_create.c) */
+
+extern pthread_attr_t g_default_pthread_attr;
+
+/****************************************************************************
+ * Public Function Prototypes
+ ****************************************************************************/
+
+#ifdef __cplusplus
+#define EXTERN extern "C"
+extern "C" {
+#else
+#define EXTERN extern
+#endif
+
+#undef EXTERN
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __INCLUDE_NUTTX_PTHREAD_H */
diff --git a/nuttx/include/pthread.h b/nuttx/include/pthread.h
index b761678a6..974bd1f36 100644
--- a/nuttx/include/pthread.h
+++ b/nuttx/include/pthread.h
@@ -1,5 +1,5 @@
/********************************************************************************
- * pthread.h
+ * include/pthread.h
*
* Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
@@ -33,8 +33,8 @@
*
********************************************************************************/
-#ifndef __PTHREAD_H
-#define __PTHREAD_H
+#ifndef __INCLUDE_PTHREAD_H
+#define __INCLUDE_PTHREAD_H
/********************************************************************************
* Included Files
@@ -147,9 +147,7 @@ extern "C" {
#define EXTERN extern
#endif
-/*----------------------------------------------------------*
- PTHREAD-SPECIFIC TYPES
- *----------------------------------------------------------*/
+/* pthread-specific types */
typedef int pthread_key_t;
typedef FAR void *pthread_addr_t;
@@ -393,5 +391,5 @@ EXTERN int pthread_sigmask(int how, FAR const sigset_t *set, FAR sigset_t *oset)
}
#endif
-#endif /* __PTHREAD_H */
+#endif /* __INCLUDE_PTHREAD_H */