summaryrefslogtreecommitdiff
path: root/nuttx/lib/pthread
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-11-10 15:47:45 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-11-10 15:47:45 +0000
commit419e8f29bc9f67478830f7aae6499ee109d1d926 (patch)
tree717b5e7f971706d7f3206153d45948b7ba0ecbcf /nuttx/lib/pthread
parent596e5fed4ea6663d0fd5a37cb95fb3aa8b6b5d0f (diff)
downloadpx4-nuttx-419e8f29bc9f67478830f7aae6499ee109d1d926.tar.gz
px4-nuttx-419e8f29bc9f67478830f7aae6499ee109d1d926.tar.bz2
px4-nuttx-419e8f29bc9f67478830f7aae6499ee109d1d926.zip
move lib/ to libc/ to make room for a true lib/ directory. Rename libraries to match
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5328 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/lib/pthread')
-rw-r--r--nuttx/lib/pthread/Make.defs56
-rw-r--r--nuttx/lib/pthread/pthread_attrdestroy.c108
-rw-r--r--nuttx/lib/pthread/pthread_attrgetinheritsched.c111
-rw-r--r--nuttx/lib/pthread/pthread_attrgetschedparam.c110
-rw-r--r--nuttx/lib/pthread/pthread_attrgetschedpolicy.c105
-rw-r--r--nuttx/lib/pthread/pthread_attrgetstacksize.c106
-rw-r--r--nuttx/lib/pthread/pthread_attrinit.c123
-rw-r--r--nuttx/lib/pthread/pthread_attrsetinheritsched.c113
-rw-r--r--nuttx/lib/pthread/pthread_attrsetschedparam.c108
-rw-r--r--nuttx/lib/pthread/pthread_attrsetschedpolicy.c111
-rw-r--r--nuttx/lib/pthread/pthread_attrsetstacksize.c106
-rw-r--r--nuttx/lib/pthread/pthread_barrierattrdestroy.c102
-rw-r--r--nuttx/lib/pthread/pthread_barrierattrgetpshared.c101
-rw-r--r--nuttx/lib/pthread/pthread_barrierattrinit.c101
-rw-r--r--nuttx/lib/pthread/pthread_barrierattrsetpshared.c111
-rw-r--r--nuttx/lib/pthread/pthread_condattrdestroy.c82
-rw-r--r--nuttx/lib/pthread/pthread_condattrinit.c85
-rw-r--r--nuttx/lib/pthread/pthread_mutexattrdestroy.c104
-rw-r--r--nuttx/lib/pthread/pthread_mutexattrgetpshared.c104
-rw-r--r--nuttx/lib/pthread/pthread_mutexattrgettype.c98
-rw-r--r--nuttx/lib/pthread/pthread_mutexattrinit.c106
-rw-r--r--nuttx/lib/pthread/pthread_mutexattrsetpshared.c104
-rw-r--r--nuttx/lib/pthread/pthread_mutexattrsettype.c98
23 files changed, 0 insertions, 2353 deletions
diff --git a/nuttx/lib/pthread/Make.defs b/nuttx/lib/pthread/Make.defs
deleted file mode 100644
index a1eba7bb0..000000000
--- a/nuttx/lib/pthread/Make.defs
+++ /dev/null
@@ -1,56 +0,0 @@
-############################################################################
-# lib/pthread/Make.defs
-#
-# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt <gnutt@nuttx.org>
-#
-# 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.
-#
-############################################################################
-
-# Add the pthread C files to the build
-
-CSRCS += pthread_attrinit.c pthread_attrdestroy.c \
- pthread_attrsetschedpolicy.c pthread_attrgetschedpolicy.c \
- pthread_attrsetinheritsched.c pthread_attrgetinheritsched.c \
- pthread_attrsetstacksize.c pthread_attrgetstacksize.c \
- pthread_attrsetschedparam.c pthread_attrgetschedparam.c \
- pthread_barrierattrinit.c pthread_barrierattrdestroy.c \
- pthread_barrierattrgetpshared.c pthread_barrierattrsetpshared.c \
- pthread_condattrinit.c pthread_condattrdestroy.c \
- pthread_mutexattrinit.c pthread_mutexattrdestroy.c \
- pthread_mutexattrgetpshared.c pthread_mutexattrsetpshared.c
-
-ifeq ($(CONFIG_MUTEX_TYPES),y)
-CSRCS += pthread_mutexattrsettype.c pthread_mutexattrgettype.c
-endif
-
-# Add the pthread directory to the build
-
-DEPPATH += --dep-path pthread
-VPATH += :pthread
diff --git a/nuttx/lib/pthread/pthread_attrdestroy.c b/nuttx/lib/pthread/pthread_attrdestroy.c
deleted file mode 100644
index 103528c7e..000000000
--- a/nuttx/lib/pthread/pthread_attrdestroy.c
+++ /dev/null
@@ -1,108 +0,0 @@
-/****************************************************************************
- * lib/pthread/pthread_attrdestroy.c
- *
- * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * 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.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <pthread.h>
-#include <string.h>
-#include <debug.h>
-#include <errno.h>
-
-/****************************************************************************
- * Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * Private Type Declarations
- ****************************************************************************/
-
-/****************************************************************************
- * Global Variables
- ****************************************************************************/
-
-/****************************************************************************
- * Private Variables
- ****************************************************************************/
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Function: pthread_attr_destroy
- *
- * Description:
- * An attributes object can be deleted when it is no longer
- * needed.
- *
- * Parameters:
- * attr
- *
- * Return Value:
- * 0 meaning success
- *
- * Assumptions:
- *
- ****************************************************************************/
-
-int pthread_attr_destroy(FAR pthread_attr_t *attr)
-{
- int ret;
-
- sdbg("attr=0x%p\n", attr);
-
- if (!attr)
- {
- ret = EINVAL;
- }
- else
- {
- memset(attr, 0, sizeof(pthread_attr_t));
- ret = OK;
- }
-
- sdbg("Returning %d\n", ret);
- return ret;
-}
-
-
diff --git a/nuttx/lib/pthread/pthread_attrgetinheritsched.c b/nuttx/lib/pthread/pthread_attrgetinheritsched.c
deleted file mode 100644
index 02d6e0b7c..000000000
--- a/nuttx/lib/pthread/pthread_attrgetinheritsched.c
+++ /dev/null
@@ -1,111 +0,0 @@
-/****************************************************************************
- * lib/pthread/pthread_attrgetinheritsched.c
- *
- * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * 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.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <pthread.h>
-#include <string.h>
-#include <debug.h>
-#include <errno.h>
-
-/****************************************************************************
- * Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * Private Type Declarations
- ****************************************************************************/
-
-/****************************************************************************
- * Global Variables
- ****************************************************************************/
-
-/****************************************************************************
- * Private Variables
- ****************************************************************************/
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Function: pthread_attr_getinheritsched
- *
- * Description:
- * Report whether the scheduling info in the pthread
- * attributes will be used or if the thread will
- * inherit the properties of the parent.
- *
- * Parameters:
- * attr
- * inheritsched
- *
- * Return Value:
- * 0 if successful. Otherwise, an error code.
- *
- * Assumptions:
- *
- ****************************************************************************/
-
-int pthread_attr_getinheritsched(FAR const pthread_attr_t *attr,
- FAR int *inheritsched)
-{
- int ret;
-
- sdbg("attr=0x%p inheritsched=0x%p\n", attr, inheritsched);
-
- if (!attr || !inheritsched)
- {
- ret = EINVAL;
- }
- else
- {
- *inheritsched = (int)attr->inheritsched;
- ret = OK;
- }
-
- sdbg("Returning %d\n", ret);
- return ret;
-}
-
-
diff --git a/nuttx/lib/pthread/pthread_attrgetschedparam.c b/nuttx/lib/pthread/pthread_attrgetschedparam.c
deleted file mode 100644
index c6bf55dea..000000000
--- a/nuttx/lib/pthread/pthread_attrgetschedparam.c
+++ /dev/null
@@ -1,110 +0,0 @@
-/****************************************************************************
- * lib/pthread/pthread_attrgetschedparam.c
- *
- * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * 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.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <pthread.h>
-#include <string.h>
-#include <sched.h>
-#include <debug.h>
-#include <errno.h>
-
-/****************************************************************************
- * Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * Private Type Declarations
- ****************************************************************************/
-
-/****************************************************************************
- * Global Variables
- ****************************************************************************/
-
-/****************************************************************************
- * Private Variables
- ****************************************************************************/
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Function: pthread_attr_getschedparam
- *
- * Description:
- *
- * Parameters:
- * attr
- * param
- *
- * Return Value:
- * 0 if successful. Otherwise, an error code.
- *
- * Assumptions:
- *
- ****************************************************************************/
-
-int pthread_attr_getschedparam(FAR pthread_attr_t *attr,
- FAR struct sched_param *param)
-{
- int ret;
-
- sdbg("attr=0x%p param=0x%p\n", attr, param);
-
- if (!attr || !param)
- {
- ret = EINVAL;
- }
- else
- {
- param->sched_priority = attr->priority;
- ret = OK;
- }
-
- sdbg("Returning %d\n", ret);
- return ret;
-}
-
-
-
diff --git a/nuttx/lib/pthread/pthread_attrgetschedpolicy.c b/nuttx/lib/pthread/pthread_attrgetschedpolicy.c
deleted file mode 100644
index c42b828c9..000000000
--- a/nuttx/lib/pthread/pthread_attrgetschedpolicy.c
+++ /dev/null
@@ -1,105 +0,0 @@
-/****************************************************************************
- * lib/pthread/pthread_attrgetschedpolicy.c
- *
- * Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * 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.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <sys/types.h>
-#include <pthread.h>
-#include <string.h>
-#include <debug.h>
-#include <errno.h>
-
-/****************************************************************************
- * Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * Private Type Declarations
- ****************************************************************************/
-
-/****************************************************************************
- * Global Variables
- ****************************************************************************/
-
-/****************************************************************************
- * Private Variables
- ****************************************************************************/
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Function: pthread_attr_getschedpolicy
- *
- * Description:
- * Obtain the scheduling algorithm attribute.
- *
- * Parameters:
- * attr
- * policy
- *
- * Return Value:
- * 0 if successful. Otherwise, an error code.
- *
- * Assumptions:
- *
- ****************************************************************************/
-
-int pthread_attr_getschedpolicy(FAR pthread_attr_t *attr, int *policy)
-{
- int ret;
-
- sdbg("attr=0x%p policy=0x%p\n", attr, policy);
-
- if (!attr || !policy)
- {
- ret = EINVAL;
- }
- else
- {
- *policy = attr->policy;
- ret = OK;
- }
-
- sdbg("Returning %d\n", ret);
- return ret;
-}
diff --git a/nuttx/lib/pthread/pthread_attrgetstacksize.c b/nuttx/lib/pthread/pthread_attrgetstacksize.c
deleted file mode 100644
index 2faa586ba..000000000
--- a/nuttx/lib/pthread/pthread_attrgetstacksize.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/****************************************************************************
- * lib/pthread/pthread_attrgetstacksize.c
- *
- * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * 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.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <sys/types.h>
-#include <pthread.h>
-#include <string.h>
-#include <debug.h>
-#include <errno.h>
-
-/****************************************************************************
- * Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * Private Type Declarations
- ****************************************************************************/
-
-/****************************************************************************
- * Global Variables
- ****************************************************************************/
-
-/****************************************************************************
- * Private Variables
- ****************************************************************************/
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Function: pthread_attr_getstacksize
- *
- * Description:
- *
- * Parameters:
- * attr
- * stacksize
- *
- * Return Value:
- * 0 if successful. Otherwise, an error code.
- *
- * Assumptions:
- *
- ****************************************************************************/
-
-int pthread_attr_getstacksize(FAR pthread_attr_t *attr, FAR long *stacksize)
-{
- int ret;
-
- sdbg("attr=0x%p stacksize=0x%p\n", attr, stacksize);
-
- if (!stacksize)
- {
- ret = EINVAL;
- }
- else
- {
- *stacksize = attr->stacksize;
- ret = OK;
- }
-
- sdbg("Returning %d\n", ret);
- return ret;
-}
-
-
diff --git a/nuttx/lib/pthread/pthread_attrinit.c b/nuttx/lib/pthread/pthread_attrinit.c
deleted file mode 100644
index d06a535d7..000000000
--- a/nuttx/lib/pthread/pthread_attrinit.c
+++ /dev/null
@@ -1,123 +0,0 @@
-/****************************************************************************
- * lib/pthread/pthread_attrinit.c
- *
- * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * 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.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <pthread.h>
-#include <string.h>
-#include <debug.h>
-#include <errno.h>
-
-#include <nuttx/pthread.h>
-
-/****************************************************************************
- * Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * Private Type Declarations
- ****************************************************************************/
-
-/****************************************************************************
- * Global Variables
- ****************************************************************************/
-
-/* Default pthread attributes (see included/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_NUTTX_KERNEL) && !defined(__KERNEL__)
-pthread_attr_t g_default_pthread_attr = PTHREAD_ATTR_INITIALIZER;
-#endif
-
-/****************************************************************************
- * Private Variables
- ****************************************************************************/
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Function: pthread_attr_init
- *
- * Description:
- * Initializes a thread attributes object (attr) with
- * default values for all of the individual attributes
- * used by a given implementation.
- *
- * Parameters:
- * attr
- *
- * Return Value:
- * 0 on success, otherwise an error number
- *
- * Assumptions:
- *
- ****************************************************************************/
-
-int pthread_attr_init(FAR pthread_attr_t *attr)
-{
- int ret = OK;
-
- sdbg("attr=0x%p\n", attr);
- if (!attr)
- {
- ret = ENOMEM;
- }
- else
- {
- /* Set the child thread priority to be the default
- * priority. Set the child stack size to some arbitrary
- * default value.
- */
-
- memcpy(attr, &g_default_pthread_attr, sizeof(pthread_attr_t));
- }
-
- sdbg("Returning %d\n", ret);
- return ret;
-}
-
diff --git a/nuttx/lib/pthread/pthread_attrsetinheritsched.c b/nuttx/lib/pthread/pthread_attrsetinheritsched.c
deleted file mode 100644
index df2c2fba3..000000000
--- a/nuttx/lib/pthread/pthread_attrsetinheritsched.c
+++ /dev/null
@@ -1,113 +0,0 @@
-/****************************************************************************
- * lib/pthread/pthread_attrsetinheritsched.c
- *
- * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * 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.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <stdint.h>
-#include <pthread.h>
-#include <string.h>
-#include <debug.h>
-#include <errno.h>
-
-/****************************************************************************
- * Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * Private Type Declarations
- ****************************************************************************/
-
-/****************************************************************************
- * Global Variables
- ****************************************************************************/
-
-/****************************************************************************
- * Private Variables
- ****************************************************************************/
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Function: pthread_attr_setinheritsched
- *
- * Description:
- * Indicate whether the scheduling info in the pthread
- * attributes will be used or if the thread will
- * inherit the properties of the parent.
- *
- * Parameters:
- * attr
- * policy
- *
- * Return Value:
- * 0 if successful. Otherwise, an error code.
- *
- * Assumptions:
- *
- ****************************************************************************/
-
-int pthread_attr_setinheritsched(FAR pthread_attr_t *attr,
- int inheritsched)
-{
- int ret;
-
- sdbg("inheritsched=%d\n", inheritsched);
-
- if (!attr ||
- (inheritsched != PTHREAD_INHERIT_SCHED &&
- inheritsched != PTHREAD_EXPLICIT_SCHED))
- {
- ret = EINVAL;
- }
- else
- {
- attr->inheritsched = (uint8_t)inheritsched;
- ret = OK;
- }
-
- sdbg("Returning %d\n", ret);
- return ret;
-}
-
diff --git a/nuttx/lib/pthread/pthread_attrsetschedparam.c b/nuttx/lib/pthread/pthread_attrsetschedparam.c
deleted file mode 100644
index c2ab4d1c4..000000000
--- a/nuttx/lib/pthread/pthread_attrsetschedparam.c
+++ /dev/null
@@ -1,108 +0,0 @@
-/****************************************************************************
- * lib/pthread/pthread_attrsetschedparam.c
- *
- * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * 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.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <pthread.h>
-#include <string.h>
-#include <sched.h>
-#include <debug.h>
-#include <errno.h>
-
-/****************************************************************************
- * Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * Private Type Declarations
- ****************************************************************************/
-
-/****************************************************************************
- * Global Variables
- ****************************************************************************/
-
-/****************************************************************************
- * Private Variables
- ****************************************************************************/
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Function: pthread_attr_setschedparam
- *
- * Description:
- *
- * Parameters:
- * attr
- * param
- *
- * Return Value:
- * 0 if successful. Otherwise, an error code.
- *
- * Assumptions:
- *
- ****************************************************************************/
-
-int pthread_attr_setschedparam(FAR pthread_attr_t *attr,
- FAR const struct sched_param *param)
-{
- int ret;
-
- sdbg("attr=0x%p param=0x%p\n", attr, param);
-
- if (!attr || !param)
- {
- ret = EINVAL;
- }
- else
- {
- attr->priority = (short)param->sched_priority;
- ret = OK;
- }
- sdbg("Returning %d\n", ret);
- return ret;
-}
-
-
diff --git a/nuttx/lib/pthread/pthread_attrsetschedpolicy.c b/nuttx/lib/pthread/pthread_attrsetschedpolicy.c
deleted file mode 100644
index 4e43e635d..000000000
--- a/nuttx/lib/pthread/pthread_attrsetschedpolicy.c
+++ /dev/null
@@ -1,111 +0,0 @@
-/****************************************************************************
- * lib/pthread/pthread_attrsetschedpolicy.c
- *
- * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * 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.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <pthread.h>
-#include <string.h>
-#include <sched.h>
-#include <debug.h>
-#include <errno.h>
-
-/****************************************************************************
- * Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * Private Type Declarations
- ****************************************************************************/
-
-/****************************************************************************
- * Global Variables
- ****************************************************************************/
-
-/****************************************************************************
- * Private Variables
- ****************************************************************************/
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Function: pthread_attr_setschedpolicy
- *
- * Description:
- * Set the scheduling algorithm attribute.
- *
- * Parameters:
- * attr
- * policy
- *
- * Return Value:
- * 0 if successful. Otherwise, an error code.
- *
- * Assumptions:
- *
- ****************************************************************************/
-
-int pthread_attr_setschedpolicy(FAR pthread_attr_t *attr, int policy)
-{
- int ret;
-
- sdbg("attr=0x%p policy=%d\n", attr, policy);
-
-#if CONFIG_RR_INTERVAL > 0
- if (!attr || (policy != SCHED_FIFO && policy != SCHED_RR))
-#else
- if (!attr || policy != SCHED_FIFO )
-#endif
- {
- ret = EINVAL;
- }
- else
- {
- attr->policy = policy;
- ret = OK;
- }
-
- sdbg("Returning %d\n", ret);
- return ret;
-}
diff --git a/nuttx/lib/pthread/pthread_attrsetstacksize.c b/nuttx/lib/pthread/pthread_attrsetstacksize.c
deleted file mode 100644
index 8a826dd3a..000000000
--- a/nuttx/lib/pthread/pthread_attrsetstacksize.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/****************************************************************************
- * lib/pthread/pthread_attrsetstacksize.c
- *
- * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * 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.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <pthread.h>
-#include <string.h>
-#include <debug.h>
-#include <errno.h>
-
-/****************************************************************************
- * Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * Private Type Declarations
- ****************************************************************************/
-
-/****************************************************************************
- * Global Variables
- ****************************************************************************/
-
-/****************************************************************************
- * Private Variables
- ****************************************************************************/
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Function: pthread_attr_setstacksize
- *
- * Description:
- *
- * Parameters:
- * attr
- * stacksize
- *
- * Return Value:
- * 0 if successful. Otherwise, an error code.
- *
- * Assumptions:
- *
- ****************************************************************************/
-
-int pthread_attr_setstacksize(FAR pthread_attr_t *attr, long stacksize)
-{
- int ret;
-
- sdbg("attr=0x%p stacksize=%ld\n", attr, stacksize);
-
- if (!attr || stacksize < PTHREAD_STACK_MIN)
- {
- ret = EINVAL;
- }
- else
- {
- attr->stacksize = stacksize;
- ret = OK;
- }
-
- sdbg("Returning %d\n", ret);
- return ret;
-}
-
diff --git a/nuttx/lib/pthread/pthread_barrierattrdestroy.c b/nuttx/lib/pthread/pthread_barrierattrdestroy.c
deleted file mode 100644
index 6d16b9cff..000000000
--- a/nuttx/lib/pthread/pthread_barrierattrdestroy.c
+++ /dev/null
@@ -1,102 +0,0 @@
-/********************************************************************************
- * lib/pthread/pthread_barrierattrdestroy.c
- *
- * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * 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.
- *
- ********************************************************************************/
-
-/********************************************************************************
- * Included Files
- ********************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <pthread.h>
-#include <errno.h>
-#include <debug.h>
-
-/********************************************************************************
- * Definitions
- ********************************************************************************/
-
-/********************************************************************************
- * Private Type Declarations
- ********************************************************************************/
-
-/********************************************************************************
- * Global Variables
- ********************************************************************************/
-
-/********************************************************************************
- * Private Variables
- ********************************************************************************/
-
-/********************************************************************************
- * Private Function Prototypes
- ********************************************************************************/
-
-/********************************************************************************
- * Public Functions
- ********************************************************************************/
-
-/********************************************************************************
- * Function: pthread_barrierattr_destroy
- *
- * Description:
- * The pthread_barrierattr_destroy() function will destroy a barrier attributes
- * object. A destroyed attr attributes object can be reinitialized using
- * pthread_barrierattr_init(); the results of otherwise referencing the object
- * after it has been destroyed are undefined.
- *
- * Parameters:
- * attr - barrier attributes to be destroyed.
- *
- * Return Value:
- * 0 (OK) on success or EINVAL if attr is invalid.
- *
- * Assumptions:
- *
- ********************************************************************************/
-
-int pthread_barrierattr_destroy(FAR pthread_barrierattr_t *attr)
-{
- int ret = OK;
-
- if (!attr)
- {
- ret = EINVAL;
- }
- else
- {
- attr->pshared = PTHREAD_PROCESS_PRIVATE;
- }
- return ret;
-}
diff --git a/nuttx/lib/pthread/pthread_barrierattrgetpshared.c b/nuttx/lib/pthread/pthread_barrierattrgetpshared.c
deleted file mode 100644
index d29bc6dfc..000000000
--- a/nuttx/lib/pthread/pthread_barrierattrgetpshared.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/********************************************************************************
- * lib/pthread/pthread_barrierattrgetpshared.c
- *
- * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * 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.
- *
- ********************************************************************************/
-
-/********************************************************************************
- * Included Files
- ********************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <pthread.h>
-#include <errno.h>
-#include <debug.h>
-
-/********************************************************************************
- * Definitions
- ********************************************************************************/
-
-/********************************************************************************
- * Private Type Declarations
- ********************************************************************************/
-
-/********************************************************************************
- * Global Variables
- ********************************************************************************/
-
-/********************************************************************************
- * Private Variables
- ********************************************************************************/
-
-/********************************************************************************
- * Private Function Prototypes
- ********************************************************************************/
-
-/********************************************************************************
- * Public Functions
- ********************************************************************************/
-
-/********************************************************************************
- * Function: pthread_barrierattr_getpshared
- *
- * Description:
- * The pthread_barrierattr_getpshared() function will obtain the value of the
- * process-shared attribute from the attributes object referenced by attr.
- *
- * Parameters:
- * attr - barrier attributes to be queried.
- * pshared - the location to stored the current value of the pshared attribute.
- *
- * Return Value:
- * 0 (OK) on success or EINVAL if either attr or pshared is invalid.
- *
- * Assumptions:
- *
- ********************************************************************************/
-
-int pthread_barrierattr_getpshared(FAR const pthread_barrierattr_t *attr, FAR int *pshared)
-{
- int ret = OK;
-
- if (!attr || !pshared)
- {
- ret = EINVAL;
- }
- else
- {
- *pshared = attr->pshared;
- }
- return ret;
-}
diff --git a/nuttx/lib/pthread/pthread_barrierattrinit.c b/nuttx/lib/pthread/pthread_barrierattrinit.c
deleted file mode 100644
index b5f35ca91..000000000
--- a/nuttx/lib/pthread/pthread_barrierattrinit.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/********************************************************************************
- * lib/pthread/pthread_barrierattrinit.c
- *
- * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * 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.
- *
- ********************************************************************************/
-
-/********************************************************************************
- * Included Files
- ********************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <pthread.h>
-#include <errno.h>
-#include <debug.h>
-
-/********************************************************************************
- * Definitions
- ********************************************************************************/
-
-/********************************************************************************
- * Private Type Declarations
- ********************************************************************************/
-
-/********************************************************************************
- * Global Variables
- ********************************************************************************/
-
-/********************************************************************************
- * Private Variables
- ********************************************************************************/
-
-/********************************************************************************
- * Private Function Prototypes
- ********************************************************************************/
-
-/********************************************************************************
- * Public Functions
- ********************************************************************************/
-
-/********************************************************************************
- * Function: pthread_barrierattr_init
- *
- * Description:
- * The pthread_barrierattr_init() function will initialize a barrier attribute
- * object attr with the default value for all of the attributes defined by the
- * implementation.
- *
- * Parameters:
- * attr - barrier attributes to be initialized.
- *
- * Return Value:
- * 0 (OK) on success or EINVAL if attr is invalid.
- *
- * Assumptions:
- *
- ********************************************************************************/
-
-int pthread_barrierattr_init(FAR pthread_barrierattr_t *attr)
-{
- int ret = OK;
-
- if (!attr)
- {
- ret = EINVAL;
- }
- else
- {
- attr->pshared = PTHREAD_PROCESS_PRIVATE;
- }
- return ret;
-}
diff --git a/nuttx/lib/pthread/pthread_barrierattrsetpshared.c b/nuttx/lib/pthread/pthread_barrierattrsetpshared.c
deleted file mode 100644
index d0eecbf5a..000000000
--- a/nuttx/lib/pthread/pthread_barrierattrsetpshared.c
+++ /dev/null
@@ -1,111 +0,0 @@
-/********************************************************************************
- * lib/pthread/pthread_barrierattrsetpshared.c
- *
- * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * 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.
- *
- ********************************************************************************/
-
-/********************************************************************************
- * Included Files
- ********************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <pthread.h>
-#include <errno.h>
-#include <debug.h>
-
-/********************************************************************************
- * Definitions
- ********************************************************************************/
-
-/********************************************************************************
- * Private Type Declarations
- ********************************************************************************/
-
-/********************************************************************************
- * Global Variables
- ********************************************************************************/
-
-/********************************************************************************
- * Private Variables
- ********************************************************************************/
-
-/********************************************************************************
- * Private Function Prototypes
- ********************************************************************************/
-
-/********************************************************************************
- * Public Functions
- ********************************************************************************/
-
-/********************************************************************************
- * Function: pthread_barrierattr_setpshared
- *
- * Description:
- * The process-shared attribute is set to PTHREAD_PROCESS_SHARED to permit a
- * barrier to be operated upon by any thread that has access to the memory where
- * the barrier is allocated. If the process-shared attribute is
- * PTHREAD_PROCESS_PRIVATE, the barrier can only be operated upon by threads
- * created within the same process as the thread that initialized the barrier.
- * If threads of different processes attempt to operate on such a barrier, the
- * behavior is undefined. The default value of the attribute is
- * PTHREAD_PROCESS_PRIVATE.
- *
- * Both constants PTHREAD_PROCESS_SHARED and PTHREAD_PROCESS_PRIVATE are defined
- * in pthread.h.
- *
- * Parameters:
- * attr - barrier attributes to be modified.
- * pshared - the new value of the pshared attribute.
- *
- * Return Value:
- * 0 (OK) on success or EINVAL if either attr is invalid or pshared is not one
- * of PTHREAD_PROCESS_SHARED or PTHREAD_PROCESS_PRIVATE.
- *
- * Assumptions:
- *
- ********************************************************************************/
-
-int pthread_barrierattr_setpshared(FAR pthread_barrierattr_t *attr, int pshared)
-{
- int ret = OK;
-
- if (!attr || (pshared != PTHREAD_PROCESS_SHARED && pshared != PTHREAD_PROCESS_PRIVATE))
- {
- ret = EINVAL;
- }
- else
- {
- attr->pshared = pshared;
- }
- return ret;
-}
diff --git a/nuttx/lib/pthread/pthread_condattrdestroy.c b/nuttx/lib/pthread/pthread_condattrdestroy.c
deleted file mode 100644
index d6c3df5d1..000000000
--- a/nuttx/lib/pthread/pthread_condattrdestroy.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/****************************************************************************
- * lib/pthread/pthread_condattrdestroy.c
- *
- * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * 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.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <pthread.h>
-#include <debug.h>
-#include <errno.h>
-
-/****************************************************************************
- * Global Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Function: pthread_condattr_destroy
- *
- * Description:
- * Operations on condition variable attributes
- *
- * Parameters:
- * None
- *
- * Return Value:
- * None
- *
- * Assumptions:
- *
- ****************************************************************************/
-
-int pthread_condattr_destroy(FAR pthread_condattr_t *attr)
-{
- int ret = OK;
-
- sdbg("attr=0x%p\n", attr);
-
- if (!attr)
- {
- ret = EINVAL;
- }
-
- sdbg("Returning %d\n", ret);
- return ret;
-}
-
-
-
diff --git a/nuttx/lib/pthread/pthread_condattrinit.c b/nuttx/lib/pthread/pthread_condattrinit.c
deleted file mode 100644
index 5721c6159..000000000
--- a/nuttx/lib/pthread/pthread_condattrinit.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/****************************************************************************
- * lib/pthread/pthread_condattrinit.c
- *
- * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * 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.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <pthread.h>
-#include <debug.h>
-#include <errno.h>
-
-/****************************************************************************
- * Global Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Function: pthread_condattr_init
- *
- * Description:
- * Operations on condition variable attributes
- *
- * Parameters:
- * None
- *
- * Return Value:
- * None
- *
- * Assumptions:
- *
- ****************************************************************************/
-
-int pthread_condattr_init(FAR pthread_condattr_t *attr)
-{
- int ret = OK;
-
- sdbg("attr=0x%p\n", attr);
-
- if (!attr)
- {
- ret = EINVAL;
- }
- else
- {
- *attr = 0;
- }
-
- sdbg("Returning %d\n", ret);
- return ret;
-}
-
-
diff --git a/nuttx/lib/pthread/pthread_mutexattrdestroy.c b/nuttx/lib/pthread/pthread_mutexattrdestroy.c
deleted file mode 100644
index e9868df68..000000000
--- a/nuttx/lib/pthread/pthread_mutexattrdestroy.c
+++ /dev/null
@@ -1,104 +0,0 @@
-/****************************************************************************
- * lib/pthread/pthread_mutexattrdestroy.c
- *
- * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * 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.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <pthread.h>
-#include <errno.h>
-#include <debug.h>
-
-/****************************************************************************
- * Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * Private Type Declarations
- ****************************************************************************/
-
-/****************************************************************************
- * Global Variables
- ****************************************************************************/
-
-/****************************************************************************
- * Private Variables
- ****************************************************************************/
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Function: pthread_mutexattr_destroy
- *
- * Description:
- * Destroy mutex attributes.
- *
- * Parameters:
- * attr
- * pshared
- *
- * Return Value:
- * 0 if successful. Otherwise, an error code.
- *
- * Assumptions:
- *
- ****************************************************************************/
-
-int pthread_mutexattr_destroy(FAR pthread_mutexattr_t *attr)
-{
- int ret = OK;
-
- sdbg("attr=0x%p\n", attr);
-
- if (!attr)
- {
- ret = EINVAL;
- }
- else
- {
- attr->pshared = 0;
- }
-
- sdbg("Returning %d\n", ret);
- return ret;
-}
diff --git a/nuttx/lib/pthread/pthread_mutexattrgetpshared.c b/nuttx/lib/pthread/pthread_mutexattrgetpshared.c
deleted file mode 100644
index bc6379db5..000000000
--- a/nuttx/lib/pthread/pthread_mutexattrgetpshared.c
+++ /dev/null
@@ -1,104 +0,0 @@
-/****************************************************************************
- * lib/pthread/pthread_mutexattrgetpshared.c
- *
- * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * 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.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <pthread.h>
-#include <errno.h>
-#include <debug.h>
-
-/****************************************************************************
- * Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * Private Type Declarations
- ****************************************************************************/
-
-/****************************************************************************
- * Global Variables
- ****************************************************************************/
-
-/****************************************************************************
- * Private Variables
- ****************************************************************************/
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Function: pthread_mutexattr_getpshared
- *
- * Description:
- * Get pshared mutex attribute.
- *
- * Parameters:
- * attr
- * pshared
- *
- * Return Value:
- * 0 if successful. Otherwise, an error code.
- *
- * Assumptions:
- *
- ****************************************************************************/
-
-int pthread_mutexattr_getpshared(FAR pthread_mutexattr_t *attr, FAR int *pshared)
-{
- int ret = OK;
-
- sdbg("attr=0x%p pshared=0x%p\n", attr, pshared);
-
- if (!attr || !pshared)
- {
- ret = EINVAL;
- }
- else
- {
- *pshared = attr->pshared;
- }
-
- sdbg("Returning %d\n", ret);
- return ret;
-}
diff --git a/nuttx/lib/pthread/pthread_mutexattrgettype.c b/nuttx/lib/pthread/pthread_mutexattrgettype.c
deleted file mode 100644
index 5fb10f301..000000000
--- a/nuttx/lib/pthread/pthread_mutexattrgettype.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/****************************************************************************
- * lib/pthread/pthread_mutexattrgettype.c
- *
- * Copyright (C) 2008, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * 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.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-#include <pthread.h>
-#include <errno.h>
-
-#ifdef CONFIG_MUTEX_TYPES
-
-/****************************************************************************
- * Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * Private Type Declarations
- ****************************************************************************/
-
-/****************************************************************************
- * Global Variables
- ****************************************************************************/
-
-/****************************************************************************
- * Private Variables
- ****************************************************************************/
-
-/****************************************************************************
- * Private Function Prototypes
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Function: pthread_mutexattr_gettype
- *
- * Description:
- * Return the mutex type from the mutex attributes.
- *
- * Parameters:
- * attr - The mutex attributes to query
- * type - Location to return the mutex type
- *
- * Return Value:
- * 0, if the mutex type was successfully return in 'type', or
- * EINVAL, if any NULL pointers provided.
- *
- * Assumptions:
- *
- ****************************************************************************/
-
-int pthread_mutexattr_gettype(const pthread_mutexattr_t *attr, int *type)
-{
- if (attr && type)
- {
- *type = attr->type;
- return 0;
- }
- return EINVAL;
-}
-
-#endif /* CONFIG_MUTEX_TYPES */
diff --git a/nuttx/lib/pthread/pthread_mutexattrinit.c b/nuttx/lib/pthread/pthread_mutexattrinit.c
deleted file mode 100644
index f815bf16c..000000000
--- a/nuttx/lib/pthread/pthread_mutexattrinit.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/****************************************************************************
- * lib/pthread/pthread_mutexattrinit.c
- *
- * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * 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.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <pthread.h>
-#include <errno.h>
-#include <debug.h>
-
-/****************************************************************************
- * Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * Private Type Declarations
- ****************************************************************************/
-
-/****************************************************************************
- * Global Variables
- ****************************************************************************/
-
-/****************************************************************************
- * Private Variables
- ****************************************************************************/
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Function: pthread_mutexattr_init
- *
- * Description:
- * Create mutex attributes.
- *
- * Parameters:
- * attr
- *
- * Return Value:
- * 0 if successful. Otherwise, an error code.
- *
- * Assumptions:
- *
- ****************************************************************************/
-
-int pthread_mutexattr_init(FAR pthread_mutexattr_t *attr)
-{
- int ret = OK;
-
- sdbg("attr=0x%p\n", attr);
-
- if (!attr)
- {
- ret = EINVAL;
- }
- else
- {
- attr->pshared = 0;
-#ifdef CONFIG_MUTEX_TYPES
- attr->type = PTHREAD_MUTEX_DEFAULT;
-#endif
- }
-
- sdbg("Returning %d\n", ret);
- return ret;
-}
diff --git a/nuttx/lib/pthread/pthread_mutexattrsetpshared.c b/nuttx/lib/pthread/pthread_mutexattrsetpshared.c
deleted file mode 100644
index 900476fdd..000000000
--- a/nuttx/lib/pthread/pthread_mutexattrsetpshared.c
+++ /dev/null
@@ -1,104 +0,0 @@
-/****************************************************************************
- * lib/pthread/pthread_mutexattrsetpshared.c
- *
- * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * 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.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <pthread.h>
-#include <errno.h>
-#include <debug.h>
-
-/****************************************************************************
- * Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * Private Type Declarations
- ****************************************************************************/
-
-/****************************************************************************
- * Global Variables
- ****************************************************************************/
-
-/****************************************************************************
- * Private Variables
- ****************************************************************************/
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Function: pthread_mutexattr_setpshared
- *
- * Description:
- * Set pshared mutex attribute.
- *
- * Parameters:
- * attr
- * pshared
- *
- * Return Value:
- * 0 if successful. Otherwise, an error code.
- *
- * Assumptions:
- *
- ****************************************************************************/
-
-int pthread_mutexattr_setpshared(FAR pthread_mutexattr_t *attr, int pshared)
-{
- int ret = OK;
-
- sdbg("attr=0x%p pshared=%d\n", attr, pshared);
-
- if (!attr || (pshared != 0 && pshared != 1))
- {
- ret = EINVAL;
- }
- else
- {
- attr->pshared = pshared;
- }
-
- sdbg("Returning %d\n", ret);
- return ret;
-}
diff --git a/nuttx/lib/pthread/pthread_mutexattrsettype.c b/nuttx/lib/pthread/pthread_mutexattrsettype.c
deleted file mode 100644
index 81427c757..000000000
--- a/nuttx/lib/pthread/pthread_mutexattrsettype.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/****************************************************************************
- * lib/pthread/pthread_mutexattrsettype.c
- *
- * Copyright (C) 2008, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <gnutt@nuttx.org>
- *
- * 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.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-#include <pthread.h>
-#include <errno.h>
-
-#ifdef CONFIG_MUTEX_TYPES
-
-/****************************************************************************
- * Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * Private Type Declarations
- ****************************************************************************/
-
-/****************************************************************************
- * Global Variables
- ****************************************************************************/
-
-/****************************************************************************
- * Private Variables
- ****************************************************************************/
-
-/****************************************************************************
- * Private Function Prototypes
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Function: pthread_mutexattr_settype
- *
- * Description:
- * Set the mutex type in the mutex attributes.
- *
- * Parameters:
- * attr - The mutex attributes in which to set the mutex type.
- * type - The mutex type value to set.
- *
- * Return Value:
- * 0, if the mutex type was successfully set in 'attr', or
- * EINVAL, if 'attr' is NULL or 'type' unrecognized.
- *
- * Assumptions:
- *
- ****************************************************************************/
-
-int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type)
-{
- if (attr && type >= PTHREAD_MUTEX_NORMAL && type <= PTHREAD_MUTEX_RECURSIVE)
- {
- attr->type = type;
- return OK;
- }
- return EINVAL;
-}
-
-#endif /* CONFIG_MUTEX_TYPES */