mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-22 15:02:25 +00:00
ca971bbfd8
This patch changes the top-level directory layout as a preparatory step for improving the tools for managing 3rd-party source codes. The rationale is described in the issue referenced below. Issue #1082
34 lines
978 B
C
34 lines
978 B
C
/*
|
|
* \brief Support for initializers (i.e., constructors)
|
|
* \author Christian Helmuth
|
|
* \date 2008-08-15
|
|
*/
|
|
|
|
/*
|
|
* Copyright (C) 2008-2013 Genode Labs GmbH
|
|
*
|
|
* This file is part of the Genode OS framework, which is distributed
|
|
* under the terms of the GNU General Public License version 2.
|
|
*/
|
|
|
|
#ifndef _INCLUDE__DDE_KIT__INITCALL_H_
|
|
#define _INCLUDE__DDE_KIT__INITCALL_H_
|
|
|
|
/**
|
|
* Mark function as DDE kit initcall
|
|
*
|
|
* \param fn function name
|
|
* \param id identifier to distinguish multiple calls to 'fn'
|
|
*
|
|
* The initcall function must comply 'int func(void)'.
|
|
* The marked function is exported via a non-static symbol called
|
|
* "dde_kit_initcall_<id>_<fn>". On driver startup, the driver environment has
|
|
* to explicitly call these functions.
|
|
*
|
|
* This is the right mechanism to mark, e.g., Linux module_init() functions.
|
|
*/
|
|
#define DDE_KIT_INITCALL(fn,id) \
|
|
int (*dde_kit_initcall_##id##_##fn)(void) = fn
|
|
|
|
#endif /* _INCLUDE__DDE_KIT__INITCALL_H_ */
|