Changeset a290fbe9 in rtems


Ignore:
Timestamp:
Apr 24, 2013, 12:30:42 PM (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
5fa0e5c5
Parents:
aeba445
git-author:
Sebastian Huber <sebastian.huber@…> (04/24/13 12:30:42)
git-committer:
Sebastian Huber <sebastian.huber@…> (04/26/13 08:57:08)
Message:

libcsupport: Make LibIO helper const

Add and use rtems_libio_helper function type. Add and use
rtems_libio_helper_null() instead of NULL pointer.

Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/shared/bsplibc.c

    raeba445 ra290fbe9  
    44 */
    55
    6 #include <rtems.h>
    76#include <rtems/libio.h>
    87#include <rtems/libcsupport.h>
     
    1716     *  Uses malloc() to get area for the iops, so must be after malloc init
    1817     */
    19     if (rtems_libio_init_helper)
    20         (*rtems_libio_init_helper)();
     18   (*rtems_libio_init_helper)();
    2119
    2220    /*
  • c/src/lib/libbsp/shared/bsppost.c

    raeba445 ra290fbe9  
    1313 */
    1414
    15 #include <fcntl.h>
    16 
    17 #include <rtems.h>
    1815#include <rtems/libio.h>
    19 #include <rtems/libcsupport.h>
    2016
    2117#include <bsp/bootcard.h>
     
    2319void bsp_postdriver_hook(void)
    2420{
    25   if (rtems_libio_supp_helper)
    26     (*rtems_libio_supp_helper)();
     21  (*rtems_libio_supp_helper)();
    2722}
  • cpukit/libcsupport/Makefile.am

    raeba445 ra290fbe9  
    5656    src/mount-mgr.c src/mount-mktgt.c src/libio_init.c \
    5757    src/privateenv.c \
     58    src/libio_helper_null.c \
    5859    src/open_dev_console.c src/__usrenv.c src/rtems_mkdir.c
    5960
  • cpukit/libcsupport/include/rtems/libio.h

    raeba445 ra290fbe9  
    13871387void rtems_filesystem_initialize( void );
    13881388
    1389 typedef void (*rtems_libio_init_functions_t)(void);
    1390 extern  rtems_libio_init_functions_t rtems_libio_init_helper;
    1391 
    1392 void    open_dev_console(void);
    1393 
    1394 typedef void (*rtems_libio_supp_functions_t)(void);
    1395 extern  rtems_libio_supp_functions_t rtems_libio_supp_helper;
    1396 
    1397 typedef void (*rtems_fs_init_functions_t)(void);
    1398 extern  rtems_fs_init_functions_t    rtems_fs_init_helper;
     1389typedef void (*rtems_libio_helper)(void);
     1390
     1391extern const rtems_libio_helper rtems_libio_init_helper;
     1392
     1393extern const rtems_libio_helper rtems_libio_supp_helper;
     1394
     1395extern const rtems_libio_helper rtems_fs_init_helper;
     1396
     1397void rtems_libio_helper_null(void);
     1398
     1399void open_dev_console(void);
    13991400
    14001401/**
  • cpukit/libcsupport/src/libio_init.c

    raeba445 ra290fbe9  
    7979   *  Initialize the base file system infrastructure.
    8080   */
    81 
    82   if (rtems_fs_init_helper)
    83      (* rtems_fs_init_helper)();
     81  (* rtems_fs_init_helper)();
    8482}
  • cpukit/sapi/include/confdefs.h

    raeba445 ra290fbe9  
    9393
    9494#ifdef CONFIGURE_INIT
    95 rtems_libio_init_functions_t rtems_libio_init_helper =
    96     #ifdef CONFIGURE_APPLICATION_DISABLE_FILESYSTEM
    97     NULL;
    98     #else
     95const rtems_libio_helper rtems_libio_init_helper =
     96  #ifdef CONFIGURE_APPLICATION_DISABLE_FILESYSTEM
     97    rtems_libio_helper_null;
     98  #else
    9999    rtems_libio_init;
    100     #endif
    101 
    102 rtems_libio_supp_functions_t rtems_libio_supp_helper =
    103     #ifdef CONFIGURE_APPLICATION_DISABLE_FILESYSTEM
    104     NULL;
    105     #else
     100  #endif
     101
     102const rtems_libio_helper rtems_libio_supp_helper =
     103  #ifdef CONFIGURE_APPLICATION_DISABLE_FILESYSTEM
     104    rtems_libio_helper_null;
     105  #else
    106106    open_dev_console;
    107     #endif
    108 
    109 rtems_fs_init_functions_t    rtems_fs_init_helper =
    110     #ifdef CONFIGURE_APPLICATION_DISABLE_FILESYSTEM
    111     NULL;
    112     #else
     107  #endif
     108
     109const rtems_libio_helper rtems_fs_init_helper =
     110  #ifdef CONFIGURE_APPLICATION_DISABLE_FILESYSTEM
     111    rtems_libio_helper_null;
     112  #else
    113113    rtems_filesystem_initialize;
    114     #endif
     114  #endif
    115115#endif
    116116#endif
Note: See TracChangeset for help on using the changeset viewer.