Allocate the next buffer-local or shared-atomic ID. */
| 419 | |
| 420 | /* Allocate the next buffer-local or shared-atomic ID. */ |
| 421 | static int64_t alloc_next_id(cbm_gbuf_t *gb) { |
| 422 | if (gb->shared_ids) { |
| 423 | return atomic_fetch_add_explicit(gb->shared_ids, SKIP_ONE, memory_order_relaxed); |
| 424 | } |
| 425 | return gb->next_id++; |
| 426 | } |
| 427 | |
| 428 | /* Swap-remove an edge from a pointer array by ID. */ |
| 429 | static void remove_edge_from_ptr_array(edge_ptr_array_t *arr, int64_t edge_id) { |
no outgoing calls
no test coverage detected