Changeset 7a4b2645 in rtems


Ignore:
Timestamp:
Jan 11, 2017, 3:43:06 PM (3 years ago)
Author:
Joel Sherrill <joel@…>
Branches:
master
Children:
48a7fa3
Parents:
ef362818
git-author:
Joel Sherrill <joel@…> (01/11/17 15:43:06)
git-committer:
Joel Sherrill <joel@…> (01/11/17 15:45:32)
Message:

Remove obsolete RTEMS_HAVE_SYS_CPUSET_H

Files:
26 edited

Legend:

Unmodified
Added
Removed
  • cpukit/configure.ac

    ref362818 r7a4b2645  
    120120  #define _GNU_SOURCE
    121121  #include <pthread.h>])
    122 AC_CHECK_HEADERS([sys/cpuset.h])
    123122
    124123# This was added to newlib in August 2014 to improve conformance.
     
    251250  ["]_RTEMS_VERSION["],
    252251  [RTEMS version string])
    253 
    254 ## Header file differences that need to be known in .h after install
    255 RTEMS_CPUOPT([__RTEMS_HAVE_SYS_CPUSET_H__],
    256   [test x"${ac_cv_header_sys_cpuset_h}" = x"yes"],
    257   [1],
    258   [indicate if <sys/cpuset.h> is present in toolset])
    259252
    260253## Header file differences that need to be known in .h after install
  • cpukit/posix/include/rtems/posix/pthreadimpl.h

    ref362818 r7a4b2645  
    128128{
    129129  *dst_attr = *src_attr;
    130 #if defined(RTEMS_SMP) && defined(__RTEMS_HAVE_SYS_CPUSET_H__)
     130#if defined(RTEMS_SMP)
    131131  _Assert(
    132132    dst_attr->affinitysetsize == sizeof(dst_attr->affinitysetpreallocated)
  • cpukit/posix/src/pthread.c

    ref362818 r7a4b2645  
    7676  #endif
    7777  .detachstate             = PTHREAD_CREATE_JOINABLE,    /* detachstate */
    78   #if defined(__RTEMS_HAVE_SYS_CPUSET_H__)
    79     .affinitysetsize         = 0,
    80     .affinityset             = NULL,
    81     .affinitysetpreallocated = {{0x0}}
    82   #endif
     78  .affinitysetsize         = 0,
     79  .affinityset             = NULL,
     80  .affinitysetpreallocated = {{0x0}}
    8381};
    8482
     
    245243static void _POSIX_Threads_Manager_initialization(void)
    246244{
    247   #if defined(RTEMS_SMP) && defined(__RTEMS_HAVE_SYS_CPUSET_H__)
     245  #if defined(RTEMS_SMP)
    248246    const CPU_set_Control *affinity;
    249247    pthread_attr_t *attr;
  • cpukit/posix/src/pthreadattrcompare.c

    ref362818 r7a4b2645  
    6868    return 1;
    6969
    70   #if defined(__RTEMS_HAVE_SYS_CPUSET_H__)
    71     if ( attr1->affinitysetsize != attr2->affinitysetsize )
    72       return 1;
     70  if ( attr1->affinitysetsize != attr2->affinitysetsize )
     71    return 1;
    7372
    74     if (!CPU_EQUAL_S(
    75       attr1->affinitysetsize,
    76       attr1->affinityset,
    77       attr2->affinityset
    78     ))
    79       return 1;
     73  if (!CPU_EQUAL_S(
     74    attr1->affinitysetsize,
     75    attr1->affinityset,
     76    attr2->affinityset
     77  ))
     78    return 1;
    8079
    81     if (!CPU_EQUAL_S(
    82       attr1->affinitysetsize,
    83       &attr1->affinitysetpreallocated,
    84       &attr2->affinitysetpreallocated
    85     ))
    86       return 1;
    87   #endif
     80  if (!CPU_EQUAL_S(
     81    attr1->affinitysetsize,
     82    &attr1->affinitysetpreallocated,
     83    &attr2->affinitysetpreallocated
     84  ))
     85    return 1;
    8886
    8987  return 0;
  • cpukit/posix/src/pthreadcreate.c

    ref362818 r7a4b2645  
    171171
    172172#if defined(RTEMS_SMP)
    173 #if __RTEMS_HAVE_SYS_CPUSET_H__
    174   status = _CPU_set_Is_valid( the_attr->affinityset, the_attr->affinitysetsize );
     173  status = _CPU_set_Is_valid(the_attr->affinityset, the_attr->affinitysetsize);
    175174  if ( !status )
    176175    return EINVAL;
    177 #endif
    178176#endif
    179177
     
    225223  the_thread->Life.state |= THREAD_LIFE_CHANGE_DEFERRED;
    226224
    227 #if defined(RTEMS_SMP) && __RTEMS_HAVE_SYS_CPUSET_H__
     225#if defined(RTEMS_SMP)
    228226  _ISR_lock_ISR_disable( &lock_context );
    229227   status = _Scheduler_Set_affinity(
  • cpukit/rtems/include/rtems/rtems/tasks.h

    ref362818 r7a4b2645  
    403403);
    404404
    405 #if defined(__RTEMS_HAVE_SYS_CPUSET_H__)
    406405/**
    407406 * @brief Gets the processor affinity set of a task.
     
    459458  const cpu_set_t *cpuset
    460459);
    461 #endif
    462460
    463461/**
     
    562560);
    563561
    564 #if defined(__RTEMS_HAVE_SYS_CPUSET_H__)
    565562/**
    566563 * @brief Gets the set of processors owned by the specified scheduler instance.
     
    584581  cpu_set_t *cpuset
    585582);
    586 #endif
    587583
    588584/**
  • cpukit/rtems/src/schedulergetprocessorset.c

    ref362818 r7a4b2645  
    1616  #include "config.h"
    1717#endif
    18 
    19 #if defined(__RTEMS_HAVE_SYS_CPUSET_H__)
    2018
    2119#include <rtems/rtems/tasks.h>
     
    4846  return RTEMS_SUCCESSFUL;
    4947}
    50 
    51 #endif /* defined(__RTEMS_HAVE_SYS_CPUSET_H__) */
  • cpukit/rtems/src/taskgetaffinity.c

    ref362818 r7a4b2645  
    1818#include "config.h"
    1919#endif
    20 
    21 #if defined(__RTEMS_HAVE_SYS_CPUSET_H__)
    2220
    2321#include <rtems/rtems/tasks.h>
     
    6664  return ok ? RTEMS_SUCCESSFUL : RTEMS_INVALID_NUMBER;
    6765}
    68 #endif
  • cpukit/rtems/src/tasksetaffinity.c

    ref362818 r7a4b2645  
    1818#include "config.h"
    1919#endif
    20 
    21 #if defined(__RTEMS_HAVE_SYS_CPUSET_H__)
    2220
    2321#include <rtems/rtems/tasks.h>
     
    6664  return ok ? RTEMS_SUCCESSFUL : RTEMS_INVALID_NUMBER;
    6765}
    68 #endif
  • cpukit/score/include/rtems/score/cpuset.h

    ref362818 r7a4b2645  
    2121
    2222#include <rtems/score/basedefs.h>
    23 
    24 #ifdef __RTEMS_HAVE_SYS_CPUSET_H__
    2523
    2624#include <sys/cpuset.h>
     
    6260#endif
    6361
    64 #endif /* __RTEMS_HAVE_SYS_CPUSET_H__ */
    65 
    6662#endif /* _RTEMS_SCORE_CPUSET_H */
    6763/* end of include file */
  • cpukit/score/include/rtems/score/cpusetimpl.h

    ref362818 r7a4b2645  
    2828extern "C" {
    2929#endif
    30 
    31 #ifdef __RTEMS_HAVE_SYS_CPUSET_H__
    3230
    3331/**
     
    122120  CPU_COPY( set->set, cpuset );
    123121}
    124 #endif
    125122
    126123/**@}*/
  • cpukit/score/include/rtems/score/scheduler.h

    ref362818 r7a4b2645  
    2121
    2222#include <rtems/score/thread.h>
    23 #if defined(__RTEMS_HAVE_SYS_CPUSET_H__) && defined(RTEMS_SMP)
     23#if defined(RTEMS_SMP)
    2424  #include <sys/cpuset.h>
    2525#endif
     
    213213  );
    214214
    215 #if defined(__RTEMS_HAVE_SYS_CPUSET_H__) && defined(RTEMS_SMP)
     215#if defined(RTEMS_SMP)
    216216  /** @see _Scheduler_Get_affinity() */
    217217  bool ( *get_affinity )(
     
    524524);
    525525
    526 #if defined(__RTEMS_HAVE_SYS_CPUSET_H__) && defined(RTEMS_SMP)
     526#if defined(RTEMS_SMP)
    527527  /**
    528528   * @brief Get affinity for the default scheduler.
  • cpukit/score/include/rtems/score/schedulerimpl.h

    ref362818 r7a4b2645  
    660660}
    661661
    662 #if defined(__RTEMS_HAVE_SYS_CPUSET_H__)
    663 
    664662RTEMS_INLINE_ROUTINE void _Scheduler_Get_processor_set(
    665663  const Scheduler_Control *scheduler,
     
    744742  const cpu_set_t *cpuset
    745743);
    746 
    747 #endif /* defined(__RTEMS_HAVE_SYS_CPUSET_H__) */
    748744
    749745RTEMS_INLINE_ROUTINE void _Scheduler_Generic_block(
  • cpukit/score/src/cpuset.c

    ref362818 r7a4b2645  
    2020#endif
    2121
    22 #ifdef __RTEMS_HAVE_SYS_CPUSET_H__
    2322#include <sys/cpuset.h>
    2423#include <rtems/sysinit.h>
     
    9796  return &cpuset_default;
    9897}
    99 #endif
    100 
    101 
  • cpukit/score/src/cpusetprintsupport.c

    ref362818 r7a4b2645  
    2727#include <rtems/score/cpusetimpl.h>
    2828
    29 #ifdef __RTEMS_HAVE_SYS_CPUSET_H__
     29void _CPU_set_Show_with_plugin(
     30  const rtems_printer *printer,
     31  const char          *description,
     32  const cpu_set_t     *cpuset
     33);
    3034
    31   void _CPU_set_Show_with_plugin(
    32     const rtems_printer *printer,
    33     const char          *description,
    34     const cpu_set_t     *cpuset
    35   );
     35/*
     36 * _CPU_set_Show_with_plugin
     37 *
     38 * This routine shows cpuset cpuset using a
     39 * print plugin .
     40 */
     41void _CPU_set_Show_with_plugin(
     42  const rtems_printer *printer,
     43  const char          *description,
     44  const cpu_set_t     *cpuset
     45)
     46{
     47  int i;
     48  rtems_printf(printer ,"%s: ", description);
     49  for(i=0; i<_NCPUWORDS; i++)
     50    rtems_printf(printer ,"%" PRIx32 "", cpuset->__bits[i]);
     51  rtems_printf(printer ,"\n");
     52}
    3653
    37   /*
    38    * _CPU_set_Show_with_plugin
    39    *
    40    * This routine shows cpuset cpuset using a
    41    * print plugin .
    42    */
    43   void _CPU_set_Show_with_plugin(
    44     const rtems_printer *printer,
    45     const char          *description,
    46     const cpu_set_t     *cpuset
    47   )
    48   {
    49     int i;
    50     rtems_printf(printer ,"%s: ", description);
    51     for(i=0; i<_NCPUWORDS; i++)
    52       rtems_printf(printer ,"%" PRIx32 "", cpuset->__bits[i]);
    53     rtems_printf(printer ,"\n");
    54   }
     54/*
     55 * _CPU_set_Show
     56 *
     57 * This routine shows a cpuset using the
     58 * printk plugin.
     59 */
     60void _CPU_set_Show( const char *description, const cpu_set_t   *cpuset)
     61{
     62  rtems_printer printer;
     63  rtems_print_printer_printk( &printer );
     64  _CPU_set_Show_with_plugin( &printer, description, cpuset );
     65}
    5566
    56   /*
    57    * _CPU_set_Show
    58    *
    59    * This routine shows a cpuset using the
    60    * printk plugin.
    61    */
    62   void _CPU_set_Show( const char *description, const cpu_set_t   *cpuset)
    63   {
    64     rtems_printer printer;
    65     rtems_print_printer_printk( &printer );
    66     _CPU_set_Show_with_plugin( &printer, description, cpuset );
    67   }
    68 
    69   /*
    70    * _CPU_set_Show_default
    71    *
    72    * This routine shows the default cpuset.
    73    */
    74  void _CPU_set_Show_default( const char *description )
    75   {
    76     const CPU_set_Control *ctl;
    77     ctl = _CPU_set_Default();
    78     _CPU_set_Show( description, ctl->set );
    79   }
    80 #endif
     67/*
     68 * _CPU_set_Show_default
     69 *
     70 * This routine shows the default cpuset.
     71 */
     72void _CPU_set_Show_default( const char *description )
     73{
     74  const CPU_set_Control *ctl;
     75  ctl = _CPU_set_Default();
     76  _CPU_set_Show( description, ctl->set );
     77}
  • cpukit/score/src/schedulergetaffinity.c

    ref362818 r7a4b2645  
    1818
    1919#include <rtems/score/schedulerimpl.h>
    20 
    21 #if defined(__RTEMS_HAVE_SYS_CPUSET_H__)
    2220
    2321bool _Scheduler_Get_affinity(
     
    5755  return ok;
    5856}
    59 
    60 #endif /* defined(__RTEMS_HAVE_SYS_CPUSET_H__) */
  • cpukit/score/src/schedulersetaffinity.c

    ref362818 r7a4b2645  
    1818
    1919#include <rtems/score/schedulerimpl.h>
    20 
    21 #if defined(__RTEMS_HAVE_SYS_CPUSET_H__)
    2220
    2321bool _Scheduler_Set_affinity(
     
    5755  return ok;
    5856}
    59 
    60 #endif /* defined(__RTEMS_HAVE_SYS_CPUSET_H__) */
  • testsuites/psxtests/configure.ac

    ref362818 r7a4b2645  
    8181  #define _GNU_SOURCE
    8282  #include <pthread.h>]])
    83 
    84 # Added to newlib pthreads for RTEMS SMP (np), may not be present
    85 AC_CHECK_HEADERS([cpuset.h])
    8683
    8784# Mandated by POSIX, not declared in some versions of newlib.
  • testsuites/smptests/configure.ac

    ref362818 r7a4b2645  
    5252  #include <pthread.h>]])
    5353
    54 # Added to newlib pthreads for RTEMS SMP (np), may not be present
    55 AC_CHECK_HEADERS([sys/cpuset.h])
    56 AM_CONDITIONAL(HAS_CPUSET,test x"${ac_cv_header_sys_cpuset_h}" = x"yes")
    57 
    5854# Explicitly list all Makefiles here
    5955AC_CONFIG_FILES([Makefile
  • testsuites/smptests/smpaffinity01/init.c

    ref362818 r7a4b2645  
    1717
    1818const char rtems_test_name[] = "SMPAFFINITY 1";
    19 
    20 #if defined(__RTEMS_HAVE_SYS_CPUSET_H__)
    2119
    2220rtems_id           Init_id;
     
    227225}
    228226
    229 #else
    230 static void Init(rtems_task_argument arg)
    231 {
    232   TEST_BEGIN();
    233   puts( " Affinity NOT Supported");
    234   TEST_END();
    235   rtems_test_exit(0);
    236 }
    237 
    238 #endif
    239227#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
    240228#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
  • testsuites/sptests/Makefile.am

    ref362818 r7a4b2645  
    8282_SUBDIRS += sptimerserver01
    8383_SUBDIRS += spclock_err02
    84 
    85 if HAS_CPUSET
    8684_SUBDIRS += spcpuset01
    87 endif
    8885
    8986include $(top_srcdir)/../automake/test-subdirs.am
  • testsuites/sptests/configure.ac

    ref362818 r7a4b2645  
    3636AC_CHECK_HEADERS([threads.h])
    3737AM_CONDITIONAL([HAS_THREADS_H],[test x"$ac_cv_header_threads_h" = x"yes"])
    38 
    39 # Added to newlib pthreads for RTEMS SMP (np), may not be present
    40 AC_CHECK_HEADERS([sys/cpuset.h])
    41 AM_CONDITIONAL(HAS_CPUSET,test x"${ac_cv_header_sys_cpuset_h}" = x"yes")
    4238
    4339# Some tests should not be built/run in SMP configurations
  • testsuites/sptests/spcpuset01/init.c

    ref362818 r7a4b2645  
    1616const char rtems_test_name[] = "SPCPUSET 1";
    1717
    18 #if defined(__RTEMS_HAVE_SYS_CPUSET_H__)
    1918static void test_cpu_zero_case_1(void)
    2019{
     
    155154  exit( 0 );
    156155}
    157 #else
    158 #error "Init - No cpuset"
    159 rtems_task Init(
    160   rtems_task_argument ignored
    161 )
    162 {
    163   TEST_BEGIN();
    164   puts( "  cpuset not supported\n" );
    165   TEST_END();
    166   exit( 0 );
    167 }
    168 #endif
  • testsuites/sptests/spcpuset01/system.h

    ref362818 r7a4b2645  
    1111#include "test_support.h"
    1212
    13 #if defined(__RTEMS_HAVE_SYS_CPUSET_H__)
    1413#include <sys/cpuset.h>
    1514
     
    1817extern cpu_set_t set2;
    1918extern cpu_set_t set3;
    20 #endif
    2119
    2220/* enable/disable verbose output */
  • testsuites/sptests/spcpuset01/test.c

    ref362818 r7a4b2645  
    1212#include "system.h"
    1313
    14 #if defined(__RTEMS_HAVE_SYS_CPUSET_H__)
    1514void test_cpu_and_case_1(size_t cpu1, size_t cpu2);
    1615void test_cpu_nand_case_1(size_t cpu1, size_t cpu2);
     
    125124  }
    126125}
    127 #endif
  • testsuites/sptests/spscheduler01/init.c

    ref362818 r7a4b2645  
    3838static void test_task_get_set_affinity(void)
    3939{
    40 #if defined(__RTEMS_HAVE_SYS_CPUSET_H__)
    4140  rtems_id self_id = rtems_task_self();
    4241  rtems_id task_id;
     
    121120  CPU_FREE(cpusetbig);
    122121  CPU_FREE(cpusetbigone);
    123 #endif /* defined(__RTEMS_HAVE_SYS_CPUSET_H__) */
    124122}
    125123
     
    362360static void test_scheduler_get_processors(void)
    363361{
    364 #if defined(__RTEMS_HAVE_SYS_CPUSET_H__)
    365362  rtems_status_code sc;
    366363  rtems_name name = BLUE;
     
    409406  CPU_FREE(cpusetbig);
    410407  CPU_FREE(cpusetbigone);
    411 #endif /* defined(__RTEMS_HAVE_SYS_CPUSET_H__) */
    412408}
    413409
Note: See TracChangeset for help on using the changeset viewer.