Changeset fd7d65d in rtems


Ignore:
Timestamp:
Dec 8, 2011, 8:49:19 AM (7 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.11, master
Children:
58451f1c
Parents:
438a893
Message:

2011-12-08 Ralf Corsépius <ralf.corsepius@…>

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.
Location:
testsuites/psxtests
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • testsuites/psxtests/ChangeLog

    r438a893 rfd7d65d  
     12011-12-08      Ralf Corsépius <ralf.corsepius@rtems.org>
     2
     3        PR 1981/cpukit
     4        * configure.ac: Remove checks for pthread_attr_getcputime,
     5        pthread_attr_setcputime.
     6        * psx07/init.c: Remove references to pthread_attr_getcputime,
     7        pthread_attr_setcputime.
     8
    192011-10-25      Ralf Corsépius <ralf.corsepius@rtems.org>
    210
  • testsuites/psxtests/configure.ac

    r438a893 rfd7d65d  
    3838# FIXME: newlib should supply declaration of pthread_atfork()
    3939AC_CHECK_DECLS([pthread_atfork],[],[],[[#include <pthread.h>]])
    40 
    41 # FIXME: RTEMS presumes pthread_attr_getcputime to be IEEE Std 1003.1
    42 # Likely an anachronism in RTEMS.
    43 AC_CHECK_DECLS([pthread_attr_getcputime],[],[],[[#include <pthread.h>]])
    44 
    45 # FIXME: RTEMS presumes pthread_attr_getcputime to be IEEE Std 1003.1
    46 # Likely an anachronism in RTEMS.
    47 AC_CHECK_DECLS([pthread_attr_getcputime],[],[],[[#include <pthread.h>]])
    48 
    49 # FIXME: RTEMS presumes pthread_attr_setcputime to be IEEE Std 1003.1
    50 # Likely an anachronism in RTEMS.
    51 AC_CHECK_DECLS([pthread_attr_setcputime],[],[],[[#include <pthread.h>]])
    5240
    5341# Added to pthreads after initial revision.  May not be in toolset
  • testsuites/psxtests/psx07/init.c

    r438a893 rfd7d65d  
    1616#include <pthread.h>
    1717#include <sched.h>
    18 
    19 #if !HAVE_DECL_PTHREAD_ATTR_GETCPUTIME
    20 extern int pthread_attr_getcputime(
    21   pthread_attr_t  *attr,
    22   int             *clock_allowed);
    23 #endif
    24 
    25 #if !HAVE_DECL_PTHREAD_ATTR_SETCPUTIME
    26 extern int pthread_attr_setcputime(
    27   pthread_attr_t  *attr,
    28   int             clock_allowed);
    29 #endif
    3018
    3119#define CONFIGURE_INIT
     
    158146  posix_service_failed( status, " pthread_attr_init");
    159147
    160   /* Check out pthread_attr_settime and pthread_attr_gettime */
    161   puts( "Init - pthread_attr_settime - EINVAL ( null attribute )" );
    162   status = pthread_attr_setcputime( NULL, CLOCK_ENABLED );
    163   fatal_directive_check_status_only( status, EINVAL, "null attribute" );
    164 
    165   puts( "Init - pthread_attr_gettime - EINVAL ( null attribute )" );
    166   status = pthread_attr_getcputime( NULL, &clock_allowed );
    167   fatal_directive_check_status_only( status, EINVAL, " null attribute" );
    168 
    169   puts( "Init - pthread_attr_settime - EINVAL ( is initialized )" );
    170   status = pthread_attr_setcputime( &destroyed_attr, CLOCK_ENABLED );
    171   fatal_directive_check_status_only( status, EINVAL, "is initialized" );
    172 
    173   puts( "Init - pthread_attr_gettime - EINVAL ( is initialized )" );
    174   status = pthread_attr_getcputime( &destroyed_attr, &clock_allowed  );
    175   fatal_directive_check_status_only( status, EINVAL, "is initialized" );
    176 
    177   puts( "Init - pthread_attr_settime - EINVAL ( invalid clock allowed )" );
    178   status = pthread_attr_setcputime( &attr, ~(CLOCK_ENABLED | CLOCK_DISABLED) );
    179   fatal_directive_check_status_only( status, EINVAL, "invalid clock allowed" );
    180 
    181   puts( "Init - pthread_attr_gettime - EINVAL ( NULL clock allowed )" );
    182   status = pthread_attr_getcputime( &attr, NULL );
    183   fatal_directive_check_status_only( status, EINVAL, "NULL clock allowed" );
    184 
    185   puts( "Init - validate pthread_attr_setcputime - CLOCK_DISABLED" );
    186   status = pthread_attr_setcputime( &attr, CLOCK_DISABLED );
    187   posix_service_failed( status, "pthread_attr_setcputime");
    188   status = pthread_attr_getcputime( &attr, &clock_allowed );
    189   posix_service_failed( status, "pthread_attr_getcputime");
    190   if (attr.cputime_clock_allowed != CLOCK_DISABLED)
    191     perror("ERROR==> pthread_attr_setcputime to CLOCK_DISABLED failed");
    192 
    193   puts( "Init - validate pthread_attr_setcputime - CLOCK_ENABLED" );
    194   status = pthread_attr_setcputime( &attr, CLOCK_ENABLED );
    195   posix_service_failed( status, "pthread_attr_setcputime");
    196   status = pthread_attr_getcputime( &attr, &clock_allowed );
    197   posix_service_failed( status, "pthread_attr_getcputime");
    198   if (attr.cputime_clock_allowed != CLOCK_ENABLED)
    199     perror("ERROR==> pthread_attr_setcputime to CLOCK_ENABLED failed");
    200 
    201148  /* must go around pthread_attr_set routines to set a bad value */
    202149  attr.contentionscope = PTHREAD_SCOPE_SYSTEM;
Note: See TracChangeset for help on using the changeset viewer.