git: libc/stdlib: Add __cxa_thread_atexit_impl() hook.

Rimvydas Jasinskas zrj at crater.dragonflybsd.org
Sun Apr 7 12:07:16 PDT 2019


commit 284b4eb248dfa77ebf719d095f347fcaabc7f437
Author: zrj <rimvydas.jasinskas at gmail.com>
Date:   Mon Apr 1 20:16:47 2019 +0300

    libc/stdlib: Add __cxa_thread_atexit_impl() hook.
    
    The __cxa_thread_atexit_impl() helper is needed for mainly c++ runtime
    libraries to support destructors for thread local storage using LIFO.
    The _thread_finalize() is implemented based on OpenBSD variant with few
    exceptions: less restrictive destructors calling scheme and c++ runtime
    preserves implementation details how it orders (or even uses) this libc
    addition. Based on other BSDs and libsdc++/libc++ code this is least
    intrusive method to have pthread_exit() hooks in libc runtime. By the
    looks, in base system nothing was using libstdc++ internal version.
    
    While there, enable __cxa_thread_atexit_impl() usage in gcc80 libstdc++.

Summary of changes:
 gnu/lib/gcc80/libstdcxx/headers/config.h |  2 +-
 lib/libc/gen/Symbol.map                  |  1 +
 lib/libc/include/libc_private.h          |  5 ++
 lib/libc/stdlib/Makefile.inc             |  3 +-
 lib/libc/stdlib/Symbol.map               |  1 +
 lib/libc/stdlib/cxa_thread_atexit_impl.c | 89 ++++++++++++++++++++++++++++++++
 lib/libc/stdlib/exit.c                   |  3 +-
 lib/libc_r/uthread/uthread_exit.c        |  5 +-
 lib/libthread_xu/thread/thr_exit.c       |  3 ++
 9 files changed, 108 insertions(+), 4 deletions(-)
 create mode 100644 lib/libc/stdlib/cxa_thread_atexit_impl.c

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/284b4eb248dfa77ebf719d095f347fcaabc7f437


-- 
DragonFly BSD source repository



More information about the Commits mailing list