From: Florian Weimer <fweimer@redhat.com>
To: libc-alpha@sourceware.org
Subject: Calling __cxa_thread_atexit_impl directly, from C code
Date: Fri, 26 Aug 2022 10:31:35 +0200 [thread overview]
Message-ID: <87lerbtnh4.fsf@oldenburg.str.redhat.com> (raw)
Do we support calling __cxa_thread_atexit_impl directly? The function
is not documented, nor is it declared in any installed header.
I think the answer is yes, because we support different C++
implementations, and they have to call __cxa_thread_atexit_impl for
thread-local destructors, either directly or through a wrapper
(__cxa_thread_atexit for libstdc++, as proposed for the Itanium C++
ABI).
There's interest in this because it's much easier to use than
pthread_key_create if you have to avoid linking against libpthread and
you target glibc releases between 2.18 and 2.33 (although it is possible
to use weak symbols, as in the libstdc++ implementation in
libstdc++-v3/libsupc++/atexit_thread.cc).
Thanks,
Florian
next reply other threads:[~2022-08-26 8:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-26 8:31 Florian Weimer [this message]
2022-08-29 18:59 ` Adhemerval Zanella Netto
2022-08-29 19:21 ` Florian Weimer
2022-08-29 19:56 ` Adhemerval Zanella Netto
2022-08-30 7:37 ` Florian Weimer
2022-08-30 12:56 ` Adhemerval Zanella Netto
2022-09-06 6:44 ` Florian Weimer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lerbtnh4.fsf@oldenburg.str.redhat.com \
--to=fweimer@redhat.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).