MCPcopy Create free account
hub / github.com/antirez/ds4 / model_close

Function model_close

ds4.c:1823–1831  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1821 pthread_mutex_unlock(&g_pool.mutex);
1822
1823 const uint64_t rows_per_thread = (n_rows + n_threads - 1) / n_threads;
1824 const uint64_t row0 = (uint64_t)tid * rows_per_thread;
1825 uint64_t row1 = row0 + rows_per_thread;
1826 if (row1 > n_rows) row1 = n_rows;
1827 if (row0 < row1) {
1828 g_parallel_depth++;
1829 fn(ctx, row0, row1);
1830 g_parallel_depth--;
1831 }
1832
1833 pthread_mutex_lock(&g_pool.mutex);
1834 g_pool.done++;

Callers 2

ds4_engine_closeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected