1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-03 11:24:10 +01:00
LibrePilot/flight/PiOS.posix/inc/pios_initcall.h
Mathieu Rondonneau fc1e3f574c OP-423: Split task create and module init in order to postpone task creation once the full heap is available.
Also implement some ordering (quite ugly still) in the module init and task creation order so we can decide which module to start/init first
and which module to start/init last.
This will be replaced/adapter with the uavobject list later (once it's implemented).
reserving some space for module init and task create parameters to customize module/task creation (this will be usefull once we get the list and customization from customer).

Changes have been made for OP and CC. Tested comped with CC,OP, sim_posix.
Only ran on bench with CC for couple of minutes (code increase expected but no dropping of stack which is good).

This gives task creation at the time wherethe all heap is available.
2011-06-19 22:35:40 -07:00

52 lines
1.7 KiB
C

/**
******************************************************************************
* @addtogroup PIOS PIOS Initcall infrastructure
* @{
* @addtogroup PIOS_INITCALL Generic Initcall Macros
* @brief Initcall Macros
* @{
*
* @file pios_initcall.h
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2011.
* @brief Initcall header
* @see The GNU Public License (GPL) Version 3
*
*****************************************************************************/
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef PIOS_INITCALL_H
#define PIOS_INITCALL_H
/**
* Just a stub define to make things compile.
* Automatically link based initialization currently doesn't work
* since posix really runs on a multitude of architectures
* and we cannot define a linker script for each of them atm
*/
#define uavobj_initcall(fn)
#define module_initcall(ifn, iparam, sfn, sparam, flags)
#define MODULE_TASKCREATE_ALL();
#endif /* PIOS_INITCALL_H */
/**
* @}
* @}
*/