From fd7d65d238d22af9181871fb992c5c8901f21613 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Thu, 8 Dec 2011 08:49:19 +0000 Subject: =?UTF-8?q?2011-12-08=09Ralf=20Cors=C3=A9pius=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- testsuites/psxtests/ChangeLog | 8 ++++++ testsuites/psxtests/configure.ac | 12 --------- testsuites/psxtests/psx07/init.c | 53 ---------------------------------------- 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 + + 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 * 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 ]]) # FIXME: newlib should supply declaration of pthread_atfork() AC_CHECK_DECLS([pthread_atfork],[],[],[[#include ]]) -# FIXME: RTEMS presumes pthread_attr_getcputime to be IEEE Std 1003.1 -# Likely an anachronism in RTEMS. -AC_CHECK_DECLS([pthread_attr_getcputime],[],[],[[#include ]]) - -# FIXME: RTEMS presumes pthread_attr_getcputime to be IEEE Std 1003.1 -# Likely an anachronism in RTEMS. -AC_CHECK_DECLS([pthread_attr_getcputime],[],[],[[#include ]]) - -# FIXME: RTEMS presumes pthread_attr_setcputime to be IEEE Std 1003.1 -# Likely an anachronism in RTEMS. -AC_CHECK_DECLS([pthread_attr_setcputime],[],[],[[#include ]]) - # Added to pthreads after initial revision. May not be in toolset AC_CHECK_DECLS([pthread_attr_getstack],[],[],[[#include ]]) 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 #include -#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 @@ -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; -- cgit v1.2.3