summaryrefslogtreecommitdiffstats
path: root/testsuites
diff options
context:
space:
mode:
authorHimanshu40 <himanshuwindows8.1@gmail.com>2018-12-09 17:50:13 +0530
committerJoel Sherrill <joel@rtems.org>2018-12-09 09:17:08 -0600
commitb009cfb6382bddd86440ce56c8206efb4540ec28 (patch)
tree3b05440cac079bbb5e67ebe44d46adacebfd02fa /testsuites
parentpsxhdrs: Add POSIX API Signature Compliance Tests for stdlib.h (GCI 2018) (diff)
downloadrtems-b009cfb6382bddd86440ce56c8206efb4540ec28.tar.bz2
psxhdrs: Added POSIX API Signature Compliance Tests for threads.h (GCI 2018)
Diffstat (limited to '')
-rw-r--r--testsuites/psxtests/Makefile.am25
-rw-r--r--testsuites/psxtests/psxhdrs/c11/threads/call_once.c43
-rw-r--r--testsuites/psxtests/psxhdrs/c11/threads/cnd_broadcast.c39
-rw-r--r--testsuites/psxtests/psxhdrs/c11/threads/cnd_destroy.c39
-rw-r--r--testsuites/psxtests/psxhdrs/c11/threads/cnd_init.c38
-rw-r--r--testsuites/psxtests/psxhdrs/c11/threads/cnd_signal.c39
-rw-r--r--testsuites/psxtests/psxhdrs/c11/threads/cnd_timedwait.c44
-rw-r--r--testsuites/psxtests/psxhdrs/c11/threads/cnd_wait.c41
-rw-r--r--testsuites/psxtests/psxhdrs/c11/threads/mtx_destroy.c39
-rw-r--r--testsuites/psxtests/psxhdrs/c11/threads/mtx_init.c38
-rw-r--r--testsuites/psxtests/psxhdrs/c11/threads/mtx_lock.c39
-rw-r--r--testsuites/psxtests/psxhdrs/c11/threads/mtx_timedlock.c42
-rw-r--r--testsuites/psxtests/psxhdrs/c11/threads/mtx_trylock.c39
-rw-r--r--testsuites/psxtests/psxhdrs/c11/threads/mtx_unlock.c39
-rw-r--r--testsuites/psxtests/psxhdrs/c11/threads/thrd_create.c46
-rw-r--r--testsuites/psxtests/psxhdrs/c11/threads/thrd_current.c37
-rw-r--r--testsuites/psxtests/psxhdrs/c11/threads/thrd_detach.c47
-rw-r--r--testsuites/psxtests/psxhdrs/c11/threads/thrd_equal.c50
-rw-r--r--testsuites/psxtests/psxhdrs/c11/threads/thrd_exit.c47
-rw-r--r--testsuites/psxtests/psxhdrs/c11/threads/thrd_join.c48
-rw-r--r--testsuites/psxtests/psxhdrs/c11/threads/thrd_sleep.c43
-rw-r--r--testsuites/psxtests/psxhdrs/c11/threads/thrd_yield.c47
-rw-r--r--testsuites/psxtests/psxhdrs/c11/threads/tss_create.c39
-rw-r--r--testsuites/psxtests/psxhdrs/c11/threads/tss_delete.c40
-rw-r--r--testsuites/psxtests/psxhdrs/c11/threads/tss_get.c40
-rw-r--r--testsuites/psxtests/psxhdrs/c11/threads/tss_set.c41
26 files changed, 1069 insertions, 0 deletions
diff --git a/testsuites/psxtests/Makefile.am b/testsuites/psxtests/Makefile.am
index 13ac889b36..01fd04a52e 100644
--- a/testsuites/psxtests/Makefile.am
+++ b/testsuites/psxtests/Makefile.am
@@ -1614,6 +1614,31 @@ lib_a_SOURCES = psxhdrs/devctl/posix_devctl.c \
psxhdrs/syslog/openlog.c \
psxhdrs/syslog/setlogmask.c \
psxhdrs/syslog/syslog.c \
+ psxhdrs/c11/threads/call_once.c \
+ psxhdrs/c11/threads/cnd_broadcast.c \
+ psxhdrs/c11/threads/cnd_destroy.c \
+ psxhdrs/c11/threads/cnd_init.c \
+ psxhdrs/c11/threads/cnd_signal.c \
+ psxhdrs/c11/threads/cnd_timedwait.c \
+ psxhdrs/c11/threads/cnd_wait.c \
+ psxhdrs/c11/threads/mtx_init.c \
+ psxhdrs/c11/threads/mtx_destroy.c \
+ psxhdrs/c11/threads/mtx_lock.c \
+ psxhdrs/c11/threads/mtx_timedlock.c \
+ psxhdrs/c11/threads/mtx_trylock.c \
+ psxhdrs/c11/threads/mtx_unlock.c \
+ psxhdrs/c11/threads/thrd_create.c \
+ psxhdrs/c11/threads/thrd_current.c \
+ psxhdrs/c11/threads/thrd_detach.c \
+ psxhdrs/c11/threads/thrd_equal.c \
+ psxhdrs/c11/threads/thrd_exit.c \
+ psxhdrs/c11/threads/thrd_join.c \
+ psxhdrs/c11/threads/thrd_sleep.c \
+ psxhdrs/c11/threads/thrd_yield.c \
+ psxhdrs/c11/threads/tss_create.c \
+ psxhdrs/c11/threads/tss_delete.c \
+ psxhdrs/c11/threads/tss_get.c \
+ psxhdrs/c11/threads/tss_set.c \
psxhdrs/wchar/btowc.c \
psxhdrs/wchar/fgetwc.c \
psxhdrs/wchar/fgetws.c \
diff --git a/testsuites/psxtests/psxhdrs/c11/threads/call_once.c b/testsuites/psxtests/psxhdrs/c11/threads/call_once.c
new file mode 100644
index 0000000000..9d697d756f
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/c11/threads/call_once.c
@@ -0,0 +1,43 @@
+/**
+ * @file
+ * @brief call_once() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+#include <threads.h>
+
+int test( void );
+void do_once( void );
+
+int test( void )
+{
+ once_flag flag = ONCE_FLAG_INIT;
+
+ call_once( &flag, do_once );
+
+ return 0;
+}
+
+void do_once(void) {
+ puts( "called once" );
+}
diff --git a/testsuites/psxtests/psxhdrs/c11/threads/cnd_broadcast.c b/testsuites/psxtests/psxhdrs/c11/threads/cnd_broadcast.c
new file mode 100644
index 0000000000..febc96c05e
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/c11/threads/cnd_broadcast.c
@@ -0,0 +1,39 @@
+/**
+ * @file
+ * @brief cnd_broadcast() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <threads.h>
+
+int test( void );
+
+int test( void )
+{
+ cnd_t cv;
+ int result;
+
+ cnd_init( &cv );
+ result = cnd_broadcast( &cv );
+
+ return ( result != -1 );
+}
diff --git a/testsuites/psxtests/psxhdrs/c11/threads/cnd_destroy.c b/testsuites/psxtests/psxhdrs/c11/threads/cnd_destroy.c
new file mode 100644
index 0000000000..afeaf1c633
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/c11/threads/cnd_destroy.c
@@ -0,0 +1,39 @@
+/**
+ * @file
+ * @brief cnd_destroy() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <threads.h>
+
+int test( void );
+
+int test( void )
+{
+ cnd_t cv;
+ int result;
+
+ result = cnd_init( &cv );
+ cnd_destroy( &cv );
+
+ return ( result != -1 );
+}
diff --git a/testsuites/psxtests/psxhdrs/c11/threads/cnd_init.c b/testsuites/psxtests/psxhdrs/c11/threads/cnd_init.c
new file mode 100644
index 0000000000..5afcd1b92f
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/c11/threads/cnd_init.c
@@ -0,0 +1,38 @@
+/**
+ * @file
+ * @brief cnd_init() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <threads.h>
+
+int test( void );
+
+int test( void )
+{
+ cnd_t cv;
+ int result;
+
+ result = cnd_init( &cv );
+
+ return ( result != -1 );
+}
diff --git a/testsuites/psxtests/psxhdrs/c11/threads/cnd_signal.c b/testsuites/psxtests/psxhdrs/c11/threads/cnd_signal.c
new file mode 100644
index 0000000000..0d2f20e3fd
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/c11/threads/cnd_signal.c
@@ -0,0 +1,39 @@
+/**
+ * @file
+ * @brief cnd_signal() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <threads.h>
+
+int test( void );
+
+int test( void )
+{
+ cnd_t cv;
+ int result;
+
+ cnd_init( &cv );
+ result = cnd_signal( &cv );
+
+ return ( result != -1 );
+}
diff --git a/testsuites/psxtests/psxhdrs/c11/threads/cnd_timedwait.c b/testsuites/psxtests/psxhdrs/c11/threads/cnd_timedwait.c
new file mode 100644
index 0000000000..74761318d5
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/c11/threads/cnd_timedwait.c
@@ -0,0 +1,44 @@
+/**
+ * @file
+ * @brief cnd_timedwait() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <threads.h>
+
+int test( void );
+
+int test( void )
+{
+ cnd_t cv;
+ mtx_t mtx;
+ struct timespec ts;
+ int result;
+
+ ts.tv_nsec = 0;
+
+ cnd_init( &cv );
+ mtx_init( &mtx, mtx_plain );
+ result = cnd_timedwait( &cv, &mtx, &ts );
+
+ return ( result != -1 );
+}
diff --git a/testsuites/psxtests/psxhdrs/c11/threads/cnd_wait.c b/testsuites/psxtests/psxhdrs/c11/threads/cnd_wait.c
new file mode 100644
index 0000000000..672eef1bdc
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/c11/threads/cnd_wait.c
@@ -0,0 +1,41 @@
+/**
+ * @file
+ * @brief cnd_wait() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <threads.h>
+
+int test( void );
+
+int test( void )
+{
+ cnd_t cv;
+ mtx_t mtx;
+ int result;
+
+ cnd_init( &cv );
+ mtx_init( &mtx, mtx_plain );
+ result = cnd_wait( &cv, &mtx );
+
+ return ( result != -1 );
+}
diff --git a/testsuites/psxtests/psxhdrs/c11/threads/mtx_destroy.c b/testsuites/psxtests/psxhdrs/c11/threads/mtx_destroy.c
new file mode 100644
index 0000000000..dc621c9d96
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/c11/threads/mtx_destroy.c
@@ -0,0 +1,39 @@
+/**
+ * @file
+ * @brief mtx_destroy() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <threads.h>
+
+int test( void );
+
+int test( void )
+{
+ mtx_t mtx;
+ int result;
+
+ result = mtx_init( &mtx, mtx_plain );
+ mtx_destroy( &mtx );
+
+ return ( result != -1 );
+}
diff --git a/testsuites/psxtests/psxhdrs/c11/threads/mtx_init.c b/testsuites/psxtests/psxhdrs/c11/threads/mtx_init.c
new file mode 100644
index 0000000000..4f4d0e3394
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/c11/threads/mtx_init.c
@@ -0,0 +1,38 @@
+/**
+ * @file
+ * @brief mtx_init() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <threads.h>
+
+int test( void );
+
+int test( void )
+{
+ mtx_t mtx;
+ int result;
+
+ result = mtx_init( &mtx, mtx_plain );
+
+ return ( result != -1 );
+}
diff --git a/testsuites/psxtests/psxhdrs/c11/threads/mtx_lock.c b/testsuites/psxtests/psxhdrs/c11/threads/mtx_lock.c
new file mode 100644
index 0000000000..c336c07fa4
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/c11/threads/mtx_lock.c
@@ -0,0 +1,39 @@
+/**
+ * @file
+ * @brief mtx_lock() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <threads.h>
+
+int test( void );
+
+int test( void )
+{
+ mtx_t mtx;
+ int result;
+
+ mtx_init( &mtx, mtx_plain );
+ result = mtx_lock( &mtx );
+
+ return ( result != -1 );
+}
diff --git a/testsuites/psxtests/psxhdrs/c11/threads/mtx_timedlock.c b/testsuites/psxtests/psxhdrs/c11/threads/mtx_timedlock.c
new file mode 100644
index 0000000000..677b2d1715
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/c11/threads/mtx_timedlock.c
@@ -0,0 +1,42 @@
+/**
+ * @file
+ * @brief mtx_timedlock() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <threads.h>
+
+int test( void );
+
+int test( void )
+{
+ mtx_t mtx;
+ struct timespec time_point;
+ int result;
+
+ time_point.tv_nsec = 0;
+
+ mtx_init( &mtx, mtx_plain );
+ result = mtx_timedlock( &mtx, &time_point );
+
+ return ( result != -1 );
+}
diff --git a/testsuites/psxtests/psxhdrs/c11/threads/mtx_trylock.c b/testsuites/psxtests/psxhdrs/c11/threads/mtx_trylock.c
new file mode 100644
index 0000000000..314ce38052
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/c11/threads/mtx_trylock.c
@@ -0,0 +1,39 @@
+/**
+ * @file
+ * @brief mtx_trylock() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <threads.h>
+
+int test( void );
+
+int test( void )
+{
+ mtx_t mtx;
+ int result;
+
+ mtx_init( &mtx, mtx_plain );
+ result = mtx_trylock( &mtx );
+
+ return ( result != -1 );
+}
diff --git a/testsuites/psxtests/psxhdrs/c11/threads/mtx_unlock.c b/testsuites/psxtests/psxhdrs/c11/threads/mtx_unlock.c
new file mode 100644
index 0000000000..7b10c149d8
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/c11/threads/mtx_unlock.c
@@ -0,0 +1,39 @@
+/**
+ * @file
+ * @brief mtx_unlock() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <threads.h>
+
+int test( void );
+
+int test( void )
+{
+ mtx_t mtx;
+ int result;
+
+ mtx_init( &mtx, mtx_plain );
+ result = mtx_unlock( &mtx );
+
+ return ( result != -1 );
+}
diff --git a/testsuites/psxtests/psxhdrs/c11/threads/thrd_create.c b/testsuites/psxtests/psxhdrs/c11/threads/thrd_create.c
new file mode 100644
index 0000000000..397b186113
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/c11/threads/thrd_create.c
@@ -0,0 +1,46 @@
+/**
+ * @file
+ * @brief thrd_create() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <threads.h>
+
+int test( void );
+int th_func( void *arg );
+
+int test( void )
+{
+ thrd_t th;
+ int n = 1;
+ int result;
+
+ result = thrd_create( &th, th_func, &n );
+
+ return ( result != -1 );
+}
+
+int th_func( void *arg )
+{
+ ++*(int*)arg;
+ return 0;
+}
diff --git a/testsuites/psxtests/psxhdrs/c11/threads/thrd_current.c b/testsuites/psxtests/psxhdrs/c11/threads/thrd_current.c
new file mode 100644
index 0000000000..aef6523e53
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/c11/threads/thrd_current.c
@@ -0,0 +1,37 @@
+/**
+ * @file
+ * @brief thrd_current() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <threads.h>
+
+int test( void );
+
+int test( void )
+{
+ thrd_t th;
+
+ th = thrd_current();
+
+ return ( th != 0 );
+}
diff --git a/testsuites/psxtests/psxhdrs/c11/threads/thrd_detach.c b/testsuites/psxtests/psxhdrs/c11/threads/thrd_detach.c
new file mode 100644
index 0000000000..c5d41db2d2
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/c11/threads/thrd_detach.c
@@ -0,0 +1,47 @@
+/**
+ * @file
+ * @brief thrd_detach() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <threads.h>
+
+int test( void );
+int th_func( void *arg );
+
+int test( void )
+{
+ thrd_t th;
+ int n = 1;
+ int result;
+
+ thrd_create( &th, th_func, &n );
+ result = thrd_detach( th );
+
+ return ( result != -1 );
+}
+
+int th_func( void *arg )
+{
+ ++*(int*)arg;
+ return 0;
+}
diff --git a/testsuites/psxtests/psxhdrs/c11/threads/thrd_equal.c b/testsuites/psxtests/psxhdrs/c11/threads/thrd_equal.c
new file mode 100644
index 0000000000..a89df70299
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/c11/threads/thrd_equal.c
@@ -0,0 +1,50 @@
+/**
+ * @file
+ * @brief thrd_equal() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <threads.h>
+
+int test( void );
+int th_func( void *arg );
+
+int test( void )
+{
+ thrd_t lhs;
+ thrd_t rhs;
+ int ln = 1;
+ int rn = 1;
+ int result;
+
+ thrd_create( &lhs, th_func, &ln );
+ thrd_create( &rhs, th_func, &rn );
+ result = thrd_equal( lhs, rhs );
+
+ return ( result != -1 );
+}
+
+int th_func( void *arg )
+{
+ ++*(int*)arg;
+ return 0;
+}
diff --git a/testsuites/psxtests/psxhdrs/c11/threads/thrd_exit.c b/testsuites/psxtests/psxhdrs/c11/threads/thrd_exit.c
new file mode 100644
index 0000000000..59a1f97fa5
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/c11/threads/thrd_exit.c
@@ -0,0 +1,47 @@
+/**
+ * @file
+ * @brief thrd_exit() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <threads.h>
+
+int test( void );
+int th_func( void *arg );
+
+int test( void )
+{
+ thrd_t th;
+ int n = 1;
+ int result;
+
+ result = thrd_create( &th, th_func, &n );
+ thrd_exit( 1 );
+
+ return ( result != -1 );
+}
+
+int th_func( void *arg )
+{
+ ++*(int*)arg;
+ return 0;
+}
diff --git a/testsuites/psxtests/psxhdrs/c11/threads/thrd_join.c b/testsuites/psxtests/psxhdrs/c11/threads/thrd_join.c
new file mode 100644
index 0000000000..4d40c136db
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/c11/threads/thrd_join.c
@@ -0,0 +1,48 @@
+/**
+ * @file
+ * @brief thrd_join() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <threads.h>
+
+int test( void );
+int th_func( void *arg );
+
+int test( void )
+{
+ thrd_t th;
+ int n = 1;
+ int res = 1;
+ int result;
+
+ thrd_create( &th, th_func, &n );
+ result = thrd_join( th, &res );
+
+ return ( result != -1 );
+}
+
+int th_func( void *arg )
+{
+ ++*(int*)arg;
+ return 0;
+}
diff --git a/testsuites/psxtests/psxhdrs/c11/threads/thrd_sleep.c b/testsuites/psxtests/psxhdrs/c11/threads/thrd_sleep.c
new file mode 100644
index 0000000000..f0040dd3c4
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/c11/threads/thrd_sleep.c
@@ -0,0 +1,43 @@
+/**
+ * @file
+ * @brief thrd_sleep() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <threads.h>
+
+int test( void );
+int th_func( void *arg );
+
+int test( void )
+{
+ struct timespec duration;
+ struct timespec remaining;
+ int result;
+
+ duration.tv_nsec = 0;
+ remaining.tv_nsec = 1;
+
+ result = thrd_sleep( &duration, &remaining );
+
+ return ( result != -1 );
+}
diff --git a/testsuites/psxtests/psxhdrs/c11/threads/thrd_yield.c b/testsuites/psxtests/psxhdrs/c11/threads/thrd_yield.c
new file mode 100644
index 0000000000..11c2d79214
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/c11/threads/thrd_yield.c
@@ -0,0 +1,47 @@
+/**
+ * @file
+ * @brief thrd_yield() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <threads.h>
+
+int test( void );
+int th_func( void *arg );
+
+int test( void )
+{
+ thrd_t th;
+ int n = 1;
+ int result;
+
+ result = thrd_create( &th, th_func, &n );
+ thrd_yield();
+
+ return ( result != -1 );
+}
+
+int th_func( void *arg )
+{
+ ++*(int*)arg;
+ return 0;
+}
diff --git a/testsuites/psxtests/psxhdrs/c11/threads/tss_create.c b/testsuites/psxtests/psxhdrs/c11/threads/tss_create.c
new file mode 100644
index 0000000000..e9a3ef31cc
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/c11/threads/tss_create.c
@@ -0,0 +1,39 @@
+/**
+ * @file
+ * @brief tss_create() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <threads.h>
+
+int test( void );
+
+int test( void )
+{
+ tss_t key;
+ tss_dtor_t destructor = NULL;
+ int result;
+
+ result = tss_create( &key, destructor );
+
+ return ( result != -1 );
+}
diff --git a/testsuites/psxtests/psxhdrs/c11/threads/tss_delete.c b/testsuites/psxtests/psxhdrs/c11/threads/tss_delete.c
new file mode 100644
index 0000000000..4ceb1ae148
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/c11/threads/tss_delete.c
@@ -0,0 +1,40 @@
+/**
+ * @file
+ * @brief tss_delete() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <threads.h>
+
+int test( void );
+
+int test( void )
+{
+ tss_t key;
+ tss_dtor_t destructor = NULL;
+ int result;
+
+ result = tss_create( &key, destructor );
+ tss_delete( key );
+
+ return ( result != -1 );
+}
diff --git a/testsuites/psxtests/psxhdrs/c11/threads/tss_get.c b/testsuites/psxtests/psxhdrs/c11/threads/tss_get.c
new file mode 100644
index 0000000000..9630a63d57
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/c11/threads/tss_get.c
@@ -0,0 +1,40 @@
+/**
+ * @file
+ * @brief tss_get() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <threads.h>
+
+int test( void );
+
+int test( void )
+{
+ tss_t key;
+ tss_dtor_t destructor = NULL;
+ void *get;
+
+ tss_create( &key, destructor );
+ get = tss_get( key );
+
+ return ( get != NULL );
+}
diff --git a/testsuites/psxtests/psxhdrs/c11/threads/tss_set.c b/testsuites/psxtests/psxhdrs/c11/threads/tss_set.c
new file mode 100644
index 0000000000..7b0ac3dff1
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/c11/threads/tss_set.c
@@ -0,0 +1,41 @@
+/**
+ * @file
+ * @brief tss_set() API Conformance Test
+ */
+
+/*
+ * COPYRIGHT (c) 2018.
+ * Himanshu Sekhar Nayak
+ *
+ * Permission to use, copy, modify, and/or distribute this software
+ * for any purpose with or without fee is hereby granted.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdlib.h>
+#include <threads.h>
+
+int test( void );
+
+int test( void )
+{
+ tss_t key;
+ tss_dtor_t destructor = NULL;
+ int result;
+
+ tss_create( &key, destructor );
+ result = tss_set( key, malloc( 4 ) );
+
+ return ( result != -1 );
+}