1 /* Compiler-side interface for high-level plugins in GCC.
2 Copyright (C) 2009 Free Software Foundation, Inc.
6 Authors: Grigori Fursin <grigori.fursin@inria.fr>, Cupertino Miranda
7 <cupertinomiranda@gmail.com>, Zbigniew Chamski <zbigniew.chamski@gmail.com>.
9 This file is part of GCC.
11 GCC is free software; you can redistribute it and/or modify it under
12 the terms of the GNU General Public License as published by the Free
13 Software Foundation; either version 3, or (at your option) any later
16 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
17 WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with GCC; see the file COPYING3. If not see
23 <http://www.gnu.org/licenses/>. */
25 #ifndef HIGHLEV_PLUGIN_INTERNAL
26 #define HIGHLEV_PLUGIN_INTERNAL
28 /* Callback type for high-level argument-less event callbacks */
29 typedef void (*event_callback_t
) (void);
31 /* Manipulation of events and event handlers */
32 extern void register_plugin_event (const char *name
, event_callback_t func
);
33 extern void unregister_plugin_event (const char *name
);
34 extern const char **list_plugin_events (void);
35 extern int call_plugin_event (const char *event_name
);
37 /* return codes for call_plugin_event */
38 #define PLUGEVT_SUCCESS 0
39 #define PLUGEVT_NO_EVENTS 1
40 #define PLUGEVT_NO_SUCH_EVENT 2
41 #define PLUGEVT_NO_CALLBACK 3
43 /* Datatype of event parameter structure. */
46 EP_SILENT
, /* Used to pass infomation between ICI and plugin,
47 parameter of this type will not be recorded.
48 The data type is int. */
56 } event_parameter_type
;
58 /* Manipulation of event parameters (callback arguments) */
59 extern void register_event_parameter (const char *name
, void *param
,
60 event_parameter_type type
);
61 extern void unregister_event_parameter (const char *name
);
62 extern const char **list_event_parameters (void);
63 extern void *get_event_parameter (const char *name
);
65 /* ICI-specific, environment-based plugin loading */
66 extern void load_ici_plugin (void);
68 /* Info needed by adaptation. */
71 char **clone_function_list
;
72 char **function_filename_list
;
74 char **clone_extension
;
75 char **adaptation_function
;
77 char *external_libraries
;
82 char **instrument_function_list
;
83 char **function_filename_list
;
89 #endif /* HIGHLEV_PLUGIN_INTERNAL_H*/