[rtems commit] posix: Implement self-contained POSIX condvar
Sebastian Huber
sebh at rtems.org
Thu Oct 5 12:36:49 UTC 2017
Module: rtems
Branch: master
Commit: 5222488573e3ba8c2eceffe29f878a73a3a81694
Changeset: http://git.rtems.org/rtems/commit/?id=5222488573e3ba8c2eceffe29f878a73a3a81694
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Tue Sep 26 07:49:17 2017 +0200
posix: Implement self-contained POSIX condvar
POSIX condition variables are now available in all configurations and no
longer depend on --enable-posix.
Update #2514.
Update #3113.
---
c/src/ada-tests/mptests/mp01/config_base.h | 1 -
c/src/ada-tests/mptests/mp03/config_base.h | 1 -
c/src/ada-tests/mptests/mp04/config_base.h | 1 -
c/src/ada-tests/mptests/mp05/config_base.h | 1 -
c/src/ada-tests/mptests/mp06/config_base.h | 1 -
c/src/ada-tests/mptests/mp07/config_base.h | 1 -
c/src/ada-tests/mptests/mp08/config_base.h | 1 -
c/src/ada-tests/mptests/mp09/config_base.h | 1 -
c/src/ada-tests/mptests/mp10/config_base.h | 1 -
c/src/ada-tests/mptests/mp11/config_base.h | 1 -
c/src/ada-tests/mptests/mp12/config_base.h | 1 -
c/src/ada-tests/mptests/mp13/config_base.h | 1 -
c/src/ada-tests/mptests/mp14/config_base.h | 1 -
c/src/ada-tests/samples/base_mp/config.h | 1 -
c/src/ada-tests/samples/base_sp/config.h | 1 -
c/src/ada-tests/samples/hello/config.h | 1 -
c/src/ada-tests/samples/nsecs/config.h | 1 -
c/src/ada-tests/samples/ticker/config.h | 1 -
c/src/ada-tests/sptests/sp01/config.h | 1 -
c/src/ada-tests/sptests/sp02/config.h | 1 -
c/src/ada-tests/sptests/sp03/config.h | 1 -
c/src/ada-tests/sptests/sp04/config.h | 1 -
c/src/ada-tests/sptests/sp05/config.h | 1 -
c/src/ada-tests/sptests/sp06/config.h | 1 -
c/src/ada-tests/sptests/sp07/config.h | 1 -
c/src/ada-tests/sptests/sp08/config.h | 1 -
c/src/ada-tests/sptests/sp09/config.h | 1 -
c/src/ada-tests/sptests/sp11/config.h | 1 -
c/src/ada-tests/sptests/sp12/config.h | 1 -
c/src/ada-tests/sptests/sp13/config.h | 1 -
c/src/ada-tests/sptests/sp14/config.h | 1 -
c/src/ada-tests/sptests/sp15/config.h | 1 -
c/src/ada-tests/sptests/sp16/config.h | 1 -
c/src/ada-tests/sptests/sp17/config.h | 1 -
c/src/ada-tests/sptests/sp19/config.h | 1 -
c/src/ada-tests/sptests/sp20/config.h | 1 -
c/src/ada-tests/sptests/sp22/config.h | 1 -
c/src/ada-tests/sptests/sp23/config.h | 1 -
c/src/ada-tests/sptests/sp24/config.h | 1 -
c/src/ada-tests/sptests/sp25/config.h | 1 -
c/src/ada-tests/sptests/spname01/config.h | 1 -
c/src/ada-tests/tmtests/tm01/config.h | 1 -
c/src/ada-tests/tmtests/tm02/config.h | 1 -
c/src/ada-tests/tmtests/tm03/config.h | 1 -
c/src/ada-tests/tmtests/tm04/config.h | 1 -
c/src/ada-tests/tmtests/tm05/config.h | 1 -
c/src/ada-tests/tmtests/tm06/config.h | 1 -
c/src/ada-tests/tmtests/tm07/config.h | 1 -
c/src/ada-tests/tmtests/tm08/config.h | 1 -
c/src/ada-tests/tmtests/tm09/config.h | 1 -
c/src/ada-tests/tmtests/tm10/config.h | 1 -
c/src/ada-tests/tmtests/tm11/config.h | 1 -
c/src/ada-tests/tmtests/tm12/config.h | 1 -
c/src/ada-tests/tmtests/tm13/config.h | 1 -
c/src/ada-tests/tmtests/tm14/config.h | 1 -
c/src/ada-tests/tmtests/tm15/config.h | 1 -
c/src/ada-tests/tmtests/tm16/config.h | 1 -
c/src/ada-tests/tmtests/tm17/config.h | 1 -
c/src/ada-tests/tmtests/tm18/config.h | 1 -
c/src/ada-tests/tmtests/tm19/config.h | 1 -
c/src/ada-tests/tmtests/tm20/config.h | 1 -
c/src/ada-tests/tmtests/tm21/config.h | 1 -
c/src/ada-tests/tmtests/tm22/config.h | 1 -
c/src/ada-tests/tmtests/tm23/config.h | 1 -
c/src/ada-tests/tmtests/tm24/config.h | 1 -
c/src/ada-tests/tmtests/tm25/config.h | 1 -
c/src/ada-tests/tmtests/tm28/config.h | 1 -
c/src/ada-tests/tmtests/tm29/config.h | 1 -
c/src/ada-tests/tmtests/tmck/config.h | 1 -
c/src/ada-tests/tmtests/tmoverhd/config.h | 1 -
cpukit/libcsupport/include/rtems/libcsupport.h | 1 -
cpukit/libcsupport/src/resource_snapshot.c | 2 -
cpukit/posix/Makefile.am | 21 ++--
cpukit/posix/include/rtems/posix/cond.h | 57 ---------
cpukit/posix/include/rtems/posix/condimpl.h | 132 +++++++++++++--------
cpukit/posix/include/rtems/posix/config.h | 6 -
cpukit/posix/preinstall.am | 12 +-
cpukit/posix/src/cond.c | 65 ----------
cpukit/posix/src/conddestroy.c | 26 ++--
cpukit/posix/src/condget.c | 30 -----
cpukit/posix/src/condinit.c | 62 +++++-----
cpukit/posix/src/condsignalsupp.c | 35 +++---
cpukit/posix/src/condwait.c | 21 ++++
cpukit/posix/src/condwaitsupp.c | 27 ++---
cpukit/rtems/src/rtemsobjectgetapiclassname.c | 1 -
cpukit/sapi/include/confdefs.h | 63 ----------
cpukit/sapi/src/posixapi.c | 33 ++++++
cpukit/score/include/rtems/score/objectimpl.h | 1 -
cpukit/score/include/rtems/sysinit.h | 1 -
testsuites/psxtests/psx10/init.c | 129 ++++++++++++++++++--
testsuites/psxtests/psx10/psx10.scn | 2 -
testsuites/psxtests/psx10/system.h | 1 -
testsuites/psxtests/psxaio01/system.h | 1 -
testsuites/psxtests/psxaio02/system.h | 1 -
testsuites/psxtests/psxaio03/system.h | 1 -
testsuites/psxtests/psxautoinit02/init.c | 63 ++++++++--
.../psxtests/psxautoinit02/psxautoinit02.scn | 15 ++-
testsuites/psxtests/psxcleanup/system.h | 1 -
testsuites/psxtests/psxcond01/init.c | 1 -
testsuites/psxtests/psxconfig01/init.c | 14 ---
testsuites/psxtests/psxkey07/init.c | 1 -
testsuites/psxtests/psxsignal06/init.c | 1 -
testsuites/psxtests/psxtimer01/system.h | 1 -
testsuites/psxtmtests/psxtmcond01/init.c | 1 -
testsuites/psxtmtests/psxtmcond02/init.c | 1 -
testsuites/psxtmtests/psxtmcond03/init.c | 1 -
testsuites/psxtmtests/psxtmcond04/init.c | 1 -
testsuites/psxtmtests/psxtmcond05/init.c | 1 -
testsuites/psxtmtests/psxtmcond06/init.c | 1 -
testsuites/psxtmtests/psxtmcond07/init.c | 1 -
testsuites/psxtmtests/psxtmcond08/init.c | 2 -
testsuites/sptests/spsysinit01/init.c | 17 ---
testsuites/sptests/spthreadq01/init.c | 3 -
113 files changed, 408 insertions(+), 519 deletions(-)
diff --git a/c/src/ada-tests/mptests/mp01/config_base.h b/c/src/ada-tests/mptests/mp01/config_base.h
index 2f9df40..d8fb72a 100644
--- a/c/src/ada-tests/mptests/mp01/config_base.h
+++ b/c/src/ada-tests/mptests/mp01/config_base.h
@@ -23,7 +23,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/mptests/mp03/config_base.h b/c/src/ada-tests/mptests/mp03/config_base.h
index 2f9df40..d8fb72a 100644
--- a/c/src/ada-tests/mptests/mp03/config_base.h
+++ b/c/src/ada-tests/mptests/mp03/config_base.h
@@ -23,7 +23,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/mptests/mp04/config_base.h b/c/src/ada-tests/mptests/mp04/config_base.h
index 2f9df40..d8fb72a 100644
--- a/c/src/ada-tests/mptests/mp04/config_base.h
+++ b/c/src/ada-tests/mptests/mp04/config_base.h
@@ -23,7 +23,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/mptests/mp05/config_base.h b/c/src/ada-tests/mptests/mp05/config_base.h
index 2f9df40..d8fb72a 100644
--- a/c/src/ada-tests/mptests/mp05/config_base.h
+++ b/c/src/ada-tests/mptests/mp05/config_base.h
@@ -23,7 +23,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/mptests/mp06/config_base.h b/c/src/ada-tests/mptests/mp06/config_base.h
index 2f9df40..d8fb72a 100644
--- a/c/src/ada-tests/mptests/mp06/config_base.h
+++ b/c/src/ada-tests/mptests/mp06/config_base.h
@@ -23,7 +23,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/mptests/mp07/config_base.h b/c/src/ada-tests/mptests/mp07/config_base.h
index 2f9df40..d8fb72a 100644
--- a/c/src/ada-tests/mptests/mp07/config_base.h
+++ b/c/src/ada-tests/mptests/mp07/config_base.h
@@ -23,7 +23,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/mptests/mp08/config_base.h b/c/src/ada-tests/mptests/mp08/config_base.h
index 2f9df40..d8fb72a 100644
--- a/c/src/ada-tests/mptests/mp08/config_base.h
+++ b/c/src/ada-tests/mptests/mp08/config_base.h
@@ -23,7 +23,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/mptests/mp09/config_base.h b/c/src/ada-tests/mptests/mp09/config_base.h
index 2f9df40..d8fb72a 100644
--- a/c/src/ada-tests/mptests/mp09/config_base.h
+++ b/c/src/ada-tests/mptests/mp09/config_base.h
@@ -23,7 +23,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/mptests/mp10/config_base.h b/c/src/ada-tests/mptests/mp10/config_base.h
index 2f9df40..d8fb72a 100644
--- a/c/src/ada-tests/mptests/mp10/config_base.h
+++ b/c/src/ada-tests/mptests/mp10/config_base.h
@@ -23,7 +23,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/mptests/mp11/config_base.h b/c/src/ada-tests/mptests/mp11/config_base.h
index 2f9df40..d8fb72a 100644
--- a/c/src/ada-tests/mptests/mp11/config_base.h
+++ b/c/src/ada-tests/mptests/mp11/config_base.h
@@ -23,7 +23,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/mptests/mp12/config_base.h b/c/src/ada-tests/mptests/mp12/config_base.h
index 2f9df40..d8fb72a 100644
--- a/c/src/ada-tests/mptests/mp12/config_base.h
+++ b/c/src/ada-tests/mptests/mp12/config_base.h
@@ -23,7 +23,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/mptests/mp13/config_base.h b/c/src/ada-tests/mptests/mp13/config_base.h
index 2f9df40..d8fb72a 100644
--- a/c/src/ada-tests/mptests/mp13/config_base.h
+++ b/c/src/ada-tests/mptests/mp13/config_base.h
@@ -23,7 +23,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/mptests/mp14/config_base.h b/c/src/ada-tests/mptests/mp14/config_base.h
index 2f9df40..d8fb72a 100644
--- a/c/src/ada-tests/mptests/mp14/config_base.h
+++ b/c/src/ada-tests/mptests/mp14/config_base.h
@@ -23,7 +23,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/samples/base_mp/config.h b/c/src/ada-tests/samples/base_mp/config.h
index d5ae258..5bc381d 100644
--- a/c/src/ada-tests/samples/base_mp/config.h
+++ b/c/src/ada-tests/samples/base_mp/config.h
@@ -25,7 +25,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
/*
* Put the overrides of default configuration parameters here.
diff --git a/c/src/ada-tests/samples/base_sp/config.h b/c/src/ada-tests/samples/base_sp/config.h
index 76699e4..99e0231 100644
--- a/c/src/ada-tests/samples/base_sp/config.h
+++ b/c/src/ada-tests/samples/base_sp/config.h
@@ -23,7 +23,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#define CONFIGURE_MAXIMUM_TASKS 2
diff --git a/c/src/ada-tests/samples/hello/config.h b/c/src/ada-tests/samples/hello/config.h
index f4febdf..712c14c 100644
--- a/c/src/ada-tests/samples/hello/config.h
+++ b/c/src/ada-tests/samples/hello/config.h
@@ -24,7 +24,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#define CONFIGURE_MAXIMUM_TASKS 1
diff --git a/c/src/ada-tests/samples/nsecs/config.h b/c/src/ada-tests/samples/nsecs/config.h
index 909750a..c359b76 100644
--- a/c/src/ada-tests/samples/nsecs/config.h
+++ b/c/src/ada-tests/samples/nsecs/config.h
@@ -23,7 +23,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#define CONFIGURE_MAXIMUM_TASKS 1
diff --git a/c/src/ada-tests/samples/ticker/config.h b/c/src/ada-tests/samples/ticker/config.h
index 43d27fd..0fb068f 100644
--- a/c/src/ada-tests/samples/ticker/config.h
+++ b/c/src/ada-tests/samples/ticker/config.h
@@ -23,7 +23,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#define CONFIGURE_MAXIMUM_TASKS 4
diff --git a/c/src/ada-tests/sptests/sp01/config.h b/c/src/ada-tests/sptests/sp01/config.h
index f7858db..4cc789d 100644
--- a/c/src/ada-tests/sptests/sp01/config.h
+++ b/c/src/ada-tests/sptests/sp01/config.h
@@ -23,7 +23,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#define CONFIGURE_MAXIMUM_TASKS 4
diff --git a/c/src/ada-tests/sptests/sp02/config.h b/c/src/ada-tests/sptests/sp02/config.h
index 43d27fd..0fb068f 100644
--- a/c/src/ada-tests/sptests/sp02/config.h
+++ b/c/src/ada-tests/sptests/sp02/config.h
@@ -23,7 +23,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#define CONFIGURE_MAXIMUM_TASKS 4
diff --git a/c/src/ada-tests/sptests/sp03/config.h b/c/src/ada-tests/sptests/sp03/config.h
index eb1076e..655026e 100644
--- a/c/src/ada-tests/sptests/sp03/config.h
+++ b/c/src/ada-tests/sptests/sp03/config.h
@@ -23,7 +23,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#define CONFIGURE_MAXIMUM_TASKS 3
diff --git a/c/src/ada-tests/sptests/sp04/config.h b/c/src/ada-tests/sptests/sp04/config.h
index b8ae20e..a7b928f 100644
--- a/c/src/ada-tests/sptests/sp04/config.h
+++ b/c/src/ada-tests/sptests/sp04/config.h
@@ -26,7 +26,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#define CONFIGURE_MAXIMUM_TASKS 4
diff --git a/c/src/ada-tests/sptests/sp05/config.h b/c/src/ada-tests/sptests/sp05/config.h
index 2bf7d9e..b72a42b 100644
--- a/c/src/ada-tests/sptests/sp05/config.h
+++ b/c/src/ada-tests/sptests/sp05/config.h
@@ -25,7 +25,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#define CONFIGURE_MAXIMUM_TASKS 4
diff --git a/c/src/ada-tests/sptests/sp06/config.h b/c/src/ada-tests/sptests/sp06/config.h
index 2bf7d9e..b72a42b 100644
--- a/c/src/ada-tests/sptests/sp06/config.h
+++ b/c/src/ada-tests/sptests/sp06/config.h
@@ -25,7 +25,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#define CONFIGURE_MAXIMUM_TASKS 4
diff --git a/c/src/ada-tests/sptests/sp07/config.h b/c/src/ada-tests/sptests/sp07/config.h
index 7bef527..afc6b2f 100644
--- a/c/src/ada-tests/sptests/sp07/config.h
+++ b/c/src/ada-tests/sptests/sp07/config.h
@@ -26,7 +26,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#define CONFIGURE_MAXIMUM_TASKS 5
diff --git a/c/src/ada-tests/sptests/sp08/config.h b/c/src/ada-tests/sptests/sp08/config.h
index 678bdc1..3808837 100644
--- a/c/src/ada-tests/sptests/sp08/config.h
+++ b/c/src/ada-tests/sptests/sp08/config.h
@@ -25,7 +25,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#define CONFIGURE_MAXIMUM_TASKS 2
diff --git a/c/src/ada-tests/sptests/sp09/config.h b/c/src/ada-tests/sptests/sp09/config.h
index 288d72a..861180e 100644
--- a/c/src/ada-tests/sptests/sp09/config.h
+++ b/c/src/ada-tests/sptests/sp09/config.h
@@ -33,7 +33,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/sptests/sp11/config.h b/c/src/ada-tests/sptests/sp11/config.h
index ba7dbe9..f4ef59e 100644
--- a/c/src/ada-tests/sptests/sp11/config.h
+++ b/c/src/ada-tests/sptests/sp11/config.h
@@ -27,7 +27,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/sptests/sp12/config.h b/c/src/ada-tests/sptests/sp12/config.h
index fdaeb98..2be58db 100644
--- a/c/src/ada-tests/sptests/sp12/config.h
+++ b/c/src/ada-tests/sptests/sp12/config.h
@@ -27,7 +27,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/sptests/sp13/config.h b/c/src/ada-tests/sptests/sp13/config.h
index 93dd34b..448cea9 100644
--- a/c/src/ada-tests/sptests/sp13/config.h
+++ b/c/src/ada-tests/sptests/sp13/config.h
@@ -27,7 +27,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/sptests/sp14/config.h b/c/src/ada-tests/sptests/sp14/config.h
index fddc75c..89071c3 100644
--- a/c/src/ada-tests/sptests/sp14/config.h
+++ b/c/src/ada-tests/sptests/sp14/config.h
@@ -27,7 +27,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/sptests/sp15/config.h b/c/src/ada-tests/sptests/sp15/config.h
index 47aacda..8db00f3 100644
--- a/c/src/ada-tests/sptests/sp15/config.h
+++ b/c/src/ada-tests/sptests/sp15/config.h
@@ -27,7 +27,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/sptests/sp16/config.h b/c/src/ada-tests/sptests/sp16/config.h
index 6055b61..63bdd59 100644
--- a/c/src/ada-tests/sptests/sp16/config.h
+++ b/c/src/ada-tests/sptests/sp16/config.h
@@ -27,7 +27,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/sptests/sp17/config.h b/c/src/ada-tests/sptests/sp17/config.h
index b3cfdae..ce8ea37 100644
--- a/c/src/ada-tests/sptests/sp17/config.h
+++ b/c/src/ada-tests/sptests/sp17/config.h
@@ -27,7 +27,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/sptests/sp19/config.h b/c/src/ada-tests/sptests/sp19/config.h
index 8776bfe..9264b83 100644
--- a/c/src/ada-tests/sptests/sp19/config.h
+++ b/c/src/ada-tests/sptests/sp19/config.h
@@ -23,7 +23,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#define CONFIGURE_MAXIMUM_TASKS 7
diff --git a/c/src/ada-tests/sptests/sp20/config.h b/c/src/ada-tests/sptests/sp20/config.h
index d01f68e..ccbd3e6 100644
--- a/c/src/ada-tests/sptests/sp20/config.h
+++ b/c/src/ada-tests/sptests/sp20/config.h
@@ -26,7 +26,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/sptests/sp22/config.h b/c/src/ada-tests/sptests/sp22/config.h
index 29246a1..36a984a 100644
--- a/c/src/ada-tests/sptests/sp22/config.h
+++ b/c/src/ada-tests/sptests/sp22/config.h
@@ -26,7 +26,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/sptests/sp23/config.h b/c/src/ada-tests/sptests/sp23/config.h
index f6e9467..de87c32 100644
--- a/c/src/ada-tests/sptests/sp23/config.h
+++ b/c/src/ada-tests/sptests/sp23/config.h
@@ -26,7 +26,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/sptests/sp24/config.h b/c/src/ada-tests/sptests/sp24/config.h
index 70a92d7..bfd5f1e 100644
--- a/c/src/ada-tests/sptests/sp24/config.h
+++ b/c/src/ada-tests/sptests/sp24/config.h
@@ -26,7 +26,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/sptests/sp25/config.h b/c/src/ada-tests/sptests/sp25/config.h
index b6ce643..ab5b735 100644
--- a/c/src/ada-tests/sptests/sp25/config.h
+++ b/c/src/ada-tests/sptests/sp25/config.h
@@ -26,7 +26,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/sptests/spname01/config.h b/c/src/ada-tests/sptests/spname01/config.h
index f4febdf..712c14c 100644
--- a/c/src/ada-tests/sptests/spname01/config.h
+++ b/c/src/ada-tests/sptests/spname01/config.h
@@ -24,7 +24,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#define CONFIGURE_MAXIMUM_TASKS 1
diff --git a/c/src/ada-tests/tmtests/tm01/config.h b/c/src/ada-tests/tmtests/tm01/config.h
index 4696518..2a72054 100644
--- a/c/src/ada-tests/tmtests/tm01/config.h
+++ b/c/src/ada-tests/tmtests/tm01/config.h
@@ -27,7 +27,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/tmtests/tm02/config.h b/c/src/ada-tests/tmtests/tm02/config.h
index 2c15f3d..bd25a5b 100644
--- a/c/src/ada-tests/tmtests/tm02/config.h
+++ b/c/src/ada-tests/tmtests/tm02/config.h
@@ -28,7 +28,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/tmtests/tm03/config.h b/c/src/ada-tests/tmtests/tm03/config.h
index 2c15f3d..bd25a5b 100644
--- a/c/src/ada-tests/tmtests/tm03/config.h
+++ b/c/src/ada-tests/tmtests/tm03/config.h
@@ -28,7 +28,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/tmtests/tm04/config.h b/c/src/ada-tests/tmtests/tm04/config.h
index 6a35a2e..d861fe9 100644
--- a/c/src/ada-tests/tmtests/tm04/config.h
+++ b/c/src/ada-tests/tmtests/tm04/config.h
@@ -27,7 +27,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/tmtests/tm05/config.h b/c/src/ada-tests/tmtests/tm05/config.h
index 2c15f3d..bd25a5b 100644
--- a/c/src/ada-tests/tmtests/tm05/config.h
+++ b/c/src/ada-tests/tmtests/tm05/config.h
@@ -28,7 +28,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/tmtests/tm06/config.h b/c/src/ada-tests/tmtests/tm06/config.h
index 2c15f3d..bd25a5b 100644
--- a/c/src/ada-tests/tmtests/tm06/config.h
+++ b/c/src/ada-tests/tmtests/tm06/config.h
@@ -28,7 +28,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/tmtests/tm07/config.h b/c/src/ada-tests/tmtests/tm07/config.h
index 2c15f3d..bd25a5b 100644
--- a/c/src/ada-tests/tmtests/tm07/config.h
+++ b/c/src/ada-tests/tmtests/tm07/config.h
@@ -28,7 +28,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/tmtests/tm08/config.h b/c/src/ada-tests/tmtests/tm08/config.h
index 2c15f3d..bd25a5b 100644
--- a/c/src/ada-tests/tmtests/tm08/config.h
+++ b/c/src/ada-tests/tmtests/tm08/config.h
@@ -28,7 +28,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/tmtests/tm09/config.h b/c/src/ada-tests/tmtests/tm09/config.h
index 7fb031f..60c467c 100644
--- a/c/src/ada-tests/tmtests/tm09/config.h
+++ b/c/src/ada-tests/tmtests/tm09/config.h
@@ -27,7 +27,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/tmtests/tm10/config.h b/c/src/ada-tests/tmtests/tm10/config.h
index 0d33e36..df3eb12 100644
--- a/c/src/ada-tests/tmtests/tm10/config.h
+++ b/c/src/ada-tests/tmtests/tm10/config.h
@@ -27,7 +27,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/tmtests/tm11/config.h b/c/src/ada-tests/tmtests/tm11/config.h
index 9bcf4c0..4372641 100644
--- a/c/src/ada-tests/tmtests/tm11/config.h
+++ b/c/src/ada-tests/tmtests/tm11/config.h
@@ -27,7 +27,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/tmtests/tm12/config.h b/c/src/ada-tests/tmtests/tm12/config.h
index 9bcf4c0..4372641 100644
--- a/c/src/ada-tests/tmtests/tm12/config.h
+++ b/c/src/ada-tests/tmtests/tm12/config.h
@@ -27,7 +27,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/tmtests/tm13/config.h b/c/src/ada-tests/tmtests/tm13/config.h
index 9bcf4c0..4372641 100644
--- a/c/src/ada-tests/tmtests/tm13/config.h
+++ b/c/src/ada-tests/tmtests/tm13/config.h
@@ -27,7 +27,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/tmtests/tm14/config.h b/c/src/ada-tests/tmtests/tm14/config.h
index 9bcf4c0..4372641 100644
--- a/c/src/ada-tests/tmtests/tm14/config.h
+++ b/c/src/ada-tests/tmtests/tm14/config.h
@@ -27,7 +27,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/tmtests/tm15/config.h b/c/src/ada-tests/tmtests/tm15/config.h
index 9bcf4c0..4372641 100644
--- a/c/src/ada-tests/tmtests/tm15/config.h
+++ b/c/src/ada-tests/tmtests/tm15/config.h
@@ -27,7 +27,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/tmtests/tm16/config.h b/c/src/ada-tests/tmtests/tm16/config.h
index 9bcf4c0..4372641 100644
--- a/c/src/ada-tests/tmtests/tm16/config.h
+++ b/c/src/ada-tests/tmtests/tm16/config.h
@@ -27,7 +27,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/tmtests/tm17/config.h b/c/src/ada-tests/tmtests/tm17/config.h
index 9bcf4c0..4372641 100644
--- a/c/src/ada-tests/tmtests/tm17/config.h
+++ b/c/src/ada-tests/tmtests/tm17/config.h
@@ -27,7 +27,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/tmtests/tm18/config.h b/c/src/ada-tests/tmtests/tm18/config.h
index 9bcf4c0..4372641 100644
--- a/c/src/ada-tests/tmtests/tm18/config.h
+++ b/c/src/ada-tests/tmtests/tm18/config.h
@@ -27,7 +27,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/tmtests/tm19/config.h b/c/src/ada-tests/tmtests/tm19/config.h
index 9bcf4c0..4372641 100644
--- a/c/src/ada-tests/tmtests/tm19/config.h
+++ b/c/src/ada-tests/tmtests/tm19/config.h
@@ -27,7 +27,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/tmtests/tm20/config.h b/c/src/ada-tests/tmtests/tm20/config.h
index b56b34c..c2ea25d 100644
--- a/c/src/ada-tests/tmtests/tm20/config.h
+++ b/c/src/ada-tests/tmtests/tm20/config.h
@@ -28,7 +28,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/tmtests/tm21/config.h b/c/src/ada-tests/tmtests/tm21/config.h
index e16b8b3..b397ebc 100644
--- a/c/src/ada-tests/tmtests/tm21/config.h
+++ b/c/src/ada-tests/tmtests/tm21/config.h
@@ -33,7 +33,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/tmtests/tm22/config.h b/c/src/ada-tests/tmtests/tm22/config.h
index a4612b1..7e2efe1 100644
--- a/c/src/ada-tests/tmtests/tm22/config.h
+++ b/c/src/ada-tests/tmtests/tm22/config.h
@@ -27,7 +27,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/tmtests/tm23/config.h b/c/src/ada-tests/tmtests/tm23/config.h
index 33b3dc3..da5214b 100644
--- a/c/src/ada-tests/tmtests/tm23/config.h
+++ b/c/src/ada-tests/tmtests/tm23/config.h
@@ -27,7 +27,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/tmtests/tm24/config.h b/c/src/ada-tests/tmtests/tm24/config.h
index c59203a..13e936b 100644
--- a/c/src/ada-tests/tmtests/tm24/config.h
+++ b/c/src/ada-tests/tmtests/tm24/config.h
@@ -26,7 +26,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/tmtests/tm25/config.h b/c/src/ada-tests/tmtests/tm25/config.h
index 6a35a2e..d861fe9 100644
--- a/c/src/ada-tests/tmtests/tm25/config.h
+++ b/c/src/ada-tests/tmtests/tm25/config.h
@@ -27,7 +27,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/tmtests/tm28/config.h b/c/src/ada-tests/tmtests/tm28/config.h
index 710b2b6..bf2a951 100644
--- a/c/src/ada-tests/tmtests/tm28/config.h
+++ b/c/src/ada-tests/tmtests/tm28/config.h
@@ -27,7 +27,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/tmtests/tm29/config.h b/c/src/ada-tests/tmtests/tm29/config.h
index c294a07..b81f5d1 100644
--- a/c/src/ada-tests/tmtests/tm29/config.h
+++ b/c/src/ada-tests/tmtests/tm29/config.h
@@ -27,7 +27,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/tmtests/tmck/config.h b/c/src/ada-tests/tmtests/tmck/config.h
index 4696518..2a72054 100644
--- a/c/src/ada-tests/tmtests/tmck/config.h
+++ b/c/src/ada-tests/tmtests/tmck/config.h
@@ -27,7 +27,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/c/src/ada-tests/tmtests/tmoverhd/config.h b/c/src/ada-tests/tmtests/tmoverhd/config.h
index 4696518..2a72054 100644
--- a/c/src/ada-tests/tmtests/tmoverhd/config.h
+++ b/c/src/ada-tests/tmtests/tmoverhd/config.h
@@ -27,7 +27,6 @@
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#include <rtems/confdefs.h>
diff --git a/cpukit/libcsupport/include/rtems/libcsupport.h b/cpukit/libcsupport/include/rtems/libcsupport.h
index 3246209..080fee4 100644
--- a/cpukit/libcsupport/include/rtems/libcsupport.h
+++ b/cpukit/libcsupport/include/rtems/libcsupport.h
@@ -111,7 +111,6 @@ typedef struct {
} rtems_resource_rtems_api;
typedef struct {
- uint32_t active_condition_variables;
uint32_t active_message_queues;
uint32_t active_mutexes;
uint32_t active_semaphores;
diff --git a/cpukit/libcsupport/src/resource_snapshot.c b/cpukit/libcsupport/src/resource_snapshot.c
index 243ffd3..695c948 100644
--- a/cpukit/libcsupport/src/resource_snapshot.c
+++ b/cpukit/libcsupport/src/resource_snapshot.c
@@ -42,7 +42,6 @@
#ifdef RTEMS_POSIX_API
#include <rtems/posix/barrierimpl.h>
- #include <rtems/posix/condimpl.h>
#include <rtems/posix/mqueueimpl.h>
#include <rtems/posix/muteximpl.h>
#include <rtems/posix/psignal.h>
@@ -68,7 +67,6 @@ static const struct {
{ OBJECTS_CLASSIC_API, OBJECTS_RTEMS_TIMERS }
#ifdef RTEMS_POSIX_API
,
- { OBJECTS_POSIX_API, OBJECTS_POSIX_CONDITION_VARIABLES },
{ OBJECTS_POSIX_API, OBJECTS_POSIX_MESSAGE_QUEUES },
{ OBJECTS_POSIX_API, OBJECTS_POSIX_MUTEXES },
{ OBJECTS_POSIX_API, OBJECTS_POSIX_SEMAPHORES },
diff --git a/cpukit/posix/Makefile.am b/cpukit/posix/Makefile.am
index b69ca23..99d1e7d 100644
--- a/cpukit/posix/Makefile.am
+++ b/cpukit/posix/Makefile.am
@@ -17,6 +17,7 @@ include_rtems_posix_HEADERS = include/rtems/posix/sigset.h
## Some POSIX threads features are needed all the time
include_rtems_posix_HEADERS += include/rtems/posix/barrierimpl.h
+include_rtems_posix_HEADERS += include/rtems/posix/condimpl.h
include_rtems_posix_HEADERS += include/rtems/posix/key.h
include_rtems_posix_HEADERS += include/rtems/posix/keyimpl.h
include_rtems_posix_HEADERS += include/rtems/posix/config.h
@@ -34,8 +35,6 @@ include_HEADERS += include/mqueue.h
# include/rtems/posix
include_rtems_posix_HEADERS += include/rtems/posix/aio_misc.h
-include_rtems_posix_HEADERS += include/rtems/posix/cond.h
-include_rtems_posix_HEADERS += include/rtems/posix/condimpl.h
include_rtems_posix_HEADERS += include/rtems/posix/mmanimpl.h
include_rtems_posix_HEADERS += include/rtems/posix/mqueue.h
include_rtems_posix_HEADERS += include/rtems/posix/mqueueimpl.h
@@ -72,6 +71,15 @@ libposix_a_SOURCES += src/barrierattrdestroy.c src/barrierattrgetpshared.c \
src/pbarrierdestroy.c src/pbarrierinit.c \
src/pbarrierwait.c
+## CONDITION_VARIABLE_C_FILES
+libposix_a_SOURCES += src/condattrdestroy.c \
+ src/condattrinit.c \
+ src/condattrgetpshared.c src/condattrsetpshared.c \
+ src/condattrgetclock.c src/condattrsetclock.c \
+ src/condbroadcast.c src/conddefaultattributes.c src/conddestroy.c \
+ src/condinit.c src/condsignal.c src/condsignalsupp.c \
+ src/condtimedwait.c src/condwait.c src/condwaitsupp.c
+
if HAS_PTHREADS
libposix_a_SOURCES += src/pthreadatfork.c
@@ -80,15 +88,6 @@ libposix_a_SOURCES += src/cancel.c \
src/cleanuppush.c src/setcancelstate.c \
src/setcanceltype.c src/testcancel.c
-## CONDITION_VARIABLE_C_FILES
-libposix_a_SOURCES += src/cond.c src/condattrdestroy.c \
- src/condattrinit.c \
- src/condattrgetpshared.c src/condattrsetpshared.c \
- src/condattrgetclock.c src/condattrsetclock.c \
- src/condbroadcast.c src/conddefaultattributes.c src/conddestroy.c \
- src/condinit.c src/condsignal.c src/condsignalsupp.c \
- src/condtimedwait.c src/condwait.c src/condwaitsupp.c src/condget.c
-
## MEMORY_C_FILES
libposix_a_SOURCES += src/mlockall.c
libposix_a_SOURCES += src/mlock.c
diff --git a/cpukit/posix/include/rtems/posix/cond.h b/cpukit/posix/include/rtems/posix/cond.h
deleted file mode 100644
index 52b9a59..0000000
--- a/cpukit/posix/include/rtems/posix/cond.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * @file
- *
- * @brief POSIX Condition Variables Private Support
- *
- * This include file contains all the private support information for
- * POSIX condition variables.
- */
-
-/*
- * COPYRIGHT (c) 1989-2011.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
- */
-
-#ifndef _RTEMS_POSIX_COND_H
-#define _RTEMS_POSIX_COND_H
-
-#include <rtems/score/object.h>
-#include <rtems/score/threadq.h>
-
-#include <pthread.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @defgroup POSIX_COND_VARS POSIX Condition Variables
- *
- * @ingroup POSIXAPI
- *
- */
-/**@{**/
-
-/*
- * Data Structure used to manage a POSIX condition variable
- */
-
-typedef struct {
- Objects_Control Object;
- Thread_queue_Control Wait_queue;
- pthread_mutex_t *mutex;
- clockid_t clock;
-} POSIX_Condition_variables_Control;
-
-#ifdef __cplusplus
-}
-#endif
-
-/** @} */
-
-#endif
-/* end of include file */
diff --git a/cpukit/posix/include/rtems/posix/condimpl.h b/cpukit/posix/include/rtems/posix/condimpl.h
index e9375c1..66e09bf 100644
--- a/cpukit/posix/include/rtems/posix/condimpl.h
+++ b/cpukit/posix/include/rtems/posix/condimpl.h
@@ -16,17 +16,29 @@
#ifndef _RTEMS_POSIX_CONDIMPL_H
#define _RTEMS_POSIX_CONDIMPL_H
-
-#include <rtems/posix/cond.h>
-#include <rtems/score/objectimpl.h>
-#include <rtems/score/threadqimpl.h>
#include <errno.h>
+#include <pthread.h>
+
+#include <rtems/score/percpu.h>
+#include <rtems/score/threadqimpl.h>
#ifdef __cplusplus
extern "C" {
#endif
+typedef struct {
+ unsigned long flags;
+ Thread_queue_Syslock_queue Queue;
+ pthread_mutex_t *mutex;
+} POSIX_Condition_variables_Control;
+
+#define POSIX_CONDITION_VARIABLES_CLOCK_MONOTONIC 0x1UL
+
+#define POSIX_CONDITION_VARIABLES_FLAGS_MASK 0x1UL
+
+#define POSIX_CONDITION_VARIABLES_MAGIC 0x18dfb1feUL
+
/**
* Constant to indicate condition variable does not currently have
* a mutex assigned to it.
@@ -37,86 +49,89 @@ extern "C" {
#define POSIX_CONDITION_VARIABLE_OF_THREAD_QUEUE_QUEUE( queue ) \
RTEMS_CONTAINER_OF( \
- queue, POSIX_Condition_variables_Control, Wait_queue.Queue )
-
-/**
- * The following defines the information control block used to manage
- * this class of objects.
- */
-extern Objects_Information _POSIX_Condition_variables_Information;
+ queue, POSIX_Condition_variables_Control, Queue.Queue )
/**
* The default condition variable attributes structure.
*/
extern const pthread_condattr_t _POSIX_Condition_variables_Default_attributes;
+static inline POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get(
+ pthread_cond_t *cond
+)
+{
+ return (POSIX_Condition_variables_Control *) cond;
+}
+
RTEMS_INLINE_ROUTINE void _POSIX_Condition_variables_Initialize(
POSIX_Condition_variables_Control *the_cond,
const pthread_condattr_t *the_attr
)
{
- _Thread_queue_Object_initialize( &the_cond->Wait_queue );
+ unsigned long flags;
+
+ _Thread_queue_Queue_initialize( &the_cond->Queue.Queue, NULL );
the_cond->mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
- the_cond->clock = the_attr->clock;
+
+ flags = (uintptr_t) the_cond ^ POSIX_CONDITION_VARIABLES_MAGIC;
+ flags &= ~POSIX_CONDITION_VARIABLES_FLAGS_MASK;
+
+ if ( the_attr->clock == CLOCK_MONOTONIC ) {
+ flags |= POSIX_CONDITION_VARIABLES_CLOCK_MONOTONIC;
+ }
+
+ the_cond->flags = flags;
}
RTEMS_INLINE_ROUTINE void _POSIX_Condition_variables_Destroy(
POSIX_Condition_variables_Control *the_cond
)
{
- _Thread_queue_Destroy( &the_cond->Wait_queue );
+ the_cond->flags = ~the_cond->flags;
}
-RTEMS_INLINE_ROUTINE void _POSIX_Condition_variables_Acquire_critical(
- POSIX_Condition_variables_Control *the_cond,
- Thread_queue_Context *queue_context
+RTEMS_INLINE_ROUTINE clockid_t _POSIX_Condition_variables_Get_clock(
+ unsigned long flags
)
{
- _Thread_queue_Acquire_critical( &the_cond->Wait_queue, queue_context );
+ if ( ( flags & POSIX_CONDITION_VARIABLES_CLOCK_MONOTONIC ) != 0 ) {
+ return CLOCK_MONOTONIC;
+ }
+
+ return CLOCK_REALTIME;
}
-RTEMS_INLINE_ROUTINE void _POSIX_Condition_variables_Release(
+RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Condition_variables_Acquire(
POSIX_Condition_variables_Control *the_cond,
Thread_queue_Context *queue_context
)
{
- _Thread_queue_Release( &the_cond->Wait_queue, queue_context );
-}
+ ISR_Level level;
+ Thread_Control *executing;
+
+ _Thread_queue_Context_ISR_disable( queue_context, level );
+ _Thread_queue_Context_set_ISR_level( queue_context, level );
+ executing = _Thread_Executing;
+ _Thread_queue_Queue_acquire_critical(
+ &the_cond->Queue.Queue,
+ &executing->Potpourri_stats,
+ &queue_context->Lock_context.Lock_context
+ );
-/**
- * @brief POSIX Condition Variable Allocate
- *
- * This function allocates a condition variable control block from
- * the inactive chain of free condition variable control blocks.
- */
-RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *
- _POSIX_Condition_variables_Allocate( void )
-{
- return (POSIX_Condition_variables_Control *)
- _Objects_Allocate( &_POSIX_Condition_variables_Information );
+ return executing;
}
-/**
- * @brief POSIX Condition Variable Free
- *
- * This routine frees a condition variable control block to the
- * inactive chain of free condition variable control blocks.
- */
-RTEMS_INLINE_ROUTINE void _POSIX_Condition_variables_Free (
- POSIX_Condition_variables_Control *the_condition_variable
+RTEMS_INLINE_ROUTINE void _POSIX_Condition_variables_Release(
+ POSIX_Condition_variables_Control *the_cond,
+ Thread_queue_Context *queue_context
)
{
- _Objects_Free(
- &_POSIX_Condition_variables_Information,
- &the_condition_variable->Object
+ _Thread_queue_Queue_release(
+ &the_cond->Queue.Queue,
+ &queue_context->Lock_context.Lock_context
);
}
-POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get(
- pthread_cond_t *cond,
- Thread_queue_Context *queue_context
-);
-
/**
* @brief Implements wake up version of the "signal" operation.
*
@@ -140,6 +155,27 @@ int _POSIX_Condition_variables_Wait_support(
const struct timespec *abstime
);
+bool _POSIX_Condition_variables_Auto_initialization(
+ POSIX_Condition_variables_Control *the_cond
+);
+
+#define POSIX_CONDITION_VARIABLES_VALIDATE_OBJECT( the_cond, flags ) \
+ do { \
+ if ( ( the_cond ) == NULL ) { \
+ return EINVAL; \
+ } \
+ flags = ( the_cond )->flags; \
+ if ( \
+ ( ( (uintptr_t) ( the_cond ) ^ POSIX_CONDITION_VARIABLES_MAGIC ) \
+ & ~POSIX_CONDITION_VARIABLES_FLAGS_MASK ) \
+ != ( flags & ~POSIX_CONDITION_VARIABLES_FLAGS_MASK ) \
+ ) { \
+ if ( !_POSIX_Condition_variables_Auto_initialization( the_cond ) ) { \
+ return EINVAL; \
+ } \
+ } \
+ } while ( 0 )
+
#ifdef __cplusplus
}
#endif
diff --git a/cpukit/posix/include/rtems/posix/config.h b/cpukit/posix/include/rtems/posix/config.h
index 799eb62..2f5a5d7 100644
--- a/cpukit/posix/include/rtems/posix/config.h
+++ b/cpukit/posix/include/rtems/posix/config.h
@@ -70,12 +70,6 @@ typedef struct {
/**
* This field contains the maximum number of POSIX API
- * condition variables which are configured for this application.
- */
- uint32_t maximum_condition_variables;
-
- /**
- * This field contains the maximum number of POSIX API
* timers which are configured for this application.
*/
uint32_t maximum_timers;
diff --git a/cpukit/posix/preinstall.am b/cpukit/posix/preinstall.am
index 45d1c46..2859993 100644
--- a/cpukit/posix/preinstall.am
+++ b/cpukit/posix/preinstall.am
@@ -31,6 +31,10 @@ $(PROJECT_INCLUDE)/rtems/posix/barrierimpl.h: include/rtems/posix/barrierimpl.h
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/posix/barrierimpl.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/posix/barrierimpl.h
+$(PROJECT_INCLUDE)/rtems/posix/condimpl.h: include/rtems/posix/condimpl.h $(PROJECT_INCLUDE)/rtems/posix/$(dirstamp)
+ $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/posix/condimpl.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/posix/condimpl.h
+
$(PROJECT_INCLUDE)/rtems/posix/key.h: include/rtems/posix/key.h $(PROJECT_INCLUDE)/rtems/posix/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/posix/key.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/posix/key.h
@@ -80,14 +84,6 @@ $(PROJECT_INCLUDE)/rtems/posix/aio_misc.h: include/rtems/posix/aio_misc.h $(PROJ
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/posix/aio_misc.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/posix/aio_misc.h
-$(PROJECT_INCLUDE)/rtems/posix/cond.h: include/rtems/posix/cond.h $(PROJECT_INCLUDE)/rtems/posix/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/posix/cond.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/posix/cond.h
-
-$(PROJECT_INCLUDE)/rtems/posix/condimpl.h: include/rtems/posix/condimpl.h $(PROJECT_INCLUDE)/rtems/posix/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/posix/condimpl.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/posix/condimpl.h
-
$(PROJECT_INCLUDE)/rtems/posix/mmanimpl.h: include/rtems/posix/mmanimpl.h $(PROJECT_INCLUDE)/rtems/posix/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/posix/mmanimpl.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/posix/mmanimpl.h
diff --git a/cpukit/posix/src/cond.c b/cpukit/posix/src/cond.c
deleted file mode 100644
index 8ee57d8..0000000
--- a/cpukit/posix/src/cond.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * @file
- *
- * @brief Initialization Necessary for this Manager
- * @ingroup POSIX_COND_VARS Condition Variables
- */
-
-/*
- * COPYRIGHT (c) 1989-2008.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
- */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <pthread.h>
-#include <errno.h>
-#include <limits.h>
-
-#include <rtems/system.h>
-#include <rtems/config.h>
-#include <rtems/sysinit.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/posix/condimpl.h>
-#include <rtems/posix/muteximpl.h>
-
-Objects_Information _POSIX_Condition_variables_Information;
-
-/*
- * _POSIX_Condition_variables_Manager_initialization
- *
- * This routine initializes all condition variable manager related data
- * structures.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- */
-
-static void _POSIX_Condition_variables_Manager_initialization(void)
-{
- _Objects_Initialize_information(
- &_POSIX_Condition_variables_Information, /* object information table */
- OBJECTS_POSIX_API, /* object API */
- OBJECTS_POSIX_CONDITION_VARIABLES, /* object class */
- Configuration_POSIX_API.maximum_condition_variables,
- /* maximum objects of this class */
- sizeof( POSIX_Condition_variables_Control ),
- /* size of this object's control block */
- true, /* true if names for this object are strings */
- _POSIX_PATH_MAX, /* maximum length of each object's name */
- NULL /* Proxy extraction support callout */
- );
-}
-
-RTEMS_SYSINIT_ITEM(
- _POSIX_Condition_variables_Manager_initialization,
- RTEMS_SYSINIT_POSIX_CONDITION_VARIABLE,
- RTEMS_SYSINIT_ORDER_MIDDLE
-);
diff --git a/cpukit/posix/src/conddestroy.c b/cpukit/posix/src/conddestroy.c
index a2c8dc1..6321436 100644
--- a/cpukit/posix/src/conddestroy.c
+++ b/cpukit/posix/src/conddestroy.c
@@ -24,36 +24,24 @@
* 11.4.2 Initializing and Destroying a Condition Variable,
* P1003.1c/Draft 10, p. 87
*/
-int pthread_cond_destroy(
- pthread_cond_t *cond
-)
+int pthread_cond_destroy( pthread_cond_t *cond )
{
POSIX_Condition_variables_Control *the_cond;
+ unsigned long flags;
Thread_queue_Context queue_context;
- _Objects_Allocator_lock();
- the_cond = _POSIX_Condition_variables_Get( cond, &queue_context );
+ the_cond = _POSIX_Condition_variables_Get( cond );
+ POSIX_CONDITION_VARIABLES_VALIDATE_OBJECT( the_cond, flags );
- if ( the_cond == NULL ) {
- _Objects_Allocator_unlock();
- return EINVAL;
- }
-
- _POSIX_Condition_variables_Acquire_critical( the_cond, &queue_context );
+ _Thread_queue_Context_initialize( &queue_context );
+ _POSIX_Condition_variables_Acquire( the_cond, &queue_context );
- if ( !_Thread_queue_Is_empty( &the_cond->Wait_queue.Queue ) ) {
+ if ( !_Thread_queue_Is_empty( &the_cond->Queue.Queue ) ) {
_POSIX_Condition_variables_Release( the_cond, &queue_context );
- _Objects_Allocator_unlock();
return EBUSY;
}
- _Objects_Close(
- &_POSIX_Condition_variables_Information,
- &the_cond->Object
- );
_POSIX_Condition_variables_Release( the_cond, &queue_context );
_POSIX_Condition_variables_Destroy( the_cond );
- _POSIX_Condition_variables_Free( the_cond );
- _Objects_Allocator_unlock();
return 0;
}
diff --git a/cpukit/posix/src/condget.c b/cpukit/posix/src/condget.c
deleted file mode 100644
index 5b086ef..0000000
--- a/cpukit/posix/src/condget.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-2007.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
- */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <rtems/posix/condimpl.h>
-#include <rtems/posix/posixapi.h>
-
-POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get(
- pthread_cond_t *cond,
- Thread_queue_Context *queue_context
-)
-{
- _POSIX_Get_object_body(
- POSIX_Condition_variables_Control,
- cond,
- queue_context,
- &_POSIX_Condition_variables_Information,
- PTHREAD_COND_INITIALIZER,
- pthread_cond_init
- );
-}
diff --git a/cpukit/posix/src/condinit.c b/cpukit/posix/src/condinit.c
index 8d3aa8e..aab26aa 100644
--- a/cpukit/posix/src/condinit.c
+++ b/cpukit/posix/src/condinit.c
@@ -21,6 +21,29 @@
#include <rtems/posix/condimpl.h>
#include <rtems/posix/posixapi.h>
+RTEMS_STATIC_ASSERT(
+ offsetof( POSIX_Condition_variables_Control, flags )
+ == offsetof( pthread_cond_t, _flags ),
+ POSIX_CONDITION_VARIABLES_CONTROL_FLAGS
+);
+
+RTEMS_STATIC_ASSERT(
+ offsetof( POSIX_Condition_variables_Control, mutex )
+ == offsetof( pthread_cond_t, _mutex ),
+ POSIX_CONDITION_VARIABLES_CONTROL_COUNT
+);
+
+RTEMS_STATIC_ASSERT(
+ offsetof( POSIX_Condition_variables_Control, Queue )
+ == offsetof( pthread_cond_t, _Queue ),
+ POSIX_CONDITION_VARIABLES_CONTROL_QUEUE
+);
+
+RTEMS_STATIC_ASSERT(
+ sizeof( POSIX_Condition_variables_Control ) == sizeof( pthread_cond_t ),
+ POSIX_CONDITION_VARIABLES_CONTROL_SIZE
+);
+
/**
* 11.4.2 Initializing and Destroying a Condition Variable,
* P1003.1c/Draft 10, p. 87
@@ -30,41 +53,26 @@ int pthread_cond_init(
const pthread_condattr_t *attr
)
{
- POSIX_Condition_variables_Control *the_cond;
- const pthread_condattr_t *the_attr;
+ POSIX_Condition_variables_Control *the_cond;
- if ( attr ) the_attr = attr;
- else the_attr = &_POSIX_Condition_variables_Default_attributes;
-
- /*
- * Be careful about attributes when global!!!
- */
-
- if ( !the_attr->is_initialized )
- return EINVAL;
+ the_cond = _POSIX_Condition_variables_Get( cond );
- if ( !_POSIX_Is_valid_pshared( the_attr->process_shared ) ) {
+ if ( the_cond == NULL ) {
return EINVAL;
}
- the_cond = _POSIX_Condition_variables_Allocate();
-
- if ( !the_cond ) {
- _Objects_Allocator_unlock();
- return ENOMEM;
+ if ( attr == NULL ) {
+ attr = &_POSIX_Condition_variables_Default_attributes;
}
- _POSIX_Condition_variables_Initialize( the_cond, the_attr );
-
- _Objects_Open_u32(
- &_POSIX_Condition_variables_Information,
- &the_cond->Object,
- 0
- );
-
- *cond = the_cond->Object.id;
+ if ( !attr->is_initialized ) {
+ return EINVAL;
+ }
- _Objects_Allocator_unlock();
+ if ( !_POSIX_Is_valid_pshared( attr->process_shared ) ) {
+ return EINVAL;
+ }
+ _POSIX_Condition_variables_Initialize( the_cond, attr );
return 0;
}
diff --git a/cpukit/posix/src/condsignalsupp.c b/cpukit/posix/src/condsignalsupp.c
index e42476e..1d9d4fc 100644
--- a/cpukit/posix/src/condsignalsupp.c
+++ b/cpukit/posix/src/condsignalsupp.c
@@ -32,29 +32,30 @@ int _POSIX_Condition_variables_Signal_support(
bool is_broadcast
)
{
- Thread_Control *the_thread;
+ POSIX_Condition_variables_Control *the_cond;
+ unsigned long flags;
+ const Thread_queue_Operations *operations;
+ Thread_queue_Heads *heads;
- do {
- POSIX_Condition_variables_Control *the_cond;
- Thread_queue_Context queue_context;
+ the_cond = _POSIX_Condition_variables_Get( cond );
+ POSIX_CONDITION_VARIABLES_VALIDATE_OBJECT( the_cond, flags );
+ operations = POSIX_CONDITION_VARIABLES_TQ_OPERATIONS;
- the_cond = _POSIX_Condition_variables_Get( cond, &queue_context );
+ do {
+ Thread_queue_Context queue_context;
- if ( the_cond == NULL ) {
- return EINVAL;
- }
+ _Thread_queue_Context_initialize( &queue_context );
+ _POSIX_Condition_variables_Acquire( the_cond, &queue_context );
- _POSIX_Condition_variables_Acquire_critical( the_cond, &queue_context );
+ heads = the_cond->Queue.Queue.heads;
- the_thread = _Thread_queue_First_locked(
- &the_cond->Wait_queue,
- POSIX_CONDITION_VARIABLES_TQ_OPERATIONS
- );
+ if ( heads != NULL ) {
+ Thread_Control *the_thread;
- if ( the_thread != NULL ) {
+ the_thread = ( *operations->first )( heads );
_Thread_queue_Extract_critical(
- &the_cond->Wait_queue.Queue,
- POSIX_CONDITION_VARIABLES_TQ_OPERATIONS,
+ &the_cond->Queue.Queue,
+ operations,
the_thread,
&queue_context
);
@@ -62,7 +63,7 @@ int _POSIX_Condition_variables_Signal_support(
the_cond->mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
_POSIX_Condition_variables_Release( the_cond, &queue_context );
}
- } while ( is_broadcast && the_thread != NULL );
+ } while ( is_broadcast && heads != NULL );
return 0;
}
diff --git a/cpukit/posix/src/condwait.c b/cpukit/posix/src/condwait.c
index 9a88287..9527077 100644
--- a/cpukit/posix/src/condwait.c
+++ b/cpukit/posix/src/condwait.c
@@ -20,6 +20,27 @@
#include <rtems/posix/condimpl.h>
+#include <string.h>
+
+bool _POSIX_Condition_variables_Auto_initialization(
+ POSIX_Condition_variables_Control *the_cond
+)
+{
+ POSIX_Condition_variables_Control zero;
+ unsigned long flags;
+
+ memset( &zero, 0, sizeof( zero ) );
+
+ if ( memcmp( the_cond, &zero, sizeof( *the_cond ) ) != 0 ) {
+ return false;
+ }
+
+ flags = (uintptr_t) the_cond ^ POSIX_CONDITION_VARIABLES_MAGIC;
+ flags &= ~POSIX_CONDITION_VARIABLES_FLAGS_MASK;
+ the_cond->flags = flags;
+ return true;
+}
+
/*
* 11.4.4 Waiting on a Condition, P1003.1c/Draft 10, p. 105
*/
diff --git a/cpukit/posix/src/condwaitsupp.c b/cpukit/posix/src/condwaitsupp.c
index 486bab8..ceaa6eb 100644
--- a/cpukit/posix/src/condwaitsupp.c
+++ b/cpukit/posix/src/condwaitsupp.c
@@ -25,8 +25,6 @@
#include <rtems/score/status.h>
#include <rtems/score/threaddispatch.h>
-THREAD_QUEUE_OBJECT_ASSERT( POSIX_Condition_variables_Control, Wait_queue );
-
static void _POSIX_Condition_variables_Enqueue_callout(
Thread_queue_Queue *queue,
Thread_Control *the_thread,
@@ -58,6 +56,7 @@ int _POSIX_Condition_variables_Wait_support(
)
{
POSIX_Condition_variables_Control *the_cond;
+ unsigned long flags;
Thread_queue_Context queue_context;
int error;
int mutex_error;
@@ -66,16 +65,10 @@ int _POSIX_Condition_variables_Wait_support(
bool already_timedout;
TOD_Absolute_timeout_conversion_results status;
- if ( mutex == NULL ) {
- return EINVAL;
- }
-
- the_cond = _POSIX_Condition_variables_Get( cond, &queue_context );
-
- if ( the_cond == NULL ) {
- return EINVAL;
- }
+ the_cond = _POSIX_Condition_variables_Get( cond );
+ POSIX_CONDITION_VARIABLES_VALIDATE_OBJECT( the_cond, flags );
+ _Thread_queue_Context_initialize( &queue_context );
already_timedout = false;
if ( abstime != NULL ) {
@@ -88,8 +81,11 @@ int _POSIX_Condition_variables_Wait_support(
* then we do a polling operation and convert the UNSATISFIED
* status into the appropriate error.
*/
- _Assert( the_cond->clock );
- status = _TOD_Absolute_timeout_to_ticks(abstime, the_cond->clock, &timeout);
+ status = _TOD_Absolute_timeout_to_ticks(
+ abstime,
+ _POSIX_Condition_variables_Get_clock( flags ),
+ &timeout
+ );
if ( status == TOD_ABSOLUTE_TIMEOUT_INVALID )
return EINVAL;
@@ -103,7 +99,7 @@ int _POSIX_Condition_variables_Wait_support(
_Thread_queue_Context_set_no_timeout( &queue_context );
}
- _POSIX_Condition_variables_Acquire_critical( the_cond, &queue_context );
+ executing = _POSIX_Condition_variables_Acquire( the_cond, &queue_context );
if (
the_cond->mutex != POSIX_CONDITION_VARIABLES_NO_MUTEX
@@ -114,7 +110,6 @@ int _POSIX_Condition_variables_Wait_support(
}
the_cond->mutex = mutex;
- executing = _Thread_Executing;
if ( !already_timedout ) {
_Thread_queue_Context_set_thread_state(
@@ -126,7 +121,7 @@ int _POSIX_Condition_variables_Wait_support(
_POSIX_Condition_variables_Enqueue_callout
);
_Thread_queue_Enqueue(
- &the_cond->Wait_queue.Queue,
+ &the_cond->Queue.Queue,
POSIX_CONDITION_VARIABLES_TQ_OPERATIONS,
executing,
&queue_context
diff --git a/cpukit/rtems/src/rtemsobjectgetapiclassname.c b/cpukit/rtems/src/rtemsobjectgetapiclassname.c
index b2db41a..00f0de8 100644
--- a/cpukit/rtems/src/rtemsobjectgetapiclassname.c
+++ b/cpukit/rtems/src/rtemsobjectgetapiclassname.c
@@ -51,7 +51,6 @@ static const rtems_assoc_t rtems_object_api_posix_assoc[] = {
{ "Message Queue", OBJECTS_POSIX_MESSAGE_QUEUES, 0},
{ "Mutex", OBJECTS_POSIX_MUTEXES, 0},
{ "Semaphore", OBJECTS_POSIX_SEMAPHORES, 0},
- { "Condition Variable", OBJECTS_POSIX_CONDITION_VARIABLES, 0},
{ "Timer", OBJECTS_POSIX_TIMERS, 0},
{ "Shared Memory", OBJECTS_POSIX_SHMS, 0},
{ NULL, 0, 0}
diff --git a/cpukit/sapi/include/confdefs.h b/cpukit/sapi/include/confdefs.h
index 596c342..402a467 100755
--- a/cpukit/sapi/include/confdefs.h
+++ b/cpukit/sapi/include/confdefs.h
@@ -1841,14 +1841,6 @@ extern rtems_initialization_tasks_table Initialization_tasks[];
* o bdbuf sync lock
*/
#define _CONFIGURE_LIBBLOCK_POSIX_MUTEXES 2
-
- /*
- * POSIX Condition Variables:
- * o bdbuf access condition
- * o bdbuf transfer condition
- * o bdbuf buffer condition
- */
- #define _CONFIGURE_LIBBLOCK_POSIX_CONDITION_VARIABLES 3
#else
/*
* Semaphores:
@@ -1862,7 +1854,6 @@ extern rtems_initialization_tasks_table Initialization_tasks[];
#define _CONFIGURE_LIBBLOCK_SEMAPHORES 6
#define _CONFIGURE_LIBBLOCK_POSIX_MUTEXES 0
- #define _CONFIGURE_LIBBLOCK_POSIX_CONDITION_VARIABLES 0
#endif
#if defined(CONFIGURE_HAS_OWN_BDBUF_TABLE) || \
@@ -1879,11 +1870,6 @@ extern rtems_initialization_tasks_table Initialization_tasks[];
#define _CONFIGURE_LIBBLOCK_SEMAPHORES 0
/** This specifies the number of POSIX Mutexes needed by libblock. */
#define _CONFIGURE_LIBBLOCK_POSIX_MUTEXES 0
- /**
- * This specifies the number of POSIX Condition Variables needed
- * by libblock.
- */
- #define _CONFIGURE_LIBBLOCK_POSIX_CONDITION_VARIABLES 0
#endif /* CONFIGURE_APPLICATION_NEEDS_LIBBLOCK */
/**@}*/
@@ -2059,10 +2045,6 @@ extern rtems_initialization_tasks_table Initialization_tasks[];
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES \
rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
#endif
- #if !defined(CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES)
- #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES \
- rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
- #endif
#if !defined(CONFIGURE_MAXIMUM_POSIX_TIMERS)
#define CONFIGURE_MAXIMUM_POSIX_TIMERS \
rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
@@ -2440,7 +2422,6 @@ extern rtems_initialization_tasks_table Initialization_tasks[];
#include <signal.h>
#include <limits.h>
#include <mqueue.h>
- #include <rtems/posix/cond.h>
#include <rtems/posix/mqueue.h>
#include <rtems/posix/mutex.h>
#include <rtems/posix/psignal.h>
@@ -2484,22 +2465,6 @@ extern rtems_initialization_tasks_table Initialization_tasks[];
/**
* This configuration parameter specifies the maximum number of
- * POSIX API condition variables.
- */
- #ifndef CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES
- #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 0
- #endif
-
- /*
- * This macro is calculated to specify the memory required for
- * POSIX API condition variables.
- */
- #define _CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES(_condvars) \
- _Configure_Object_RAM(_condvars, \
- sizeof(POSIX_Condition_variables_Control) )
-
- /**
- * This configuration parameter specifies the maximum number of
* POSIX API timers.
*/
#ifndef CONFIGURE_MAXIMUM_POSIX_TIMERS
@@ -2712,12 +2677,8 @@ extern rtems_initialization_tasks_table Initialization_tasks[];
#ifndef CONFIGURE_MAXIMUM_POSIX_MUTEXES
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 1
#endif
- #ifndef CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES
- #define CONFIGURE_MAXIMUM_CONDITION_VARIABLES 1
- #endif
#define _CONFIGURE_GO_INIT_MUTEXES 77
- #define _CONFIGURE_GO_INIT_CONDITION_VARIABLES 4
#ifndef CONFIGURE_MAXIMUM_GOROUTINES
#define CONFIGURE_MAXIMUM_GOROUTINES 400
@@ -2734,12 +2695,6 @@ extern rtems_initialization_tasks_table Initialization_tasks[];
*/
#define _CONFIGURE_GO_INIT_MUTEXES 0
- /*
- * This specifies the number of condition variables required by the Go
- * run-time for its own use.
- */
- #define _CONFIGURE_GO_INIT_CONDITION_VARIABLES 0
-
/** This specifies the maximum number of Go co-routines. */
#define CONFIGURE_MAXIMUM_GOROUTINES 0
@@ -2778,24 +2733,11 @@ extern rtems_initialization_tasks_table Initialization_tasks[];
CONFIGURE_MAXIMUM_GO_CHANNELS)
/*
- * This macro provides summation of the POSIX Condition Variables.
- */
- #define _CONFIGURE_POSIX_CONDITION_VARIABLES \
- (CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES + \
- _CONFIGURE_LIBBLOCK_POSIX_CONDITION_VARIABLES + \
- CONFIGURE_MAXIMUM_ADA_TASKS + \
- CONFIGURE_MAXIMUM_FAKE_ADA_TASKS + \
- _CONFIGURE_GO_INIT_CONDITION_VARIABLES + \
- CONFIGURE_MAXIMUM_GO_CHANNELS)
-
- /*
* This macro is calculated to specify the memory required for
* the POSIX API in its entirety.
*/
#define _CONFIGURE_MEMORY_FOR_POSIX \
(_CONFIGURE_MEMORY_FOR_POSIX_MUTEXES(_CONFIGURE_POSIX_MUTEXES) + \
- _CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES( \
- _CONFIGURE_POSIX_CONDITION_VARIABLES) + \
_CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS( \
CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS) + \
_CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES( \
@@ -3248,7 +3190,6 @@ extern rtems_initialization_tasks_table Initialization_tasks[];
posix_api_configuration_table Configuration_POSIX_API = {
_CONFIGURE_POSIX_THREADS,
_CONFIGURE_POSIX_MUTEXES,
- _CONFIGURE_POSIX_CONDITION_VARIABLES,
CONFIGURE_MAXIMUM_POSIX_TIMERS,
CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS,
CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES,
@@ -3462,7 +3403,6 @@ extern rtems_initialization_tasks_table Initialization_tasks[];
#ifdef RTEMS_POSIX_API
/* POSIX API Pieces */
uint32_t POSIX_MUTEXES;
- uint32_t POSIX_CONDITION_VARIABLES;
uint32_t POSIX_TIMERS;
uint32_t POSIX_QUEUED_SIGNALS;
uint32_t POSIX_MESSAGE_QUEUES;
@@ -3512,8 +3452,6 @@ extern rtems_initialization_tasks_table Initialization_tasks[];
#ifdef RTEMS_POSIX_API
/* POSIX API Pieces */
_CONFIGURE_MEMORY_FOR_POSIX_MUTEXES( _CONFIGURE_POSIX_MUTEXES ),
- _CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES(
- _CONFIGURE_POSIX_CONDITION_VARIABLES ),
_CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS(
CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS ),
_CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES(
@@ -3584,7 +3522,6 @@ extern rtems_initialization_tasks_table Initialization_tasks[];
#if !defined(RTEMS_POSIX_API)
#if ((CONFIGURE_MAXIMUM_POSIX_THREADS != 0) || \
(CONFIGURE_MAXIMUM_POSIX_MUTEXES != 0) || \
- (CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES != 0) || \
(CONFIGURE_MAXIMUM_POSIX_TIMERS != 0) || \
(CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS != 0) || \
(CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES != 0) || \
diff --git a/cpukit/sapi/src/posixapi.c b/cpukit/sapi/src/posixapi.c
index 41325bb..86fdf12 100644
--- a/cpukit/sapi/src/posixapi.c
+++ b/cpukit/sapi/src/posixapi.c
@@ -21,6 +21,7 @@
#include <rtems/posix/posixapi.h>
#include <rtems/posix/barrierimpl.h>
+#include <rtems/posix/condimpl.h>
#include <rtems/posix/rwlockimpl.h>
#include <rtems/posix/semaphoreimpl.h>
#include <rtems/score/heap.h>
@@ -86,6 +87,26 @@ RTEMS_STATIC_ASSERT(
POSIX_RWLOCK_MAGIC != HEAP_FREE_PATTERN,
POSIX_RWLOCK_MAGIC_4
);
+RTEMS_STATIC_ASSERT(
+ POSIX_CONDITION_VARIABLES_MAGIC != HEAP_BEGIN_PROTECTOR_0,
+ POSIX_CONDITION_VARIABLES_MAGIC_0
+);
+RTEMS_STATIC_ASSERT(
+ POSIX_CONDITION_VARIABLES_MAGIC != HEAP_BEGIN_PROTECTOR_1,
+ POSIX_CONDITION_VARIABLES_MAGIC_1
+);
+RTEMS_STATIC_ASSERT(
+ POSIX_CONDITION_VARIABLES_MAGIC != HEAP_END_PROTECTOR_0,
+ POSIX_CONDITION_VARIABLES_MAGIC_2
+);
+RTEMS_STATIC_ASSERT(
+ POSIX_CONDITION_VARIABLES_MAGIC != HEAP_END_PROTECTOR_1,
+ POSIX_CONDITION_VARIABLES_MAGIC_3
+);
+RTEMS_STATIC_ASSERT(
+ POSIX_CONDITION_VARIABLES_MAGIC != HEAP_FREE_PATTERN,
+ POSIX_CONDITION_VARIABLES_MAGIC_4
+);
#endif
RTEMS_STATIC_ASSERT(
@@ -97,9 +118,21 @@ RTEMS_STATIC_ASSERT(
POSIX_SEMAPHORE_MAGIC_6
);
RTEMS_STATIC_ASSERT(
+ POSIX_SEMAPHORE_MAGIC != POSIX_CONDITION_VARIABLES_MAGIC,
+ POSIX_SEMAPHORE_MAGIC_7
+);
+RTEMS_STATIC_ASSERT(
POSIX_BARRIER_MAGIC != POSIX_RWLOCK_MAGIC,
POSIX_BARRIER_MAGIC_5
);
+RTEMS_STATIC_ASSERT(
+ POSIX_BARRIER_MAGIC != POSIX_CONDITION_VARIABLES_MAGIC,
+ POSIX_BARRIER_MAGIC_6
+);
+RTEMS_STATIC_ASSERT(
+ POSIX_RWLOCK_MAGIC != POSIX_CONDITION_VARIABLES_MAGIC,
+ POSIX_RWLOCK_MAGIC_5
+);
void _POSIX_Fatal_error( POSIX_Fatal_domain domain, int eno )
{
diff --git a/cpukit/score/include/rtems/score/objectimpl.h b/cpukit/score/include/rtems/score/objectimpl.h
index f8e7ddd..435e82c 100644
--- a/cpukit/score/include/rtems/score/objectimpl.h
+++ b/cpukit/score/include/rtems/score/objectimpl.h
@@ -89,7 +89,6 @@ typedef enum {
OBJECTS_POSIX_MESSAGE_QUEUES = 5,
OBJECTS_POSIX_MUTEXES = 6,
OBJECTS_POSIX_SEMAPHORES = 7,
- OBJECTS_POSIX_CONDITION_VARIABLES = 8,
OBJECTS_POSIX_TIMERS = 9,
OBJECTS_POSIX_SHMS = 12
} Objects_POSIX_API;
diff --git a/cpukit/score/include/rtems/sysinit.h b/cpukit/score/include/rtems/sysinit.h
index 09b82e6..595629f 100644
--- a/cpukit/score/include/rtems/sysinit.h
+++ b/cpukit/score/include/rtems/sysinit.h
@@ -47,7 +47,6 @@ extern "C" {
#define RTEMS_SYSINIT_CLASSIC_BARRIER 00034a
#define RTEMS_SYSINIT_POSIX_SIGNALS 000360
#define RTEMS_SYSINIT_POSIX_THREADS 000361
-#define RTEMS_SYSINIT_POSIX_CONDITION_VARIABLE 000362
#define RTEMS_SYSINIT_POSIX_MUTEX 000363
#define RTEMS_SYSINIT_POSIX_MESSAGE_QUEUE 000364
#define RTEMS_SYSINIT_POSIX_SEMAPHORE 000365
diff --git a/testsuites/psxtests/psx10/init.c b/testsuites/psxtests/psx10/init.c
index 24265ba..ad4e60e 100644
--- a/testsuites/psxtests/psx10/init.c
+++ b/testsuites/psxtests/psx10/init.c
@@ -17,6 +17,121 @@
const char rtems_test_name[] = "PSX 10";
+static void test_cond_null( void )
+{
+ pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER;
+ int eno;
+ struct timespec to;
+
+ eno = pthread_cond_init( NULL, NULL );
+ rtems_test_assert( eno == EINVAL );
+
+ eno = pthread_mutex_lock( &mtx );
+ rtems_test_assert( eno == 0 );
+
+ eno = pthread_cond_wait( NULL, &mtx );
+ rtems_test_assert( eno == EINVAL );
+
+ to.tv_sec = 1;
+ to.tv_nsec = 1;
+ eno = pthread_cond_timedwait( NULL, &mtx, &to );
+ rtems_test_assert( eno == EINVAL );
+
+ eno = pthread_mutex_unlock( &mtx );
+ rtems_test_assert( eno == 0 );
+
+ eno = pthread_cond_signal( NULL );
+ rtems_test_assert( eno == EINVAL );
+
+ eno = pthread_cond_broadcast( NULL );
+ rtems_test_assert( eno == EINVAL );
+
+ eno = pthread_cond_destroy( NULL );
+ rtems_test_assert( eno == EINVAL );
+
+ eno = pthread_mutex_destroy( &mtx );
+ rtems_test_assert( eno == 0 );
+}
+
+static void test_cond_not_initialized( void )
+{
+ pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER;
+ pthread_cond_t cond;
+ int eno;
+ struct timespec to;
+
+ memset( &cond, 0xff, sizeof( cond ) );
+
+ eno = pthread_mutex_lock( &mtx );
+ rtems_test_assert( eno == 0 );
+
+ eno = pthread_cond_wait( &cond, &mtx );
+ rtems_test_assert( eno == EINVAL );
+
+ to.tv_sec = 1;
+ to.tv_nsec = 1;
+ eno = pthread_cond_timedwait( &cond, &mtx, &to );
+ rtems_test_assert( eno == EINVAL );
+
+ eno = pthread_mutex_unlock( &mtx );
+ rtems_test_assert( eno == 0 );
+
+ eno = pthread_cond_signal( &cond );
+ rtems_test_assert( eno == EINVAL );
+
+ eno = pthread_cond_broadcast( &cond );
+ rtems_test_assert( eno == EINVAL );
+
+ eno = pthread_cond_destroy( &cond );
+ rtems_test_assert( eno == EINVAL );
+
+ eno = pthread_mutex_destroy( &mtx );
+ rtems_test_assert( eno == 0 );
+}
+
+static void test_cond_invalid_copy( void )
+{
+ pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER;
+ pthread_cond_t cond;
+ pthread_cond_t cond2;
+ int eno;
+ struct timespec to;
+
+ eno = pthread_cond_init( &cond, NULL );
+ rtems_test_assert( eno == 0 );
+
+ memcpy( &cond2, &cond, sizeof( cond2 ) );
+
+ eno = pthread_mutex_lock( &mtx );
+ rtems_test_assert( eno == 0 );
+
+ eno = pthread_cond_wait( &cond2, &mtx );
+ rtems_test_assert( eno == EINVAL );
+
+ to.tv_sec = 1;
+ to.tv_nsec = 1;
+ eno = pthread_cond_timedwait( &cond2, &mtx, &to );
+ rtems_test_assert( eno == EINVAL );
+
+ eno = pthread_mutex_unlock( &mtx );
+ rtems_test_assert( eno == 0 );
+
+ eno = pthread_cond_signal( &cond2 );
+ rtems_test_assert( eno == EINVAL );
+
+ eno = pthread_cond_broadcast( &cond2 );
+ rtems_test_assert( eno == EINVAL );
+
+ eno = pthread_cond_destroy( &cond2 );
+ rtems_test_assert( eno == EINVAL );
+
+ eno = pthread_cond_destroy( &cond );
+ rtems_test_assert( eno == 0 );
+
+ eno = pthread_mutex_destroy( &mtx );
+ rtems_test_assert( eno == 0 );
+}
+
void *POSIX_Init(
void *argument
)
@@ -30,6 +145,10 @@ void *POSIX_Init(
TEST_BEGIN();
+ test_cond_null();
+ test_cond_not_initialized();
+ test_cond_invalid_copy();
+
puts( "Init: pthread_condattr_init" );
status = pthread_condattr_init( &attr );
rtems_test_assert( !status );
@@ -97,16 +216,6 @@ void *POSIX_Init(
rtems_test_assert( status == EINVAL );
puts( "Init: pthread_cond_init - EINVAL (attr not initialized)" );
- status = pthread_cond_init( &cond, NULL );
- if ( status != ENOMEM )
- printf( "status = %d\n", status );
- rtems_test_assert( status == ENOMEM );
- puts( "Init: pthread_cond_init - ENOMEM (too many conds)" );
-
- puts( "Init: pthread_cond_destroy" );
- status = pthread_cond_destroy( &cond );
- rtems_test_assert( !status );
-
/* error for bad condition variable passed */
status = pthread_cond_destroy( NULL );
diff --git a/testsuites/psxtests/psx10/psx10.scn b/testsuites/psxtests/psx10/psx10.scn
index 2c70df8..3d5680c 100644
--- a/testsuites/psxtests/psx10/psx10.scn
+++ b/testsuites/psxtests/psx10/psx10.scn
@@ -12,8 +12,6 @@ Init: pthread_condattr_getpshared - 0
Init: pthread_condattr_getpshared - EINVAL (attribute invalid)
Init: pthread_cond_init - NULL attr
Init: pthread_cond_init - EINVAL (attr not initialized)
-Init: pthread_cond_init - ENOMEM (too many conds)
-Init: pthread_cond_destroy
Init: pthread_cond_destroy - EINVAL (cond invalid)
Init: pthread_cond_init - EINVAL (invalid pshared)
Init: pthread_condattr_setpshared - PTHREAD_PROCESS_SHARED
diff --git a/testsuites/psxtests/psx10/system.h b/testsuites/psxtests/psx10/system.h
index 573a065..ee7e9c4 100644
--- a/testsuites/psxtests/psx10/system.h
+++ b/testsuites/psxtests/psx10/system.h
@@ -41,7 +41,6 @@ void *Task_3(
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_MAXIMUM_POSIX_THREADS 4
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 1
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 2
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
diff --git a/testsuites/psxtests/psxaio01/system.h b/testsuites/psxtests/psxaio01/system.h
index 91a8658..e17f7ca 100644
--- a/testsuites/psxtests/psxaio01/system.h
+++ b/testsuites/psxtests/psxaio01/system.h
@@ -29,7 +29,6 @@ void *POSIX_Init (void *argument);
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 10
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
diff --git a/testsuites/psxtests/psxaio02/system.h b/testsuites/psxtests/psxaio02/system.h
index 4137251..e3e1333 100644
--- a/testsuites/psxtests/psxaio02/system.h
+++ b/testsuites/psxtests/psxaio02/system.h
@@ -29,7 +29,6 @@ void *POSIX_Init (void *argument);
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 10
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
diff --git a/testsuites/psxtests/psxaio03/system.h b/testsuites/psxtests/psxaio03/system.h
index fbea6f0..c809bc7 100644
--- a/testsuites/psxtests/psxaio03/system.h
+++ b/testsuites/psxtests/psxaio03/system.h
@@ -30,7 +30,6 @@ void *POSIX_Init (void *argument);
#define CONFIGURE_MAXIMUM_POSIX_THREADS 30
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 30
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 30
#define CONFIGURE_MAXIMUM_POSIX_KEYS 30
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
diff --git a/testsuites/psxtests/psxautoinit02/init.c b/testsuites/psxtests/psxautoinit02/init.c
index 967b9b8..bba4e24 100644
--- a/testsuites/psxtests/psxautoinit02/init.c
+++ b/testsuites/psxtests/psxautoinit02/init.c
@@ -25,20 +25,65 @@ void *POSIX_Init(
)
{
int sc;
- pthread_cond_t cond1;
- pthread_cond_t cond2;
+ pthread_cond_t cond1 = PTHREAD_COND_INITIALIZER;
+ pthread_cond_t cond2 = PTHREAD_COND_INITIALIZER;
+ pthread_cond_t cond3 = PTHREAD_COND_INITIALIZER;
+ pthread_cond_t cond4 = PTHREAD_COND_INITIALIZER;
+ pthread_cond_t cond5 = PTHREAD_COND_INITIALIZER;
+ pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER;
+ struct timespec to;
TEST_BEGIN();
- cond1 = PTHREAD_COND_INITIALIZER;
- cond2 = PTHREAD_COND_INITIALIZER;
puts( "Init - pthread_cond_broadcast - auto initialize - OK" );
sc = pthread_cond_broadcast( &cond1 );
fatal_posix_service_status( sc, 0, "cond broadcast OK" );
- puts( "Init - pthread_cond_broadcast - auto initialize - EINVAL" );
- sc = pthread_cond_broadcast( &cond2 );
- fatal_posix_service_status( sc, EINVAL, "cond lock EINVAL" );
+ puts( "Init - pthread_cond_signal - auto initialize - OK" );
+ sc = pthread_cond_signal( &cond2 );
+ fatal_posix_service_status( sc, 0, "cond signal OK" );
+
+ puts( "Init - pthread_cond_init - auto initialize - OK" );
+ sc = pthread_cond_init( &cond3, NULL );
+ fatal_posix_service_status( sc, 0, "cond init OK" );
+
+ puts( "Init - pthread_mutex_lock - OK" );
+ sc = pthread_mutex_lock( &mtx );
+ fatal_posix_service_status( sc, 0, "mtx lock OK" );
+
+ puts( "Init - pthread_cond_timedwait - auto initialize - OK" );
+ to.tv_sec = 1;
+ to.tv_nsec = 1;
+ sc = pthread_cond_timedwait( &cond4, &mtx, &to );
+ fatal_posix_service_status( sc, ETIMEDOUT, "cond timedwait OK" );
+
+ puts( "Init - pthread_mutex_unlock - OK" );
+ sc = pthread_mutex_unlock( &mtx );
+ fatal_posix_service_status( sc, 0, "mtx unlock OK" );
+
+ puts( "Init - pthread_mutex_destroy - OK" );
+ sc = pthread_mutex_destroy( &mtx );
+ fatal_posix_service_status( sc, 0, "mtx destroy OK" );
+
+ puts( "Init - pthread_cond_destroy - OK" );
+ sc = pthread_cond_destroy( &cond5 );
+ fatal_posix_service_status( sc, 0, "cond destroy OK" );
+
+ puts( "Init - pthread_cond_destroy - EINVAL" );
+ sc = pthread_cond_destroy( &cond5 );
+ fatal_posix_service_status( sc, EINVAL, "cond destroy EINVAL" );
+
+ puts( "Init - pthread_cond_destroy - OK" );
+ sc = pthread_cond_destroy( &cond4 );
+ fatal_posix_service_status( sc, 0, "cond destroy OK" );
+
+ puts( "Init - pthread_cond_destroy - OK" );
+ sc = pthread_cond_destroy( &cond3 );
+ fatal_posix_service_status( sc, 0, "cond destroy OK" );
+
+ puts( "Init - pthread_cond_destroy - OK" );
+ sc = pthread_cond_destroy( &cond2 );
+ fatal_posix_service_status( sc, 0, "cond destroy OK" );
puts( "Init - pthread_cond_destroy - OK" );
sc = pthread_cond_destroy( &cond1 );
@@ -51,12 +96,12 @@ void *POSIX_Init(
}
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_MAXIMUM_POSIX_THREADS 1
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 1
+#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 1
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
diff --git a/testsuites/psxtests/psxautoinit02/psxautoinit02.scn b/testsuites/psxtests/psxautoinit02/psxautoinit02.scn
index bfe3067..047088a 100644
--- a/testsuites/psxtests/psxautoinit02/psxautoinit02.scn
+++ b/testsuites/psxtests/psxautoinit02/psxautoinit02.scn
@@ -1,5 +1,14 @@
-*** POSIX TEST -- AUTOMATIC INITIALIZAITON 02 ***
+*** BEGIN OF TEST PSXAUTOINIT 2 ***
Init - pthread_cond_broadcast - auto initialize - OK
-Init - pthread_cond_broadcast - auto initialize - EINVAL
+Init - pthread_cond_signal - auto initialize - OK
+Init - pthread_cond_init - auto initialize - OK
+Init - pthread_mutex_lock - OK
+Init - pthread_cond_timedwait - auto initialize - OK
+Init - pthread_mutex_unlock - OK
+Init - pthread_mutex_destroy - OK
Init - pthread_cond_destroy - OK
-*** END OF POSIX TEST AUTOMATIC INITIALIZATION 02 ***
+Init - pthread_cond_destroy - OK
+Init - pthread_cond_destroy - OK
+Init - pthread_cond_destroy - OK
+Init - pthread_cond_destroy - OK
+*** END OF TEST PSXAUTOINIT 2 ***
diff --git a/testsuites/psxtests/psxcleanup/system.h b/testsuites/psxtests/psxcleanup/system.h
index 04818f8..2111c9f 100644
--- a/testsuites/psxtests/psxcleanup/system.h
+++ b/testsuites/psxtests/psxcleanup/system.h
@@ -45,7 +45,6 @@ void *task_c(
#define CONFIGURE_MAXIMUM_POSIX_TIMERS 4
#define CONFIGURE_MAXIMUM_TIMERS 4
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 2
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 2
#include <rtems/confdefs.h>
diff --git a/testsuites/psxtests/psxcond01/init.c b/testsuites/psxtests/psxcond01/init.c
index 395443a..37fd4fd 100644
--- a/testsuites/psxtests/psxcond01/init.c
+++ b/testsuites/psxtests/psxcond01/init.c
@@ -96,7 +96,6 @@ void *POSIX_Init(
#define CONFIGURE_MAXIMUM_POSIX_THREADS 2
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 2
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 1
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
diff --git a/testsuites/psxtests/psxconfig01/init.c b/testsuites/psxtests/psxconfig01/init.c
index 154b4d1..f62c2d5 100644
--- a/testsuites/psxtests/psxconfig01/init.c
+++ b/testsuites/psxtests/psxconfig01/init.c
@@ -60,7 +60,6 @@ const char rtems_test_name[] = "PSXCONFIG 1";
#define CONFIGURE_MAXIMUM_TIMERS 59
#define CONFIGURE_MAXIMUM_USER_EXTENSIONS 17
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 29
#define POSIX_MQ_COUNT 5
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 19
#define CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS 7
@@ -429,19 +428,6 @@ static rtems_task Init(rtems_task_argument argument)
);
#endif
-#ifdef CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES
- for (i = 0; i < CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES; ++i) {
- pthread_cond_t cond;
- eno = pthread_cond_init(&cond, NULL);
- rtems_test_assert(eno == 0);
- }
- rtems_resource_snapshot_take(&snapshot);
- rtems_test_assert(
- snapshot.posix_api.active_condition_variables
- == CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES
- );
-#endif
-
#ifdef POSIX_MQ_COUNT
for (i = 0; i < POSIX_MQ_COUNT; ++i) {
int oflag = O_RDWR | O_CREAT | O_EXCL;
diff --git a/testsuites/psxtests/psxkey07/init.c b/testsuites/psxtests/psxkey07/init.c
index ac7e025..3790ea3 100644
--- a/testsuites/psxtests/psxkey07/init.c
+++ b/testsuites/psxtests/psxkey07/init.c
@@ -198,7 +198,6 @@ rtems_task Init(rtems_task_argument argument)
#define CONFIGURE_MAXIMUM_TASKS rtems_resource_unlimited(10)
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 2
#define CONFIGURE_MAXIMUM_POSIX_KEYS 1
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 2
#define CONFIGURE_UNIFIED_WORK_AREAS
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
diff --git a/testsuites/psxtests/psxsignal06/init.c b/testsuites/psxtests/psxsignal06/init.c
index decab51..0177a2a 100644
--- a/testsuites/psxtests/psxsignal06/init.c
+++ b/testsuites/psxtests/psxsignal06/init.c
@@ -126,7 +126,6 @@ void *POSIX_Init(void *argument)
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_MAXIMUM_POSIX_THREADS 2
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 2
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 1
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
diff --git a/testsuites/psxtests/psxtimer01/system.h b/testsuites/psxtests/psxtimer01/system.h
index 57462e7..3fb71ca 100644
--- a/testsuites/psxtests/psxtimer01/system.h
+++ b/testsuites/psxtests/psxtimer01/system.h
@@ -45,7 +45,6 @@ void *task_c(
#define CONFIGURE_MAXIMUM_POSIX_TIMERS 5
#define CONFIGURE_MAXIMUM_TIMERS 4
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 2
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 2
#include <rtems/confdefs.h>
diff --git a/testsuites/psxtmtests/psxtmcond01/init.c b/testsuites/psxtmtests/psxtmcond01/init.c
index 6dd7ab1..7ec876b 100644
--- a/testsuites/psxtmtests/psxtmcond01/init.c
+++ b/testsuites/psxtmtests/psxtmcond01/init.c
@@ -85,7 +85,6 @@ void *POSIX_Init(
#define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
/* configure an instance of the condition variable created and destroyed */
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 1
#define CONFIGURE_MAXIMUM_POSIX_THREADS 1
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
diff --git a/testsuites/psxtmtests/psxtmcond02/init.c b/testsuites/psxtmtests/psxtmcond02/init.c
index cbbb799..c8cf9c2 100644
--- a/testsuites/psxtmtests/psxtmcond02/init.c
+++ b/testsuites/psxtmtests/psxtmcond02/init.c
@@ -66,7 +66,6 @@ void *POSIX_Init(
#define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
#define CONFIGURE_MAXIMUM_POSIX_THREADS 1
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 2
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
#define CONFIGURE_INIT
diff --git a/testsuites/psxtmtests/psxtmcond03/init.c b/testsuites/psxtmtests/psxtmcond03/init.c
index fdf2dfe..782782a 100644
--- a/testsuites/psxtmtests/psxtmcond03/init.c
+++ b/testsuites/psxtmtests/psxtmcond03/init.c
@@ -106,7 +106,6 @@ void *POSIX_Init(
#define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
#define CONFIGURE_MAXIMUM_POSIX_THREADS 2
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 2
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 2
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
diff --git a/testsuites/psxtmtests/psxtmcond04/init.c b/testsuites/psxtmtests/psxtmcond04/init.c
index 889cc99..9ed2ae6 100644
--- a/testsuites/psxtmtests/psxtmcond04/init.c
+++ b/testsuites/psxtmtests/psxtmcond04/init.c
@@ -99,7 +99,6 @@ void *POSIX_Init(
#define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
#define CONFIGURE_MAXIMUM_POSIX_THREADS 2
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 2
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 2
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
diff --git a/testsuites/psxtmtests/psxtmcond05/init.c b/testsuites/psxtmtests/psxtmcond05/init.c
index 81b32d8..fcfad14 100644
--- a/testsuites/psxtmtests/psxtmcond05/init.c
+++ b/testsuites/psxtmtests/psxtmcond05/init.c
@@ -65,7 +65,6 @@ void *POSIX_Init(
#define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
#define CONFIGURE_MAXIMUM_POSIX_THREADS 1
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 2
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
#define CONFIGURE_INIT
diff --git a/testsuites/psxtmtests/psxtmcond06/init.c b/testsuites/psxtmtests/psxtmcond06/init.c
index 4f86108..630641d 100644
--- a/testsuites/psxtmtests/psxtmcond06/init.c
+++ b/testsuites/psxtmtests/psxtmcond06/init.c
@@ -123,7 +123,6 @@ void *POSIX_Init(
#define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
#define CONFIGURE_MAXIMUM_POSIX_THREADS 2 + N
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 2
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 2
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
diff --git a/testsuites/psxtmtests/psxtmcond07/init.c b/testsuites/psxtmtests/psxtmcond07/init.c
index 275eab3..20952e5 100644
--- a/testsuites/psxtmtests/psxtmcond07/init.c
+++ b/testsuites/psxtmtests/psxtmcond07/init.c
@@ -119,7 +119,6 @@ void *POSIX_Init(
#define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
#define CONFIGURE_MAXIMUM_POSIX_THREADS 2 + N
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 1
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 1
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
diff --git a/testsuites/psxtmtests/psxtmcond08/init.c b/testsuites/psxtmtests/psxtmcond08/init.c
index 2224f23..6f11b9e 100644
--- a/testsuites/psxtmtests/psxtmcond08/init.c
+++ b/testsuites/psxtmtests/psxtmcond08/init.c
@@ -169,9 +169,7 @@ void *POSIX_Init(
#define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
#define CONFIGURE_MAXIMUM_POSIX_THREADS OPERATION_COUNT + 2
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 2
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 2
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 2
#define CONFIGURE_INIT
diff --git a/testsuites/sptests/spsysinit01/init.c b/testsuites/sptests/spsysinit01/init.c
index ab9e4a8..902d6ab 100644
--- a/testsuites/sptests/spsysinit01/init.c
+++ b/testsuites/sptests/spsysinit01/init.c
@@ -36,7 +36,6 @@
#include <rtems/extensionimpl.h>
#ifdef RTEMS_POSIX_API
#include <rtems/posix/barrierimpl.h>
-#include <rtems/posix/condimpl.h>
#include <rtems/posix/mqueueimpl.h>
#include <rtems/posix/muteximpl.h>
#include <rtems/posix/psignalimpl.h>
@@ -104,8 +103,6 @@ typedef enum {
POSIX_SIGNALS_POST,
POSIX_THREADS_PRE,
POSIX_THREADS_POST,
- POSIX_CONDITION_VARIABLE_PRE,
- POSIX_CONDITION_VARIABLE_POST,
POSIX_MUTEX_PRE,
POSIX_MUTEX_POST,
POSIX_MESSAGE_QUEUE_PRE,
@@ -441,18 +438,6 @@ LAST(RTEMS_SYSINIT_POSIX_THREADS)
next_step(POSIX_THREADS_POST);
}
-FIRST(RTEMS_SYSINIT_POSIX_CONDITION_VARIABLE)
-{
- assert(_POSIX_Condition_variables_Information.maximum == 0);
- next_step(POSIX_CONDITION_VARIABLE_PRE);
-}
-
-LAST(RTEMS_SYSINIT_POSIX_CONDITION_VARIABLE)
-{
- assert(_POSIX_Condition_variables_Information.maximum != 0);
- next_step(POSIX_CONDITION_VARIABLE_POST);
-}
-
FIRST(RTEMS_SYSINIT_POSIX_MUTEX)
{
assert(_POSIX_Mutex_Information.maximum == 0);
@@ -733,8 +718,6 @@ static void *POSIX_Init(void *arg)
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 1
-#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 1
-
#define CONFIGURE_MAXIMUM_POSIX_SEMAPHORES 1
#define CONFIGURE_MAXIMUM_POSIX_SHMS 1
diff --git a/testsuites/sptests/spthreadq01/init.c b/testsuites/sptests/spthreadq01/init.c
index 5416118..473db6d 100644
--- a/testsuites/sptests/spthreadq01/init.c
+++ b/testsuites/sptests/spthreadq01/init.c
@@ -130,8 +130,6 @@ static void posix_worker(test_context *ctx)
eno = pthread_mutex_lock(&ctx->pmtx);
rtems_test_assert(eno == 0);
- rtems_test_assert(get_wait_id(ctx) == ctx->pcv);
-
eno = pthread_cond_signal(&ctx->pcv);
rtems_test_assert(eno == 0);
@@ -343,7 +341,6 @@ static rtems_task Init(
#if defined(RTEMS_POSIX_API)
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 1
- #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 1
#define CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES 1
#define CONFIGURE_MESSAGE_BUFFER_MEMORY \
(2 * CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE(1, 1))
More information about the vc
mailing list