1: /*
2: * $Id: tp_check.h,v 1.3 2025/03/09 19:50:47 snw Exp $
3: * TP checkpointing declarations
4: *
5: *
6: * Author: Serena Willis <snw@coherent-logic.com>
7: * Copyright (C) 1998 MUG Deutschland
8: * Copyright (C) 2022, 2025 Coherent Logic Development LLC
9: *
10: *
11: * This file is part of FreeM.
12: *
13: * FreeM is free software: you can redistribute it and/or modify
14: * it under the terms of the GNU Affero Public License as published by
15: * the Free Software Foundation, either version 3 of the License, or
16: * (at your option) any later version.
17: *
18: * FreeM is distributed in the hope that it will be useful,
19: * but WITHOUT ANY WARRANTY; without even the implied warranty of
20: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21: * GNU Affero Public License for more details.
22: *
23: * You should have received a copy of the GNU Affero Public License
24: * along with FreeM. If not, see <https://www.gnu.org/licenses/>.
25: *
26: * $Log: tp_check.h,v $
27: * Revision 1.3 2025/03/09 19:50:47 snw
28: * Second phase of REUSE compliance and header reformat
29: *
30: *
31: * SPDX-FileCopyrightText: (C) 2025 Coherent Logic Development LLC
32: * SPDX-License-Identifier: AGPL-3.0-or-later
33: **/
34:
35: #define CP_UNUSED 0
36: #define CP_REMOVE 1
37: #define CP_RESTORE 2
38:
39: typedef struct cptab {
40:
41: char mode; /* CP_UNUSED, CP_REMOVE, or CP_RESTORE */
42:
43: char *global; /* global name */
44: char *file; /* fully-qualified file path */
45:
46: char *cp_file; /* fully-qualified checkpoint file path */
47:
48: struct cptab *next;
49:
50: } cptab;
51:
52: extern cptab *cptab_head[];
53:
54: extern cptab *cptab_insert(int tlevel, char *global);
55: extern cptab *cptab_retrieve(int tlevel, char *global);
56: extern void cptab_delete(int tlevel, char *global);
57: extern short cptab_precommit(int tlevel);
58: extern void cptab_postcommit(int tlevel);
59: extern void cptab_dump(int tlevel);
60: short cptab_rollback(int tlevel);
61:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>