forked from timescale/timescaledb
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebug_point.h
More file actions
29 lines (22 loc) · 967 Bytes
/
Copy pathdebug_point.h
File metadata and controls
29 lines (22 loc) · 967 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
* This file and its contents are licensed under the Apache License 2.0.
* Please see the included NOTICE for copyright information and
* LICENSE-APACHE for a copy of the license.
*/
#pragma once
#include <postgres.h>
#include "export.h"
extern TSDLLEXPORT void ts_debug_point_wait(const char *name, bool blocking);
extern TSDLLEXPORT void ts_debug_point_raise_error_if_enabled(const char *name);
extern TSDLLEXPORT void ts_debug_point_raise_error_oneshot(const char *name);
#ifdef TS_DEBUG
#define DEBUG_WAITPOINT(NAME) ts_debug_point_wait((NAME), true)
#define DEBUG_RETRY_WAITPOINT(NAME) ts_debug_point_wait((NAME), false)
#define DEBUG_ERROR_INJECTION(NAME) ts_debug_point_raise_error_if_enabled((NAME))
#define DEBUG_ERROR_INJECTION_ONESHOT(NAME) ts_debug_point_raise_error_oneshot((NAME))
#else
#define DEBUG_WAITPOINT(NAME)
#define DEBUG_RETRY_WAITPOINT(NAME)
#define DEBUG_ERROR_INJECTION(NAME)
#define DEBUG_ERROR_INJECTION_ONESHOT(NAME)
#endif