Changeset 9db8705 in rtems


Ignore:
Timestamp:
Feb 6, 2014, 6:42:24 PM (6 years ago)
Author:
Jennifer Averett <jennifer.averett@…>
Branches:
4.11, master
Children:
039a189d
Parents:
13ab94b
git-author:
Jennifer Averett <jennifer.averett@…> (02/06/14 18:42:24)
git-committer:
Jennifer Averett <jennifer.averett@…> (03/07/14 15:07:59)
Message:

score: Add cpuset support to Score.

This new Score Handler provides a structure to manage a
cpu_set_t plus helper routines to validate the contents
against the current system configuration.

Location:
cpukit/score
Files:
4 added
4 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/Makefile.am

    r13ab94b r9db8705  
    3030include_rtems_score_HEADERS += include/rtems/score/coresem.h
    3131include_rtems_score_HEADERS += include/rtems/score/coresemimpl.h
     32include_rtems_score_HEADERS += include/rtems/score/cpuset.h
     33include_rtems_score_HEADERS += include/rtems/score/cpusetimpl.h
    3234include_rtems_score_HEADERS += include/rtems/score/heap.h
    3335include_rtems_score_HEADERS += include/rtems/score/heapimpl.h
     
    125127libscore_a_SOURCES += src/schedulersmpstartidle.c
    126128libscore_a_SOURCES += src/smp.c
     129libscore_a_SOURCES += src/cpuset.c
     130libscore_a_SOURCES += src/cpusetprintsupport.c
    127131endif
    128132
  • cpukit/score/include/rtems/score/thread.h

    r13ab94b r9db8705  
    3131#include <rtems/score/threadq.h>
    3232#include <rtems/score/watchdog.h>
     33
     34#ifdef RTEMS_SMP
     35#if __RTEMS_HAVE_SYS_CPUSET_H__
     36#include <sys/cpuset.h>
     37#include <rtems/score/cpuset.h>
     38#endif
     39#endif
    3340
    3441#ifdef __cplusplus
     
    407414   */
    408415  bool                                  is_executing;
    409 #endif
     416
     417#if __RTEMS_HAVE_SYS_CPUSET_H__
     418  /**
     419   *  @brief This field controls affinity attributes for this thread.
     420   *
     421   *  Affinity attributes indicate which cpus the thread can run on
     422   *  in an SMP system.
     423   */
     424  CPU_set_Control                       affinity;
     425#endif
     426#endif
     427
    410428#if __RTEMS_ADA__
    411429  /** This field is the GNAT self context pointer. */
  • cpukit/score/preinstall.am

    r13ab94b r9db8705  
    9999        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/coresemimpl.h
    100100PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/coresemimpl.h
     101
     102$(PROJECT_INCLUDE)/rtems/score/cpuset.h: include/rtems/score/cpuset.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
     103        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/cpuset.h
     104PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/cpuset.h
     105
     106$(PROJECT_INCLUDE)/rtems/score/cpusetimpl.h: include/rtems/score/cpusetimpl.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
     107        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/cpusetimpl.h
     108PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/cpusetimpl.h
    101109
    102110$(PROJECT_INCLUDE)/rtems/score/heap.h: include/rtems/score/heap.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
  • cpukit/score/src/threadinitialize.c

    r13ab94b r9db8705  
    66 */
    77/*
    8  *  COPYRIGHT (c) 1989-2011.
     8 *  COPYRIGHT (c) 1989-2014.
    99 *  On-Line Applications Research Corporation (OAR).
    1010 *
     
    2525#include <rtems/score/watchdogimpl.h>
    2626#include <rtems/score/wkspace.h>
     27#include <rtems/score/cpusetimpl.h>
    2728#include <rtems/config.h>
    2829
     
    207208  /* Initialize the cpu field for the non-SMP schedulers */
    208209  the_thread->cpu                     = _Per_CPU_Get_by_index( 0 );
     210#if __RTEMS_HAVE_SYS_CPUSET_H__
     211   the_thread->affinity               = *(_CPU_set_Default());
     212   the_thread->affinity.set           = &the_thread->affinity.preallocated;
     213#endif
    209214#endif
    210215
Note: See TracChangeset for help on using the changeset viewer.