source: rtems/cpukit/score/src/userext.c @ 6b5f22dc

Last change on this file since 6b5f22dc was 80cf60e, checked in by Sebastian Huber <sebastian.huber@…>, on 04/15/20 at 07:48:32

Canonicalize config.h include

Use the following variant which was already used by most source files:

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

  • Property mode set to 100644
File size: 1.2 KB
RevLine 
[c42d1a4]1/**
2 * @file
3 *
[4c20da4b]4 * @ingroup RTEMSScoreUserExt
[c42d1a4]5 *
6 * @brief User Extension Handler implementation.
7 */
8
[5072b07]9/*
[790b50b]10 *  COPYRIGHT (c) 1989-2008.
[5072b07]11 *  On-Line Applications Research Corporation (OAR).
12 *
[98e4ebf5]13 *  The license and distribution terms for this file may be
14 *  found in the file LICENSE in this distribution or at
[c499856]15 *  http://www.rtems.org/license/LICENSE.
[5072b07]16 */
17
[80cf60e]18#ifdef HAVE_CONFIG_H
19#include "config.h"
[a8eed23]20#endif
21
[3be0c9a]22#include <rtems/score/userextimpl.h>
[5072b07]23
[0a97ba5b]24void _User_extensions_Handler_initialization(void)
[5072b07]25{
[0a97ba5b]26  const User_extensions_Table    *initial_table;
[5ae6112]27  User_extensions_Switch_control *initial_switch_controls;
28  size_t                          n;
29  size_t                          i;
[790b50b]30
[5ae6112]31  initial_table = _User_extensions_Initial_extensions;
32  initial_switch_controls = _User_extensions_Initial_switch_controls;
33  n = _User_extensions_Initial_count;
[05279b84]34
[0a97ba5b]35  for ( i = 0 ; i < n ; ++i ) {
36    User_extensions_thread_switch_extension callout;
37
38    callout = initial_table[ i ].thread_switch;
39
40    if ( callout != NULL ) {
41      User_extensions_Switch_control *c;
42
[5ae6112]43      c = &initial_switch_controls[ i ];
[0a97ba5b]44      c->thread_switch = callout;
[992494e]45      _Chain_Initialize_node( &c->Node );
[0a97ba5b]46      _Chain_Append_unprotected( &_User_extensions_Switches_list, &c->Node );
47    }
48  }
[5072b07]49}
Note: See TracBrowser for help on using the repository browser.