MySQL  8.0.22
Source Code Documentation
xcom_cfg.h
Go to the documentation of this file.
1 /* Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
2 
3  This program is free software; you can redistribute it and/or modify
4  it under the terms of the GNU General Public License, version 2.0,
5  as published by the Free Software Foundation.
6 
7  This program is also distributed with certain software (including
8  but not limited to OpenSSL) that is licensed under separate terms,
9  as designated in a particular file or component or in included license
10  documentation. The authors of MySQL hereby grant you an additional
11  permission to link the program and your derivative works with the
12  separately licensed software that they have included with MySQL.
13 
14  This program is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU General Public License, version 2.0, for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with this program; if not, write to the Free Software
21  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22 
23 #ifndef XCOM_CFG_H
24 #define XCOM_CFG_H
25 
26 #include <stdint.h>
27 #include <stdlib.h>
28 #include "xdr_gen/xcom_vp.h"
29 
30 typedef struct cfg_app_xcom {
31  /*
32  The number of spin loops the XCom thread does before
33  blocking on the poll system call.
34  */
35  unsigned int m_poll_spin_loops;
36 
37  /*
38  cache size limit and interval
39  */
40  uint64_t m_cache_limit;
41 
42  /*
43  The (address, incarnation) pair that uniquely identifies this XCom instance.
44  */
45  node_address *identity;
47 
48 /*
49  The application will set this pointer before engaging
50  xcom
51 */
53 
54 void init_cfg_app_xcom();
55 void deinit_cfg_app_xcom();
56 
57 node_address *cfg_app_xcom_get_identity();
58 
59 /*
60  Takes ownership of @c identity.
61 
62  @param identity The unique identity of this XCom instance. Must not be null.
63 */
64 void cfg_app_xcom_set_identity(node_address *identity);
65 
66 #endif
unsigned int m_poll_spin_loops
Definition: xcom_cfg.h:35
Definition: xcom_cfg.h:30
void cfg_app_xcom_set_identity(node_address *identity)
Definition: xcom_cfg.cc:59
node_address * identity
Definition: xcom_cfg.h:45
void deinit_cfg_app_xcom()
Definition: xcom_cfg.cc:44
struct cfg_app_xcom cfg_app_xcom_st
void init_cfg_app_xcom()
Definition: xcom_cfg.cc:35
uint64_t m_cache_limit
Definition: xcom_cfg.h:40
node_address * cfg_app_xcom_get_identity()
Definition: xcom_cfg.cc:53
cfg_app_xcom_st * the_app_xcom_cfg
Definition: xcom_cfg.cc:33