Changeset 16a41cc in rtems


Ignore:
Timestamp:
Jan 29, 2014, 8:29:39 AM (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
960fd85
Parents:
a49bc35
git-author:
Sebastian Huber <sebastian.huber@…> (01/29/14 08:29:39)
git-committer:
Sebastian Huber <sebastian.huber@…> (02/04/14 09:06:34)
Message:

score: Add _Thread_Get_maximum_internal_threads()

Location:
cpukit/score
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/include/rtems/score/threadimpl.h

    ra49bc35 r16a41cc  
    2424#include <rtems/score/objectimpl.h>
    2525#include <rtems/score/statesimpl.h>
     26#include <rtems/score/sysstate.h>
    2627#include <rtems/score/todimpl.h>
     28#include <rtems/config.h>
    2729
    2830#ifdef __cplusplus
     
    593595}
    594596
     597RTEMS_INLINE_ROUTINE uint32_t _Thread_Get_maximum_internal_threads(void)
     598{
     599  uint32_t maximum_internal_threads = 0;
     600
     601  /* Idle threads */
     602  maximum_internal_threads += rtems_configuration_get_maximum_processors();
     603
     604  /* MPCI thread */
     605#if defined(RTEMS_MULTIPROCESSING)
     606  if ( _System_state_Is_multiprocessing ) {
     607    ++maximum_internal_threads;
     608  }
     609#endif
     610
     611  return maximum_internal_threads;
     612}
     613
    595614/**
    596615 * This routine allocates an internal thread.
  • cpukit/score/src/thread.c

    ra49bc35 r16a41cc  
    2121#include <rtems/score/threadimpl.h>
    2222#include <rtems/score/interr.h>
    23 #include <rtems/score/sysstate.h>
    24 #include <rtems/config.h>
    2523
    2624void _Thread_Handler_initialization(void)
     
    3230  rtems_stack_allocate_init_hook stack_allocate_init_hook =
    3331    rtems_configuration_get_stack_allocate_init_hook();
    34   uint32_t     maximum_internal_threads;
    3532  #if defined(RTEMS_MULTIPROCESSING)
    3633    uint32_t maximum_proxies =
     
    6966   *  coupled multiprocessing system, account for the MPCI Server Thread.
    7067   */
    71   maximum_internal_threads = rtems_configuration_get_maximum_processors();
    72 
    73   #if defined(RTEMS_MULTIPROCESSING)
    74     if ( _System_state_Is_multiprocessing )
    75       maximum_internal_threads += 1;
    76   #endif
    77 
    7868  _Objects_Initialize_information(
    7969    &_Thread_Internal_information,
    8070    OBJECTS_INTERNAL_API,
    8171    OBJECTS_INTERNAL_THREADS,
    82     maximum_internal_threads,
     72    _Thread_Get_maximum_internal_threads(),
    8373    sizeof( Thread_Control ),
    8474                                /* size of this object's control block */
Note: See TracChangeset for help on using the changeset viewer.