Fix race for X509 store found by thread sanitizer
[openssl.git] / doc / man3 / ERR_set_mark.pod
1 =pod
2
3 =head1 NAME
4
5 ERR_set_mark, ERR_clear_last_mark, ERR_pop_to_mark, ERR_count_to_mark, ERR_pop -
6 set mark, clear mark, pop errors until mark and pop last error
7
8 =head1 SYNOPSIS
9
10  #include <openssl/err.h>
11
12  int ERR_set_mark(void);
13  int ERR_pop_to_mark(void);
14  int ERR_clear_last_mark(void);
15  int ERR_count_to_mark(void);
16  int ERR_pop(void);
17
18 =head1 DESCRIPTION
19
20 ERR_set_mark() sets a mark on the current topmost error record if there
21 is one.
22
23 ERR_pop_to_mark() will pop the top of the error stack until a mark is found.
24 The mark is then removed.  If there is no mark, the whole stack is removed.
25
26 ERR_clear_last_mark() removes the last mark added if there is one.
27
28 ERR_count_to_mark() returns the number of entries on the error stack above the
29 most recently marked entry, not including that entry. If there is no mark in the
30 error stack, the number of entries in the error stack is returned.
31
32 ERR_pop() unconditionally pops a single error entry from the top of the error
33 stack (which is the entry obtainable via L<ERR_peek_last_error(3)>).
34
35 =head1 RETURN VALUES
36
37 ERR_set_mark() returns 0 if the error stack is empty, otherwise 1.
38
39 ERR_clear_last_mark() and ERR_pop_to_mark() return 0 if there was no mark in the
40 error stack, which implies that the stack became empty, otherwise 1.
41
42 ERR_count_to_mark() returns the number of error stack entries found above the
43 most recent mark, if any, or the total number of error stack entries.
44
45 ERR_pop() returns 1 if an error was popped or 0 if the error stack was empty.
46
47 =head1 HISTORY
48
49 ERR_pop() was added in OpenSSL 3.3.
50
51 =head1 COPYRIGHT
52
53 Copyright 2003-2023 The OpenSSL Project Authors. All Rights Reserved.
54
55 Licensed under the Apache License 2.0 (the "License").  You may not use
56 this file except in compliance with the License.  You can obtain a copy
57 in the file LICENSE in the source distribution or at
58 L<https://www.openssl.org/source/license.html>.
59
60 =cut