summaryrefslogtreecommitdiff
path: root/apps/plugins/lib/pluginlib_exit.h (follow)
Commit message (Collapse)AuthorAge
* Fix building simulator plugins on Cygwin. A DLL stub containing atexit is ↵Magnus Holmgren2010-08-26
| | | | | | linked to the plugins, so give our version a prefix. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27893 a1c6a512-1295-4272-9138-f99709370657
* Second try: Introduce plugin_crt0.c that every plugin links.Thomas Martitz2010-08-24
| | | | | | | | | | | | | It handles exit() properly, calling the handler also when the plugin returns normally (also make exit() more standard compliant while at it). It also holds PLUGIN_HEADER, so that it doesn't need to be in each plugin anymore. To work better together with callbacks passed to rb->default_event_handler_ex() introduce exit_on_usb() which will call the exit handler before showing the usb screen and exit() after it. In most cases rb->default_event_handler_ex() was passed a callback which was manually called at all other return points. This can now be done via atexit(). In future plugin_crt0.c could also handle clearing bss, initializing iram and more. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27873 a1c6a512-1295-4272-9138-f99709370657
* Move setjmp to lib and add setjmp for sh (imported from newlib) and compile ↵Thomas Martitz2010-08-24
| | | | | | | | | it as separate library. It's used by both, plugins and codecs, and sh/hwcodec doesn't compile codecs so it doesn't fit into sources. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27869 a1c6a512-1295-4272-9138-f99709370657
* Revert "Introduce plugin_crt0.c that every plugin links."Thomas Martitz2010-08-23
| | | | | | Too much errors and no time to fix them now. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27863 a1c6a512-1295-4272-9138-f99709370657
* Introduce plugin_crt0.c that every plugin links.Thomas Martitz2010-08-23
| | | | | | | | | | | | | It handles exit() properly, calling the handler also when the plugin returns normally (also it makes exit() more standard compliant while at it). It also holds PLUGIN_HEADER, so that it doesn't need to be in each plugin anymore. To work better together with callbacks passed to rb->default_event_handler_ex introduce exit_on_usb() which will call the exit handler before showing the usb screen and exit() after it. In most cases it was passed a callback which was manually called at all other return points. This can now be done via atexit(). In future plugin_crt0.c could also handle clearing bss, initializing iram and more. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27862 a1c6a512-1295-4272-9138-f99709370657
* Rockbox as an application: Replace many occurences of #ifdef SIMULATOR with ↵Thomas Martitz2010-06-21
| | | | | | | | | | | #if (CONFIG_PLATFORM & PLATFORM_HOSTED) (or equivalently). The simulator defines PLATFORM_HOSTED, as RaaA will do (RaaA will not define SIMULATOR). The new define is to (de-)select code to compile on hosted platforms generally. Should be no functional change to targets or the simulator. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27019 a1c6a512-1295-4272-9138-f99709370657
* pluginlib: Support calling a function at exit time to clean up open filesTorne Wuff2010-01-05
| | | | | | | | | or other similar work. This is not quite the same as atexit() on POSIX as the function is *not* called if the plugin exits by returning from plugin_start; only if exit() is called. No code overhead if it's not used. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24189 a1c6a512-1295-4272-9138-f99709370657
* Add exit() implementation for pluginsMaurus Cuelenaere2009-04-22
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20775 a1c6a512-1295-4272-9138-f99709370657