source: rtems/cpukit/score/src/thread.c @ 861346d1

4.115
Last change on this file since 861346d1 was 861346d1, checked in by Sebastian Huber <sebastian.huber@…>, on 04/22/14 at 05:46:49

score: Delete superfluous assignments

These values are already zero initialized by C run-time setup.

  • Property mode set to 100644
File size: 2.1 KB
Line 
1/**
2 *  @file
3 *
4 *  @brief Initialize Thread Handler
5 *  @ingroup ScoreThread
6 */
7
8/*
9 *  COPYRIGHT (c) 1989-2011.
10 *  On-Line Applications Research Corporation (OAR).
11 *
12 *  The license and distribution terms for this file may be
13 *  found in the file LICENSE in this distribution or at
14 *  http://www.rtems.org/license/LICENSE.
15 */
16
17#if HAVE_CONFIG_H
18#include "config.h"
19#endif
20
21#include <rtems/score/threadimpl.h>
22#include <rtems/score/interr.h>
23
24void _Thread_Handler_initialization(void)
25{
26  uint32_t ticks_per_timeslice =
27    rtems_configuration_get_ticks_per_timeslice();
28  rtems_stack_allocate_init_hook stack_allocate_init_hook =
29    rtems_configuration_get_stack_allocate_init_hook();
30  #if defined(RTEMS_MULTIPROCESSING)
31    uint32_t maximum_proxies =
32      _Configuration_MP_table->maximum_proxies;
33  #endif
34
35  if ( rtems_configuration_get_stack_allocate_hook() == NULL ||
36       rtems_configuration_get_stack_free_hook() == NULL)
37    _Terminate(
38      INTERNAL_ERROR_CORE,
39      true,
40      INTERNAL_ERROR_BAD_STACK_HOOK
41    );
42
43  if ( stack_allocate_init_hook != NULL )
44    (*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() );
45
46  #if defined(RTEMS_MULTIPROCESSING)
47    _Thread_MP_Handler_initialization( maximum_proxies );
48  #endif
49
50  /*
51   *  Initialize the internal class of threads.  We need an IDLE thread
52   *  per CPU in an SMP system.  In addition, if this is a loosely
53   *  coupled multiprocessing system, account for the MPCI Server Thread.
54   */
55  _Objects_Initialize_information(
56    &_Thread_Internal_information,
57    OBJECTS_INTERNAL_API,
58    OBJECTS_INTERNAL_THREADS,
59    _Thread_Get_maximum_internal_threads(),
60    _Thread_Control_size,       /* size of this object's control block */
61    false,                      /* true if names for this object are strings */
62    8                           /* maximum length of each object's name */
63    #if defined(RTEMS_MULTIPROCESSING)
64      ,
65      false,                      /* true if this is a global object class */
66      NULL                        /* Proxy extraction support callout */
67    #endif
68  );
69
70}
Note: See TracBrowser for help on using the repository browser.