/[baselayout]/trunk/src/rc-plugin.h
Gentoo

Contents of /trunk/src/rc-plugin.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2744 - (show annotations) (download) (as text)
Wed Jul 4 16:02:01 2007 UTC (7 years ago) by uberlord
File MIME type: text/x-chdr
File size: 694 byte(s)
As we're running each plugin in a fork, we need to call our cleanup code so we don't leak memory. To this extent, we now have the global boolean rc_in_plugin and the cleanup code can act accordingly.
1 /*
2 librc-plugin.h
3 Private instructions to use plugins
4 Copyright 2007 Gentoo Foundation
5 Released under the GPLv2
6 */
7
8 #ifndef __LIBRC_PLUGIN_H__
9 #define __LIBRC_PLUGIN_H__
10
11 /* A simple flag to say if we're in a plugin proccess or not.
12 * Mainly used in atexit code. */
13 extern bool rc_in_plugin;
14
15 void rc_plugin_load ();
16 void rc_plugin_unload ();
17 void rc_plugin_run (rc_hook_t, const char *value);
18
19 /* dlfunc defines needed to avoid ISO errors. FreeBSD has this right :) */
20 #ifndef __FreeBSD__
21 struct __dlfunc_arg {
22 int __dlfunc_dummy;
23 };
24
25 typedef void (*dlfunc_t) (struct __dlfunc_arg);
26
27 dlfunc_t dlfunc (void * __restrict handle, const char * __restrict symbol);
28 #endif
29
30 #endif

  ViewVC Help
Powered by ViewVC 1.1.20