Constructors

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/baseband-devel@lists.osmocom.org/.

Joerg Albert jal2 at gmx.de
Mon Jun 28 21:35:36 UTC 2010


On 06/28/2010 04:19 PM, Sébastien Lorquet wrote:
> Hi,
> 
> If I understand correctly, this is the same type of idea of the linux
> kernel's __init magic, except that no code cleanup is done?
>

AFAIK it is the same type of idea but implemented in a different way: the linux kernel
uses several (self-defined) sections, see http://lxr.free-electrons.com/source/include/linux/init.h lines 170ff.
(and 187ff.)

#define __define_initcall(level,fn,id) \
         static initcall_t __initcall_##fn##id __used \
         __attribute__((__section__(".initcall" level ".init"))) = fn

to define the init functions and the order they should be called in.

Cheers,
Jörg.




More information about the baseband-devel mailing list