summaryrefslogtreecommitdiffstats
path: root/cpukit/posix
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-10-14 19:20:05 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-10-29 10:33:37 +0100
commite97806a5ff7673422082edd49ec3c62c5f0f1ccd (patch)
tree05d82a61ba2453ec0e9354f42797c560031ca88b /cpukit/posix
parentMove default config to librtemsdefaultconfig.a (diff)
downloadrtems-e97806a5ff7673422082edd49ec3c62c5f0f1ccd.tar.bz2
posix: Split posix_api_configuration_table
Use separate configuration variables to avoid false dependencies. Update #2514.
Diffstat (limited to 'cpukit/posix')
-rw-r--r--cpukit/posix/src/mqueue.c3
-rw-r--r--cpukit/posix/src/mqueueconfig.c34
-rw-r--r--cpukit/posix/src/psignal.c2
-rw-r--r--cpukit/posix/src/psignalconfig.c34
-rw-r--r--cpukit/posix/src/psxsemaphore.c3
-rw-r--r--cpukit/posix/src/psxsemaphoreconfig.c34
-rw-r--r--cpukit/posix/src/psxtimerconfig.c34
-rw-r--r--cpukit/posix/src/pthread.c3
-rw-r--r--cpukit/posix/src/pthreadconfig.c34
-rw-r--r--cpukit/posix/src/pthreadinitthreads.c4
-rw-r--r--cpukit/posix/src/ptimer.c3
-rw-r--r--cpukit/posix/src/shm.c3
-rw-r--r--cpukit/posix/src/shmconfig.c34
13 files changed, 212 insertions, 13 deletions
diff --git a/cpukit/posix/src/mqueue.c b/cpukit/posix/src/mqueue.c
index 2ad90c1e79..e2c9b5f2b2 100644
--- a/cpukit/posix/src/mqueue.c
+++ b/cpukit/posix/src/mqueue.c
@@ -51,8 +51,7 @@ static void _POSIX_Message_queue_Manager_initialization(void)
&_POSIX_Message_queue_Information, /* object information table */
OBJECTS_POSIX_API, /* object API */
OBJECTS_POSIX_MESSAGE_QUEUES, /* object class */
- Configuration_POSIX_API.maximum_message_queues,
- /* maximum objects of this class */
+ _Configuration_POSIX_Maximum_message_queues,
sizeof( POSIX_Message_queue_Control ),
/* size of this object's control block */
true, /* true if names for this object are strings */
diff --git a/cpukit/posix/src/mqueueconfig.c b/cpukit/posix/src/mqueueconfig.c
new file mode 100644
index 0000000000..921fb73772
--- /dev/null
+++ b/cpukit/posix/src/mqueueconfig.c
@@ -0,0 +1,34 @@
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright 2018, embedded brains GmbH <rtems@embedded-brains.de>
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ */
+
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/posix/mqueue.h>
+
+const uint32_t _Configuration_POSIX_Maximum_message_queues;
diff --git a/cpukit/posix/src/psignal.c b/cpukit/posix/src/psignal.c
index 3e887a8ed0..0d61a1d737 100644
--- a/cpukit/posix/src/psignal.c
+++ b/cpukit/posix/src/psignal.c
@@ -103,7 +103,7 @@ static void _POSIX_signals_Manager_Initialization(void)
uint32_t signo;
uint32_t maximum_queued_signals;
- maximum_queued_signals = Configuration_POSIX_API.maximum_queued_signals;
+ maximum_queued_signals = _Configuration_POSIX_Maximum_queued_signals;
memcpy(
_POSIX_signals_Vectors,
diff --git a/cpukit/posix/src/psignalconfig.c b/cpukit/posix/src/psignalconfig.c
new file mode 100644
index 0000000000..0840d94b16
--- /dev/null
+++ b/cpukit/posix/src/psignalconfig.c
@@ -0,0 +1,34 @@
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright 2018, embedded brains GmbH <rtems@embedded-brains.de>
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ */
+
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/posix/psignal.h>
+
+const uint32_t _Configuration_POSIX_Maximum_queued_signals;
diff --git a/cpukit/posix/src/psxsemaphore.c b/cpukit/posix/src/psxsemaphore.c
index a82ad17966..9e259b8ea3 100644
--- a/cpukit/posix/src/psxsemaphore.c
+++ b/cpukit/posix/src/psxsemaphore.c
@@ -42,8 +42,7 @@ static void _POSIX_Semaphore_Manager_initialization(void)
&_POSIX_Semaphore_Information, /* object information table */
OBJECTS_POSIX_API, /* object API */
OBJECTS_POSIX_SEMAPHORES, /* object class */
- Configuration_POSIX_API.maximum_semaphores,
- /* maximum objects of this class */
+ _Configuration_POSIX_Maximum_named_semaphores,
sizeof( POSIX_Semaphore_Control ),
/* size of this object's control block */
true, /* true if names for this object are strings */
diff --git a/cpukit/posix/src/psxsemaphoreconfig.c b/cpukit/posix/src/psxsemaphoreconfig.c
new file mode 100644
index 0000000000..7e29742537
--- /dev/null
+++ b/cpukit/posix/src/psxsemaphoreconfig.c
@@ -0,0 +1,34 @@
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright 2018, embedded brains GmbH <rtems@embedded-brains.de>
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ */
+
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/posix/semaphore.h>
+
+const uint32_t _Configuration_POSIX_Maximum_named_semaphores;
diff --git a/cpukit/posix/src/psxtimerconfig.c b/cpukit/posix/src/psxtimerconfig.c
new file mode 100644
index 0000000000..2781a8cec5
--- /dev/null
+++ b/cpukit/posix/src/psxtimerconfig.c
@@ -0,0 +1,34 @@
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright 2018, embedded brains GmbH <rtems@embedded-brains.de>
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ */
+
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/posix/timer.h>
+
+const uint32_t _Configuration_POSIX_Maximum_timers;
diff --git a/cpukit/posix/src/pthread.c b/cpukit/posix/src/pthread.c
index 7d1674694f..da31252063 100644
--- a/cpukit/posix/src/pthread.c
+++ b/cpukit/posix/src/pthread.c
@@ -181,8 +181,7 @@ static void _POSIX_Threads_Manager_initialization(void)
&_POSIX_Threads_Information, /* object information table */
OBJECTS_POSIX_API, /* object API */
OBJECTS_POSIX_THREADS, /* object class */
- Configuration_POSIX_API.maximum_threads
- /* maximum objects of this class */
+ _Configuration_POSIX_Maximum_threads
);
/*
diff --git a/cpukit/posix/src/pthreadconfig.c b/cpukit/posix/src/pthreadconfig.c
new file mode 100644
index 0000000000..75683c3c6e
--- /dev/null
+++ b/cpukit/posix/src/pthreadconfig.c
@@ -0,0 +1,34 @@
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright 2018, embedded brains GmbH <rtems@embedded-brains.de>
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ */
+
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/posix/pthread.h>
+
+const uint32_t _Configuration_POSIX_Maximum_threads;
diff --git a/cpukit/posix/src/pthreadinitthreads.c b/cpukit/posix/src/pthreadinitthreads.c
index 15c6b9fbf9..97ae5df70a 100644
--- a/cpukit/posix/src/pthreadinitthreads.c
+++ b/cpukit/posix/src/pthreadinitthreads.c
@@ -41,8 +41,8 @@ void _POSIX_Threads_Initialize_user_threads_body(void)
pthread_t thread_id;
pthread_attr_t attr;
- user_threads = Configuration_POSIX_API.User_initialization_threads_table;
- maximum = Configuration_POSIX_API.number_of_initialization_threads;
+ user_threads = _Configuration_POSIX_Initialization_threads;
+ maximum = _Configuration_POSIX_Initialization_thread_count;
if ( !user_threads )
return;
diff --git a/cpukit/posix/src/ptimer.c b/cpukit/posix/src/ptimer.c
index e938d50058..9472cd49e5 100644
--- a/cpukit/posix/src/ptimer.c
+++ b/cpukit/posix/src/ptimer.c
@@ -62,8 +62,7 @@ static void _POSIX_Timer_Manager_initialization(void)
&_POSIX_Timer_Information, /* object information table */
OBJECTS_POSIX_API, /* object API */
OBJECTS_POSIX_TIMERS, /* object class */
- Configuration_POSIX_API.maximum_timers,
- /* maximum objects of this class */
+ _Configuration_POSIX_Maximum_timers,
sizeof( POSIX_Timer_Control ),
/* size of this object's control block */
false, /* true if names for this object are strings */
diff --git a/cpukit/posix/src/shm.c b/cpukit/posix/src/shm.c
index d76b5b8569..131aa1384b 100644
--- a/cpukit/posix/src/shm.c
+++ b/cpukit/posix/src/shm.c
@@ -32,8 +32,7 @@ static void _POSIX_Shm_Manager_initialization( void )
&_POSIX_Shm_Information, /* object information table */
OBJECTS_POSIX_API, /* object API */
OBJECTS_POSIX_SHMS, /* object class */
- Configuration_POSIX_API.maximum_shms,
- /* maximum objects of this class */
+ _Configuration_POSIX_Maximum_shms,
sizeof( POSIX_Shm_Control ),
/* size of this object's control block */
true, /* true if names for this object are strings */
diff --git a/cpukit/posix/src/shmconfig.c b/cpukit/posix/src/shmconfig.c
new file mode 100644
index 0000000000..e03f4e8be5
--- /dev/null
+++ b/cpukit/posix/src/shmconfig.c
@@ -0,0 +1,34 @@
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright 2018, embedded brains GmbH <rtems@embedded-brains.de>
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ */
+
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/posix/shm.h>
+
+const uint32_t _Configuration_POSIX_Maximum_shms;