Export redesign
this is an atempt to make the export of functions typesafe. I replaced the jumptable void ** by a struct (jt_funcs) with function pointers. The EXPORT_FUNC macro now has 3 fixed parameters and one variadic parameter The first is the name of the exported function, the rest of the parameters are used to format a functionpointer in the jumptable, the EXPORT_FUNC macros are expanded three times, 1. to declare the members of the struct 2. to initialize the structmember pointers 3. to call the functions in stubs.c Signed-off-by:Martin Dorwig <dorwig@tetronik.com> Acked-by:
Simon Glass <sjg@chromium.org> Signed-off-by:
Simon Glass <sjg@chromium.org> (resending to the list since my tweaks are not quite trivial)
Showing
- arch/blackfin/cpu/cpu.c 2 additions, 1 deletionarch/blackfin/cpu/cpu.c
- board/BuS/eb_cpux9k2/cpux9k2.c 1 addition, 1 deletionboard/BuS/eb_cpux9k2/cpux9k2.c
- common/cmd_load.c 1 addition, 1 deletioncommon/cmd_load.c
- common/console.c 10 additions, 10 deletionscommon/console.c
- common/exports.c 3 additions, 26 deletionscommon/exports.c
- doc/README.standalone 30 additions, 11 deletionsdoc/README.standalone
- examples/standalone/stubs.c 33 additions, 31 deletionsexamples/standalone/stubs.c
- include/_exports.h 70 additions, 29 deletionsinclude/_exports.h
- include/asm-generic/global_data.h 1 addition, 1 deletioninclude/asm-generic/global_data.h
- include/exports.h 12 additions, 10 deletionsinclude/exports.h
Loading
Please register or sign in to comment