summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2011-12-08 08:49:19 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2011-12-08 08:49:19 +0000
commitfd7d65d238d22af9181871fb992c5c8901f21613 (patch)
treecb3ff503c15fd9caa07995f80ab62dcdb0ab7c0c
parent2011-12-08 Ralf Corsépius <ralf.corsepius@rtems.org> (diff)
downloadrtems-fd7d65d238d22af9181871fb992c5c8901f21613.tar.bz2
2011-12-08 Ralf Corsépius <ralf.corsepius@rtems.org>
PR 1981/cpukit * configure.ac: Remove checks for pthread_attr_getcputime, pthread_attr_setcputime. * psx07/init.c: Remove references to pthread_attr_getcputime, pthread_attr_setcputime.
-rw-r--r--testsuites/psxtests/ChangeLog8
-rw-r--r--testsuites/psxtests/configure.ac12
-rw-r--r--testsuites/psxtests/psx07/init.c53
3 files changed, 8 insertions, 65 deletions
diff --git a/testsuites/psxtests/ChangeLog b/testsuites/psxtests/ChangeLog
index 26b63ffbf2..7aaf258d7c 100644
--- a/testsuites/psxtests/ChangeLog
+++ b/testsuites/psxtests/ChangeLog
@@ -1,3 +1,11 @@
+2011-12-08 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ PR 1981/cpukit
+ * configure.ac: Remove checks for pthread_attr_getcputime,
+ pthread_attr_setcputime.
+ * psx07/init.c: Remove references to pthread_attr_getcputime,
+ pthread_attr_setcputime.
+
2011-10-25 Ralf Corsépius <ralf.corsepius@rtems.org>
* psxmsgq01/init.c: Introduce fatal_posix_mqd.
diff --git a/testsuites/psxtests/configure.ac b/testsuites/psxtests/configure.ac
index 98156d9746..286db3ee81 100644
--- a/testsuites/psxtests/configure.ac
+++ b/testsuites/psxtests/configure.ac
@@ -38,18 +38,6 @@ AC_CHECK_DECLS([pthread_rwlock_unlock],[],[],[[#include <pthread.h>]])
# FIXME: newlib should supply declaration of pthread_atfork()
AC_CHECK_DECLS([pthread_atfork],[],[],[[#include <pthread.h>]])
-# FIXME: RTEMS presumes pthread_attr_getcputime to be IEEE Std 1003.1
-# Likely an anachronism in RTEMS.
-AC_CHECK_DECLS([pthread_attr_getcputime],[],[],[[#include <pthread.h>]])
-
-# FIXME: RTEMS presumes pthread_attr_getcputime to be IEEE Std 1003.1
-# Likely an anachronism in RTEMS.
-AC_CHECK_DECLS([pthread_attr_getcputime],[],[],[[#include <pthread.h>]])
-
-# FIXME: RTEMS presumes pthread_attr_setcputime to be IEEE Std 1003.1
-# Likely an anachronism in RTEMS.
-AC_CHECK_DECLS([pthread_attr_setcputime],[],[],[[#include <pthread.h>]])
-
# Added to pthreads after initial revision. May not be in toolset
AC_CHECK_DECLS([pthread_attr_getstack],[],[],[[#include <pthread.h>]])
diff --git a/testsuites/psxtests/psx07/init.c b/testsuites/psxtests/psx07/init.c
index 347245b949..931335febc 100644
--- a/testsuites/psxtests/psx07/init.c
+++ b/testsuites/psxtests/psx07/init.c
@@ -16,18 +16,6 @@
#include <pthread.h>
#include <sched.h>
-#if !HAVE_DECL_PTHREAD_ATTR_GETCPUTIME
-extern int pthread_attr_getcputime(
- pthread_attr_t *attr,
- int *clock_allowed);
-#endif
-
-#if !HAVE_DECL_PTHREAD_ATTR_SETCPUTIME
-extern int pthread_attr_setcputime(
- pthread_attr_t *attr,
- int clock_allowed);
-#endif
-
#define CONFIGURE_INIT
#include "system.h"
#include <errno.h>
@@ -157,47 +145,6 @@ void *POSIX_Init(
status = pthread_attr_init( &attr );
posix_service_failed( status, " pthread_attr_init");
- /* Check out pthread_attr_settime and pthread_attr_gettime */
- puts( "Init - pthread_attr_settime - EINVAL ( null attribute )" );
- status = pthread_attr_setcputime( NULL, CLOCK_ENABLED );
- fatal_directive_check_status_only( status, EINVAL, "null attribute" );
-
- puts( "Init - pthread_attr_gettime - EINVAL ( null attribute )" );
- status = pthread_attr_getcputime( NULL, &clock_allowed );
- fatal_directive_check_status_only( status, EINVAL, " null attribute" );
-
- puts( "Init - pthread_attr_settime - EINVAL ( is initialized )" );
- status = pthread_attr_setcputime( &destroyed_attr, CLOCK_ENABLED );
- fatal_directive_check_status_only( status, EINVAL, "is initialized" );
-
- puts( "Init - pthread_attr_gettime - EINVAL ( is initialized )" );
- status = pthread_attr_getcputime( &destroyed_attr, &clock_allowed );
- fatal_directive_check_status_only( status, EINVAL, "is initialized" );
-
- puts( "Init - pthread_attr_settime - EINVAL ( invalid clock allowed )" );
- status = pthread_attr_setcputime( &attr, ~(CLOCK_ENABLED | CLOCK_DISABLED) );
- fatal_directive_check_status_only( status, EINVAL, "invalid clock allowed" );
-
- puts( "Init - pthread_attr_gettime - EINVAL ( NULL clock allowed )" );
- status = pthread_attr_getcputime( &attr, NULL );
- fatal_directive_check_status_only( status, EINVAL, "NULL clock allowed" );
-
- puts( "Init - validate pthread_attr_setcputime - CLOCK_DISABLED" );
- status = pthread_attr_setcputime( &attr, CLOCK_DISABLED );
- posix_service_failed( status, "pthread_attr_setcputime");
- status = pthread_attr_getcputime( &attr, &clock_allowed );
- posix_service_failed( status, "pthread_attr_getcputime");
- if (attr.cputime_clock_allowed != CLOCK_DISABLED)
- perror("ERROR==> pthread_attr_setcputime to CLOCK_DISABLED failed");
-
- puts( "Init - validate pthread_attr_setcputime - CLOCK_ENABLED" );
- status = pthread_attr_setcputime( &attr, CLOCK_ENABLED );
- posix_service_failed( status, "pthread_attr_setcputime");
- status = pthread_attr_getcputime( &attr, &clock_allowed );
- posix_service_failed( status, "pthread_attr_getcputime");
- if (attr.cputime_clock_allowed != CLOCK_ENABLED)
- perror("ERROR==> pthread_attr_setcputime to CLOCK_ENABLED failed");
-
/* must go around pthread_attr_set routines to set a bad value */
attr.contentionscope = PTHREAD_SCOPE_SYSTEM;