File: errtrig.h

package info (click to toggle)
gensio 2.8.6-1~bpo12%2B2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-backports
  • size: 8,536 kB
  • sloc: ansic: 89,872; python: 5,085; sh: 4,929; cpp: 3,543; makefile: 1,468
file content (34 lines) | stat: -rw-r--r-- 696 bytes parent folder | download | duplicates (3)
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
30
31
32
33
34
/*
 *  gensio - A library for abstracting stream I/O
 *  Copyright (C) 2020  Corey Minyard <minyard@acm.org>
 *
 *  SPDX-License-Identifier: LGPL-2.1-only
 */

/*
 * Test code to trigger errors at specific counts.  See errtrig.c for details.
 */
#ifndef _GENSIO_ERRTRIG_H
#define _GENSIO_ERRTRIG_H

#include "config.h"

#include <stdlib.h>
#include <stdbool.h>
#include <gensio/gensioosh_dllvisibility.h>

#ifdef ENABLE_INTERNAL_TRACE
#define ENABLE_ERRTRIG_TEST
#endif

#ifdef ENABLE_ERRTRIG_TEST
GENSIOOSH_DLL_PUBLIC
bool do_errtrig(void);
GENSIOOSH_DLL_PUBLIC
void errtrig_exit(int rv);
#else
#define do_errtrig() false
#define errtrig_exit(rv) exit(rv)
#endif

#endif /* _GENSIO_ERRTRIG_H */