MySQL 8.3.0
Source Code Documentation
synode_no.h
Go to the documentation of this file.
1/* Copyright (c) 2015, 2023, Oracle and/or its affiliates.
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 SYNODE_NO_H
24#define SYNODE_NO_H
25
26#include "xcom/x_platform.h"
27#include "xcom/xcom_common.h"
28#include "xdr_gen/xcom_vp.h"
29
30#define FILENAME_SYNODE_FMT "%x_%" PRIu64 "_%u"
31#define FILENAME_SYNODE_MEM(x) SY_MEM(x)
32#define NULL_SYNODE \
33 { 0ul, 0ull, 0ull }
34#define SY_FMT "{" SY_FMT_DEF "}"
35#define SY_FMT_DEF "%x %" PRIu64 " %" PRIu32
36#define SY_MEM(s) (s).group_id, (uint64_t)(s).msgno, (s).node
37
38int synode_eq(synode_no x, synode_no y);
39int synode_gt(synode_no x, synode_no y);
40int synode_lt(synode_no x, synode_no y);
41extern "C" synode_no const null_synode;
42void add_synode_event(synode_no const synode);
43
44static inline int group_mismatch(synode_no x, synode_no y) {
45 return x.group_id != y.group_id;
46}
47
48void synode_array_move(synode_no_array *const to, synode_no_array *const from);
49void synode_app_data_array_move(synode_app_data_array *const to,
50 synode_app_data_array *const from);
51#endif
int synode_gt(synode_no x, synode_no y)
Definition: synode_no.cc:51
void synode_app_data_array_move(synode_app_data_array *const to, synode_app_data_array *const from)
Definition: synode_no.cc:76
int synode_eq(synode_no x, synode_no y)
Definition: synode_no.cc:42
void synode_array_move(synode_no_array *const to, synode_no_array *const from)
Definition: synode_no.cc:67
synode_no const null_synode
Definition: synode_no.h:41
void add_synode_event(synode_no const synode)
int synode_lt(synode_no x, synode_no y)
Definition: synode_no.cc:46
static int group_mismatch(synode_no x, synode_no y)
Definition: synode_no.h:44