| 653 | } |
| 654 | |
| 655 | int bthread_set_span_funcs(bthread_create_span_fn create_fn, |
| 656 | bthread_destroy_span_fn destroy_fn, |
| 657 | bthread_end_span_fn end_fn) { |
| 658 | if ((create_fn && destroy_fn && end_fn) || |
| 659 | (!create_fn && !destroy_fn && !end_fn)) { |
| 660 | bthread::g_create_bthread_span = create_fn; |
| 661 | bthread::g_rpcz_parent_span_dtor = destroy_fn; |
| 662 | bthread::g_end_bthread_span = end_fn; |
| 663 | return 0; |
| 664 | } |
| 665 | |
| 666 | errno = EINVAL; |
| 667 | return -1; |
| 668 | } |
| 669 | |
| 670 | } // extern "C" |
| 671 |
no outgoing calls