| 806 | #endif |
| 807 | |
| 808 | static malloc_mutex_t * |
| 809 | prof_gctx_mutex_choose(void) { |
| 810 | unsigned ngctxs = atomic_fetch_add_u(&cum_gctxs, 1, ATOMIC_RELAXED); |
| 811 | |
| 812 | return &gctx_locks[(ngctxs - 1) % PROF_NCTX_LOCKS]; |
| 813 | } |
| 814 | |
| 815 | static malloc_mutex_t * |
| 816 | prof_tdata_mutex_choose(uint64_t thr_uid) { |