source: rtems/cpukit/score/src/userext.c @ 632e4306

4.104.115
Last change on this file since 632e4306 was 790b50b, checked in by Joel Sherrill <joel.sherrill@…>, on 12/17/08 at 22:46:05

2008-12-17 Joel Sherrill <joel.sherrill@…>

  • sapi/include/rtems/extension.h, sapi/include/rtems/io.h, sapi/src/exinit.c, sapi/src/extension.c, sapi/src/io.c, score/include/rtems/score/mpci.h, score/include/rtems/score/object.h, score/include/rtems/score/thread.h, score/include/rtems/score/tod.h, score/include/rtems/score/userext.h, score/include/rtems/score/wkspace.h, score/src/coretod.c, score/src/mpci.c, score/src/object.c, score/src/thread.c, score/src/userext.c, score/src/wkspace.c: Convert SAPI manager and SuperCore? Handler initialization routines to directly pull parameters from configuration table.
  • Property mode set to 100644
File size: 1.4 KB
Line 
1/*
2 *  COPYRIGHT (c) 1989-2008.
3 *  On-Line Applications Research Corporation (OAR).
4 *
5 *  The license and distribution terms for this file may be
6 *  found in the file LICENSE in this distribution or at
7 *  http://www.rtems.com/license/LICENSE.
8 *
9 *  $Id$
10 */
11
12#if HAVE_CONFIG_H
13#include "config.h"
14#endif
15
16#include <rtems/system.h>
17#include <rtems/config.h>
18#include <rtems/score/userext.h>
19#include <rtems/score/wkspace.h>
20#include <string.h>
21
22/**
23 *  This routine performs the initialization necessary for this handler.
24 */
25
26void _User_extensions_Handler_initialization(void)
27{
28  User_extensions_Control *extension;
29  uint32_t                 i;
30  uint32_t                 number_of_extensions;
31  User_extensions_Table   *initial_extensions;
32
33  number_of_extensions = Configuration.number_of_initial_extensions;
34  initial_extensions   = Configuration.User_extension_table;
35
36  _Chain_Initialize_empty( &_User_extensions_List );
37  _Chain_Initialize_empty( &_User_extensions_Switches_list );
38
39  if ( initial_extensions ) {
40    extension = (User_extensions_Control *)
41      _Workspace_Allocate_or_fatal_error(
42        number_of_extensions * sizeof( User_extensions_Control )
43      );
44 
45    memset (
46      extension,
47      0,
48      number_of_extensions * sizeof( User_extensions_Control )
49    );
50 
51    for ( i = 0 ; i < number_of_extensions ; i++ ) {
52      _User_extensions_Add_set (extension, &initial_extensions[i]);
53      extension++;
54    }
55  }
56}
57
Note: See TracBrowser for help on using the repository browser.