mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
Add a few warning comments about the INIT_ATTR stuff.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25024 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
2ac962aceb
commit
a62eced78a
2 changed files with 16 additions and 0 deletions
|
@ -748,6 +748,16 @@ Lyre prototype 1 */
|
|||
#define STATICIRAM static
|
||||
#endif
|
||||
#if (defined(CPU_PP) || (CONFIG_CPU == AS3525)) && !defined(SIMULATOR) && !defined(BOOTLOADER)
|
||||
/* Functions that have INIT_ATTR attached are NOT guaranteed to survive after
|
||||
* root_menu() has been called. Their code may be overwritten by other data or
|
||||
* code in order to save RAM, and references to them might point into
|
||||
* zombie area.
|
||||
*
|
||||
* It is critical that you make sure these functions are only called before
|
||||
* the final call to root_menu() (see apps/main.c) is called (i.e. basically
|
||||
* only while main() runs), otherwise things may go wild,
|
||||
* from crashes to freezes to exploding daps.
|
||||
*/
|
||||
#define INIT_ATTR __attribute__ ((section(".init")))
|
||||
#define HAVE_INIT_ATTR
|
||||
#else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue