Backwards-compatibility subject to OPENSSL_API_COMPAT
[openssl.git] / doc / crypto / ERR_remove_state.pod
1 =pod
2
3 =head1 NAME
4
5 ERR_remove_thread_state, ERR_remove_state - free a thread's error queue
6
7 =head1 SYNOPSIS
8
9  #include <openssl/err.h>
10
11  void ERR_remove_thread_state(const CRYPTO_THREADID *tid);
12
13 Deprecated:
14
15  #if OPENSSL_API_COMPAT < 0x10000000L
16  void ERR_remove_state(unsigned long pid);
17  #endif
18
19 =head1 DESCRIPTION
20
21 ERR_remove_thread_state() frees the error queue associated with thread B<tid>.
22 If B<tid> == B<NULL>, the current thread will have its error queue removed.
23
24 Since error queue data structures are allocated automatically for new
25 threads, they must be freed when threads are terminated in order to
26 avoid memory leaks.
27
28 ERR_remove_state is deprecated and has been replaced by
29 ERR_remove_thread_state. Since threads in OpenSSL are no longer identified
30 by unsigned long values any argument to this function is ignored. Calling
31 ERR_remove_state is equivalent to B<ERR_remove_thread_state(NULL)>.
32
33 =head1 RETURN VALUE
34
35 ERR_remove_thread_state and ERR_remove_state() return no value.
36
37 =head1 SEE ALSO
38
39 L<err(3)>
40
41 =head1 HISTORY
42
43 ERR_remove_state()
44 was deprecated in OpenSSL 1.0.0 when ERR_remove_thread_state() was introduced
45 and thread IDs were introduced to identify threads instead of 'unsigned long'. 
46
47 =cut