MCPcopy Create free account
hub / github.com/apache/brpc / thread_atexit

Function thread_atexit

src/butil/thread_local.cpp:124–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122} // namespace detail
123
124int thread_atexit(void (*fn)(void*), void* arg) {
125 if (NULL == fn) {
126 errno = EINVAL;
127 return -1;
128 }
129 detail::ThreadExitHelper* h = detail::get_or_new_thread_exit_helper();
130 if (h) {
131 return h->add(fn, arg);
132 }
133 errno = ENOMEM;
134 return -1;
135}
136
137int thread_atexit(void (*fn)()) {
138 if (NULL == fn) {

Callers 15

iobuf_unittest.cppFile · 0.85
BaiduThreadLocalTestMethod · 0.85
proc_dummyFunction · 0.85
TEST_FFunction · 0.85
DeallocBlockFunction · 0.85
bthread_setspecificFunction · 0.85
get_stringMethod · 0.85
thread_setspecificFunction · 0.85
getMethod · 0.85
release_tls_blockFunction · 0.85

Calls 2

addMethod · 0.45

Tested by 3

BaiduThreadLocalTestMethod · 0.68
proc_dummyFunction · 0.68
TEST_FFunction · 0.68