Changeset da9f5f1 in rtems


Ignore:
Timestamp:
Oct 9, 2017, 1:34:26 PM (18 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
8c5267a
Parents:
af9115f3
git-author:
Sebastian Huber <sebastian.huber@…> (10/09/17 13:34:26)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/09/17 13:54:20)
Message:

posix: Remove rtems_pthread_attribute_compare()

Update #2514.
Close #3174.

Files:
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • cpukit/posix/Makefile.am

    raf9115f3 rda9f5f1  
    151151libposix_a_SOURCES += src/pthreadsetschedprio.c
    152152
    153 ## RTEMS specific support methods
    154 libposix_a_SOURCES += src/pthreadattrcompare.c
    155 
    156153## PSIGNAL_C_FILES
    157154libposix_a_SOURCES += src/psignal.c src/alarm.c src/kill.c src/killinfo.c \
  • cpukit/posix/include/rtems/posix/pthreadimpl.h

    raf9115f3 rda9f5f1  
    104104);
    105105
    106 /*
    107  * rtems_pthread_attribute_compare
    108  */
    109 int rtems_pthread_attribute_compare(
    110   const pthread_attr_t *attr1,
    111   const pthread_attr_t *attr2
    112 );
    113 
    114106RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate(void)
    115107{
  • testsuites/psxtests/psxgetattrnp01/init.c

    raf9115f3 rda9f5f1  
    3434int                 max_priority;
    3535
     36static int attribute_compare(
     37  const pthread_attr_t *attr1,
     38  const pthread_attr_t *attr2
     39)
     40{
     41  if ( attr1->is_initialized  !=  attr2->is_initialized )
     42    return 1;
     43
     44  if (
     45    attr1->stackaddr != NULL &&
     46      attr2->stackaddr != NULL &&
     47      attr1->stackaddr != attr2->stackaddr )
     48    return 1;
     49
     50  if ( attr1->stacksize != attr2->stacksize )
     51    return 1;
     52
     53  if ( attr1->contentionscope != attr2->contentionscope )
     54    return 1;
     55
     56  if ( attr1->inheritsched != attr2->inheritsched )
     57    return 1;
     58
     59  if ( attr1->schedpolicy != attr2->schedpolicy )
     60    return 1;
     61
     62  if (memcmp(
     63    &attr1->schedparam,
     64    &attr2->schedparam,
     65    sizeof(struct sched_param)
     66  ))
     67    return 1;
     68
     69  #if HAVE_DECL_PTHREAD_ATTR_SETGUARDSIZE
     70    if ( attr1->guardsize != attr2->guardsize )
     71      return 1;
     72  #endif
     73
     74  #if defined(_POSIX_THREAD_CPUTIME)
     75    if ( attr1->cputime_clock_allowed != attr2->cputime_clock_allowed )
     76      return 1;
     77  #endif
     78
     79  if ( attr1->detachstate != attr2->detachstate )
     80    return 1;
     81
     82  if ( attr1->affinitysetsize != attr2->affinitysetsize )
     83    return 1;
     84
     85  if (!CPU_EQUAL_S(
     86    attr1->affinitysetsize,
     87    attr1->affinityset,
     88    attr2->affinityset
     89  ))
     90    return 1;
     91
     92  if (!CPU_EQUAL_S(
     93    attr1->affinitysetsize,
     94    &attr1->affinitysetpreallocated,
     95    &attr2->affinitysetpreallocated
     96  ))
     97    return 1;
     98
     99  return 0;
     100}
     101
    36102void *Thread_1(
    37103  void *argument
     
    49115  sc = pthread_getattr_np( Thread_id, &attr );
    50116  rtems_test_assert( sc == 0 );
    51   rtems_test_assert( ! rtems_pthread_attribute_compare(&attr, &Thread_attr) );
     117  rtems_test_assert( ! attribute_compare(&attr, &Thread_attr) );
    52118
    53119  param.sched_priority = max_priority;
Note: See TracChangeset for help on using the changeset viewer.