Line data Source code
1 : /* channels.h - Publish/Subscribe channels on compiler-specific topics.
2 : Copyright (C) 2025 Free Software Foundation, Inc.
3 : Contributed by David Malcolm <dmalcolm@redhat.com>.
4 :
5 : This file is part of GCC.
6 :
7 : GCC is free software; you can redistribute it and/or modify it under
8 : the terms of the GNU General Public License as published by the Free
9 : Software Foundation; either version 3, or (at your option) any later
10 : version.
11 :
12 : GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13 : WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 : FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 : for more details.
16 :
17 : You should have received a copy of the GNU General Public License
18 : along with GCC; see the file COPYING3. If not see
19 : <http://www.gnu.org/licenses/>. */
20 :
21 : #ifndef GCC_CHANNELS_H
22 : #define GCC_CHANNELS_H
23 :
24 : #include "pub-sub.h"
25 :
26 : namespace gcc {
27 :
28 : /* Forward decls of subscribers for the various topics we have
29 : publish/subscribe channels for. */
30 : namespace topics {
31 : namespace analyzer_events { struct subscriber; }
32 : namespace pass_events { struct subscriber; }
33 : } // namespace gcc::topics
34 :
35 : /* Publish/subscribe channels on various compiler-specific topics. */
36 :
37 256621 : struct compiler_channels
38 : {
39 : pub_sub::channel<topics::analyzer_events::subscriber> analyzer_events_channel;
40 : pub_sub::channel<topics::pass_events::subscriber> pass_events_channel;
41 : };
42 :
43 : } // namespace gcc
44 :
45 : #endif /* ! GCC_CHANNELS_H */
|