annotate CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/share/man/man3/ares_threadsafety.3 @ 68:5028fdace37b

planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author jpayne
date Tue, 18 Mar 2025 16:23:26 -0400
parents
children
rev   line source
jpayne@68 1 .\"
jpayne@68 2 .\" Copyright 2023 by the c-ares project and its contributors
jpayne@68 3 .\" SPDX-License-Identifier: MIT
jpayne@68 4 .\"
jpayne@68 5 .TH ARES_THREADSAFETY 3 "26 November 2023"
jpayne@68 6 .SH NAME
jpayne@68 7 ares_threadsafety \- Query if c-ares was built with thread-safety
jpayne@68 8 .SH SYNOPSIS
jpayne@68 9 .nf
jpayne@68 10 #include <ares.h>
jpayne@68 11
jpayne@68 12 ares_bool_t ares_threadsafety(void);
jpayne@68 13 .fi
jpayne@68 14 .SH DESCRIPTION
jpayne@68 15 The \fBares_threadsafety(3)\fP function returns if the library was built with
jpayne@68 16 thread safety enabled or not.
jpayne@68 17
jpayne@68 18 As of c-ares 1.23.0, this simply means that every public function which
jpayne@68 19 references an \fIares_channel_t\fP object will lock the channel on entry and
jpayne@68 20 release the lock on exit of the function. This will prevent concurrent
jpayne@68 21 thread access to the channel, thus ensuring no corruption can occur.
jpayne@68 22
jpayne@68 23 As of c-ares 1.26.0, this also indicates if \fBARES_OPT_EVENT_THREAD\fP can
jpayne@68 24 be passed to \fIares_init_options(3)\fP.
jpayne@68 25
jpayne@68 26 .SH RETURN VALUES
jpayne@68 27 \fIares_threadsafety(3)\fP can return any of the following values:
jpayne@68 28 .TP 14
jpayne@68 29 .B ARES_TRUE
jpayne@68 30 Built with thread safety.
jpayne@68 31 .TP 14
jpayne@68 32 .B ARES_FALSE
jpayne@68 33 Built without thread safety
jpayne@68 34 .TP 14
jpayne@68 35
jpayne@68 36 .SH AVAILABILITY
jpayne@68 37 This function was first introduced in c-ares version 1.23.0.
jpayne@68 38 .SH SEE ALSO
jpayne@68 39 .BR ares_init (3),
jpayne@68 40 .BR ares_init_options (3),
jpayne@68 41 .BR ares_destroy (3),
jpayne@68 42 .BR ares_dup (3),
jpayne@68 43 .BR ares_library_init (3),
jpayne@68 44 .BR ares_set_servers (3)