GCC Middle and Back End API Reference
opts-jobserver.h
Go to the documentation of this file.
1/* GNU make's jobserver related functionality.
2 Copyright (C) 2022-2024 Free Software Foundation, Inc.
3
4This file is part of GCC.
5
6GCC is free software; you can redistribute it and/or modify it under
7the terms of the GNU General Public License as published by the Free
8Software Foundation; either version 3, or (at your option) any later
9version.
10
11GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12WARRANTY; without even the implied warranty of MERCHANTABILITY or
13FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14for more details.
15
16You should have received a copy of the GNU General Public License
17along with GCC; see the file COPYING3. If not see
18<http://www.gnu.org/licenses/>.
19
20See dbgcnt.def for usage information. */
21
22#ifndef GCC_JOBSERVER_H
23#define GCC_JOBSERVER_H
24
25using namespace std;
26
28{
29 /* Default constructor. */
31
32 /* Connect to the server. */
33 void connect ();
34
35 /* Disconnect from the server. */
36 void disconnect ();
37
38 /* Get token from the server. */
39 bool get_token ();
40
41 /* Return token to the server. */
42 void return_token ();
43
44 /* Error message if there is a problem. */
45 string error_msg = "";
46 /* Skipped MAKEFLAGS where --jobserver-auth is skipped. */
47 string skipped_makeflags = "";
48 /* File descriptor for reading used for jobserver communication. */
49 int rfd = -1;
50 /* File descriptor for writing used for jobserver communication. */
51 int wfd = -1;
52 /* Named pipe path. */
53 string pipe_path = "";
54 /* Pipe file descriptor. */
55 int pipefd = -1;
56 /* Return true if jobserver is active. */
57 bool is_active = false;
58 /* Return true if communication with jobserver is working. */
59 bool is_connected = false;
60};
61
62#endif /* GCC_JOBSERVER_H */
Definition opts-jobserver.h:28
int rfd
Definition opts-jobserver.h:49
string pipe_path
Definition opts-jobserver.h:53
string skipped_makeflags
Definition opts-jobserver.h:47
int pipefd
Definition opts-jobserver.h:55
void disconnect()
Definition opts-common.cc:2155
void connect()
Definition opts-common.cc:2139
int wfd
Definition opts-jobserver.h:51
bool is_active
Definition opts-jobserver.h:57
bool get_token()
Definition opts-common.cc:2165
jobserver_info()
Definition opts-common.cc:2086
bool is_connected
Definition opts-jobserver.h:59
string error_msg
Definition opts-jobserver.h:45
void return_token()
Definition opts-common.cc:2180